-- { "one_file": true } API Documentation

Tables

{% for t in tables %} {{ t.table_name|capitalize }}

GET /{{ t.table_name }}
List all existing {{ t.table_name }}s

GET /{{ t.table_name }}/<{{ t.table_name }}_id>
Get an existing {{ t.table_name }}

POST /{{ t.table_name }}
Create a new {{ t.table_name }}

PUT /{{ t.table_name }}/<{{ t.table_name }}_id>
Update an existing {{ t.table_name }}

PATCH /{{ t.table_name }}/<{{ t.table_name }}_id>
Update part of an existing {{ t.table_name }}

DELETE /{{ t.table_name }}/<{{ t.table_name }}_id>
Delete an existing {{ t.table_name }}




{% endfor %}
{% for t in tables %}

{{ t.table_name|capitalize }}

GET /{{ t.table_name }} List all existing {{ t.table_name }}s

Parameters

No parameters

Response

CodeDescription
200Success
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

CodeDescription
401User not authorised
403Accessing 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

NameDescription
{{ t.table_name }}_id{{ t.table_name }}_id

Response

CodeDescription
200Success
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

CodeDescription
401User not authorised
403Accessing a resource or endpoint that the user is not allowed to
404Resource 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

CodeDescription
200Success
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

CodeDescription
400Request required a payload and either one was missing or had invalid data
401User not authorised
403Accessing 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

CodeDescription
200Success
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

CodeDescription
400Request required a payload and either one was missing or had invalid data
401User not authorised
403Accessing a resource or endpoint that the user is not allowed to
404Resource 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

CodeDescription
200Success
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

CodeDescription
401User not authorised
403Accessing a resource or endpoint that the user is not allowed to
404Resource not found

DELETE /{{ t.table_name }}/<{{ t.table_name }}_id> Delete an existing {{ t.table_name }}

Parameters

NameDescription
{{ t.table_name }}_id{{ t.table_name }}_id

Response

CodeDescription
200Success
Media Type: application/json
{
  "status": "OK"
}

Error

CodeDescription
401User not authorised
403Accessing a resource or endpoint that the user is not allowed to
404Resource not found





{% endfor %}