{{ t.table_name|capitalize }}
GET /{{ t.table_name }} List all existing {{ t.table_name }}s
Parameters
| No parameters |
Response
| Code | Description |
|---|---|
| 200 | Success |
| Media Type: application/json | |
|
{ {{ t.table_name }}s: [ { {% for c in t.columns.values() %}{{ c.name }}: {% if "BIGINT" in c.type %}0{% elif "FLOAT" in c.type %}"decimal"{% elif c.type == "INT" %}0{% elif "DECIMAL" in c.type %}"decimal"{% elif "TIME" in c.type %}"string"{% elif "VARCHAR" in c.type %}"string"{% elif "TEXT" in c.type %}"string"{% elif "TINYINT" in c.type %}true{% else %}"{{ c.type }}"{% endif %}{% if not loop.last %}, {% endif %}{% if c.comment %}{% endif %}{% endfor %} } ] } |
Error
| Code | Description |
|---|---|
| 401 | User not authorised |
| 403 | Accessing a resource or endpoint that the user is not allowed to |
GET /{{ t.table_name }}/<{{ t.table_name }}_id> Get an existing {{ t.table_name }}
Parameters
| Name | Description |
|---|---|
| {{ t.table_name }}_id | {{ t.table_name }}_id |
Response
| Code | Description |
|---|---|
| 200 | Success |
| Media Type: application/json | |
|
{ {% for c in t.columns.values() %}{{ c.name }}: {% if "BIGINT" in c.type %}0{% elif "FLOAT" in c.type %}"decimal"{% elif c.type == "INT" %}0{% elif "DECIMAL" in c.type %}"decimal"{% elif "TIME" in c.type %}"string"{% elif "VARCHAR" in c.type %}"string"{% elif "TEXT" in c.type %}"string"{% elif "TINYINT" in c.type %}true{% else %}"{{ c.type }}"{% endif %}{% if not loop.last %}, {% endif %}{% if c.comment %}{% endif %}{% endfor %} } |
Error
| Code | Description |
|---|---|
| 401 | User not authorised |
| 403 | Accessing a resource or endpoint that the user is not allowed to |
| 404 | Resource not found |
POST /{{ t.table_name }} Create a new {{ t.table_name }}
Request Body
| Example |
|---|
|
{ {% for c in t.columns.values() %}{{ c.name }}: {% if "BIGINT" in c.type %}0{% elif "FLOAT" in c.type %}"decimal"{% elif c.type == "INT" %}0{% elif "DECIMAL" in c.type %}"decimal"{% elif "TIME" in c.type %}"string"{% elif "VARCHAR" in c.type %}"string"{% elif "TEXT" in c.type %}"string"{% elif "TINYINT" in c.type %}true{% else %}"{{ c.type }}"{% endif %}{% if not loop.last %}, {% endif %}{% if c.comment %}{% endif %}{% endfor %} } |
Response
| Code | Description |
|---|---|
| 200 | Success |
| Media Type: application/json | |
|
{ {% for c in t.columns.values() %}{{ c.name }}: {% if "BIGINT" in c.type %}0{% elif "FLOAT" in c.type %}"decimal"{% elif c.type == "INT" %}0{% elif "DECIMAL" in c.type %}"decimal"{% elif "TIME" in c.type %}"string"{% elif "VARCHAR" in c.type %}"string"{% elif "TEXT" in c.type %}"string"{% elif "TINYINT" in c.type %}true{% else %}"{{ c.type }}"{% endif %}{% if not loop.last %}, {% endif %}{% if c.comment %}{% endif %}{% endfor %} } |
Error
| Code | Description |
|---|---|
| 400 | Request required a payload and either one was missing or had invalid data |
| 401 | User not authorised |
| 403 | Accessing a resource or endpoint that the user is not allowed to |
PUT /{{ t.table_name }}/<{{ t.table_name }}_id> Update an existing {{ t.table_name }}
Request Body
| Example |
|---|
|
{ {% for c in t.columns.values() %}{{ c.name }}: {% if "BIGINT" in c.type %}0{% elif "FLOAT" in c.type %}"decimal"{% elif c.type == "INT" %}0{% elif "DECIMAL" in c.type %}"decimal"{% elif "TIME" in c.type %}"string"{% elif "VARCHAR" in c.type %}"string"{% elif "TEXT" in c.type %}"string"{% elif "TINYINT" in c.type %}true{% else %}"{{ c.type }}"{% endif %}{% if not loop.last %}, {% endif %}{% if c.comment %}{% endif %}{% endfor %} } |
Response
| Code | Description |
|---|---|
| 200 | Success |
| Media Type: application/json | |
|
{ {% for c in t.columns.values() %}{{ c.name }}: {% if "BIGINT" in c.type %}0{% elif "FLOAT" in c.type %}"decimal"{% elif c.type == "INT" %}0{% elif "DECIMAL" in c.type %}"decimal"{% elif "TIME" in c.type %}"string"{% elif "VARCHAR" in c.type %}"string"{% elif "TEXT" in c.type %}"string"{% elif "TINYINT" in c.type %}true{% else %}"{{ c.type }}"{% endif %}{% if not loop.last %}, {% endif %}{% if c.comment %}{% endif %}{% endfor %} } |
Error
| Code | Description |
|---|---|
| 400 | Request required a payload and either one was missing or had invalid data |
| 401 | User not authorised |
| 403 | Accessing a resource or endpoint that the user is not allowed to |
| 404 | Resource not found |
PATCH /{{ t.table_name }}/<{{ t.table_name }}_id> Update part of an existing {{ t.table_name }}
Request Body
| Example |
|---|
|
{ {% for c in t.columns.values() %}{{ c.name }}: {% if "BIGINT" in c.type %}0{% elif "FLOAT" in c.type %}"decimal"{% elif c.type == "INT" %}0{% elif "DECIMAL" in c.type %}"decimal"{% elif "TIME" in c.type %}"string"{% elif "VARCHAR" in c.type %}"string"{% elif "TEXT" in c.type %}"string"{% elif "TINYINT" in c.type %}true{% else %}"{{ c.type }}"{% endif %}{% if not loop.last %}, {% endif %}{% if c.comment %}{% endif %}{% endfor %} } |
Response
| Code | Description |
|---|---|
| 200 | Success |
| Media Type: application/json | |
|
{ {% for c in t.columns.values() %}{{ c.name }}: {% if "BIGINT" in c.type %}0{% elif "FLOAT" in c.type %}"decimal"{% elif c.type == "INT" %}0{% elif "DECIMAL" in c.type %}"decimal"{% elif "TIME" in c.type %}"string"{% elif "VARCHAR" in c.type %}"string"{% elif "TEXT" in c.type %}"string"{% elif "TINYINT" in c.type %}true{% else %}"{{ c.type }}"{% endif %}{% if not loop.last %}, {% endif %}{% if c.comment %}{% endif %}{% endfor %} } |
Error
| Code | Description |
|---|---|
| 401 | User not authorised |
| 403 | Accessing a resource or endpoint that the user is not allowed to |
| 404 | Resource not found |
DELETE /{{ t.table_name }}/<{{ t.table_name }}_id> Delete an existing {{ t.table_name }}
Parameters
| Name | Description |
|---|---|
| {{ t.table_name }}_id | {{ t.table_name }}_id |
Response
| Code | Description |
|---|---|
| 200 | Success |
| Media Type: application/json | |
|
{ "status": "OK" } |
Error
| Code | Description |
|---|---|
| 401 | User not authorised |
| 403 | Accessing a resource or endpoint that the user is not allowed to |
| 404 | Resource not found |
{% endfor %}