The Aircampi Database is a data store stack that manage your application's business data. Here is technical API reference docs for Aircampi Database.
Database
Aircampi Database allows you to create multiple databases. Each database can contain many tables and can be backed by a different database adaptor in future versions.
You can create your database by adding it to your Aircampi Console's dashboard. Access the Databases Service settings from your project's left-hand navigation panel. To create a new database, click Add Database button. Name your new database and optionally provide database options.
Table
Aircampi Database uses tables as containers of data.
To add a table to a database, first navigate to the desired project's database in Aircampi Console. In the project's database, click the Add Table button and choose your table's name.
Column
Columns are used to define the structure of your data and help the Aircampi API validate your users' input. Add your first column by clicking the Add column button.
You can choose between the following types:
- string
- number
- date
- datetime
- boolean
- array
- object
Row
Storing data through the Database API is built around a JSON encoding of the object’s data. This data's structure depends on column.
Index
Indexes are used by Databases to quickly locate data without having to search through every data for results. To ensure the best performance, Aircampi Database requires an index for every query.
You can create an index by navigating to the Indexes tab of your table or by using your favorite Server SDK. If you plan to query multiple columns in a single query, you will need an index with all queried attributes.
Quick Links:
Aircampi Database allows you to create multiple databases. Each database can contain many tables and can be backed by a different database adaptor in future versions.
You can create your database by adding it to your Aircampi Console's dashboard. Access the Databases Service settings from your project's left-hand navigation panel. To create a new database, click Add Database button. Name your new database and optionally provide database options.
Get databases
Retrieve filtered list of databases.
Authorizations:
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
q | string This query parameter defines the where clause. Example: ?q=(id=497f6eca-6276-4993-bfeb-53cbbbba6f08) |
sort | string This parameter sort a resource collection based on the specified attributes. The parameter value is a comma-separated string of attribute names, each optionally followed by a colon and "asc" or "desc". Specify "asc" for ascending and "desc" for descending. For example, ?sort=created_at asc,updated_at desc |
offset | integer >= 0 Default: 0 Used to define the starting position of the item collection. If offset exceeds the item count then no items are returned. |
limit | integer >= 1 Default: 10 This parameter restricts the number of items returned inside the collection. If the limit exceeds the item count then the server will only return the available items. |
total_count | boolean Default: false The item collection representation will include the "estimated row count" when "?total_count=true", otherwise the total_count is not included. |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
Responses
Response samples
- 200
- 400
- 401
- 403
- 405
- 429
- 500
- 501
- 503
{- "total_count": 0,
- "count": 0,
- "has_more": true,
- "limit": 0,
- "offset": 10,
- "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "public",
- "description": "Public is a default database",
- "metadata": { },
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z",
- "aggregations": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "tables": 0,
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "tables": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "name": "users",
- "description": "string",
- "metadata": {
- "enabled": true
}, - "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
]
}
Create database
Create database
Authorizations:
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
Request Body schema: application/json
Create Database
name required | string (database_name) Database Name |
description | string Database Description |
metadata | object (database_metadata) Database Metadata |
Responses
Request samples
- Payload
{- "name": "public",
- "description": "Public is a default database",
- "metadata": { }
}
Response samples
- 201
- 400
- 401
- 403
- 405
- 409
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "public",
- "description": "Public is a default database",
- "metadata": { },
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z",
- "aggregations": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "tables": 0,
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "tables": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "name": "users",
- "description": "string",
- "metadata": {
- "enabled": true
}, - "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
Get Database
Retrieve databse details.
Authorizations:
path Parameters
database required | string (database_name) Example: public Database Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "public",
- "description": "Public is a default database",
- "metadata": { },
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z",
- "aggregations": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "tables": 0,
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "tables": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "name": "users",
- "description": "string",
- "metadata": {
- "enabled": true
}, - "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
Update Database
Update Database
Authorizations:
path Parameters
database required | string (database_name) Example: public Database Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
Request Body schema: application/json
Update Database
name | string (database_name) Database Name |
description | string Database Description |
metadata | object (database_metadata) Database Metadata |
Responses
Request samples
- Payload
{- "name": "public",
- "description": "Public is a default database",
- "metadata": { }
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 409
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "public",
- "description": "Public is a default database",
- "metadata": { },
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z",
- "aggregations": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "tables": 0,
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "tables": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "name": "users",
- "description": "string",
- "metadata": {
- "enabled": true
}, - "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
Delete Database
Delete Database. Default Database cannot be deleted.
Authorizations:
path Parameters
database required | string (database_name) Example: public Database Name |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
Responses
Response samples
- 400
- 401
- 403
- 404
- 405
- 429
- 500
- 501
- 503
{- "code": "invalid_request",
- "message": "Invalid `fields` parameter. See https://developer.aircampi.com/api/query-fields"
}
Rename Database
Rename Database
Authorizations:
path Parameters
database required | string (database_name) Example: public Database Name |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
Request Body schema: application/json
Rename Database
new_name | string (database_name) Database Name |
Responses
Request samples
- Payload
{- "new_name": "renamed_database"
}
Response samples
- 400
- 401
- 403
- 405
- 409
- 429
- 500
- 501
- 503
{- "code": "invalid_request",
- "message": "Invalid `fields` parameter. See https://developer.aircampi.com/api/query-fields"
}
Aircampi Database uses tables as containers of data.
To add a table to a database, first navigate to the desired project's database in Aircampi Console. In the project's database, click the Add Table button and choose your table's name.
Get Tables
Retrieve filtered list of tables.
Authorizations:
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
q | string This query parameter defines the where clause. Example: ?q=(id=497f6eca-6276-4993-bfeb-53cbbbba6f08) |
sort | string This parameter sort a resource collection based on the specified attributes. The parameter value is a comma-separated string of attribute names, each optionally followed by a colon and "asc" or "desc". Specify "asc" for ascending and "desc" for descending. For example, ?sort=created_at asc,updated_at desc |
offset | integer >= 0 Default: 0 Used to define the starting position of the item collection. If offset exceeds the item count then no items are returned. |
limit | integer >= 1 Default: 10 This parameter restricts the number of items returned inside the collection. If the limit exceeds the item count then the server will only return the available items. |
total_count | boolean Default: false The item collection representation will include the "estimated row count" when "?total_count=true", otherwise the total_count is not included. |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Responses
Response samples
- 200
- 400
- 401
- 403
- 405
- 429
- 500
- 501
- 503
{- "total_count": 0,
- "count": 0,
- "has_more": true,
- "limit": 0,
- "offset": 10,
- "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "name": "users",
- "description": "string",
- "metadata": {
- "enabled": true
}, - "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z",
- "aggregations": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "table_id": "ac92386a-00cc-4818-bf43-1a666d5a5e67",
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "columns": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "id",
- "type": "string",
- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}, - "builtin": true,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "rows": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
], - "indexes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "secondary_index",
- "type": "key",
- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}, - "builtin": true,
- "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
]
}
Create Table
Create Table
Authorizations:
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Request Body schema: application/json
Create Table
name required | string (table_name) Table Name |
description | string Table Description |
object (table_metadata) Table Metadata |
Responses
Request samples
- Payload
{- "name": "users",
- "description": "All users",
- "metadata": {
- "enabled": true
}
}
Response samples
- 201
- 400
- 401
- 403
- 405
- 409
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "name": "users",
- "description": "string",
- "metadata": {
- "enabled": true
}, - "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z",
- "aggregations": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "table_id": "ac92386a-00cc-4818-bf43-1a666d5a5e67",
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "columns": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "id",
- "type": "string",
- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}, - "builtin": true,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "rows": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
], - "indexes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "secondary_index",
- "type": "key",
- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}, - "builtin": true,
- "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
Get Table
Retrieve table details.
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "name": "users",
- "description": "string",
- "metadata": {
- "enabled": true
}, - "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z",
- "aggregations": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "table_id": "ac92386a-00cc-4818-bf43-1a666d5a5e67",
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "columns": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "id",
- "type": "string",
- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}, - "builtin": true,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "rows": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
], - "indexes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "secondary_index",
- "type": "key",
- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}, - "builtin": true,
- "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
Update Table
Update Table
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Request Body schema: application/json
Update Table
description | string Table Description |
object (table_metadata) Table Metadata |
Responses
Request samples
- Payload
{- "description": "All users",
- "metadata": {
- "enabled": true
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 409
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "name": "users",
- "description": "string",
- "metadata": {
- "enabled": true
}, - "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z",
- "aggregations": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "table_id": "ac92386a-00cc-4818-bf43-1a666d5a5e67",
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "columns": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "id",
- "type": "string",
- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}, - "builtin": true,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "rows": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
], - "indexes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "secondary_index",
- "type": "key",
- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}, - "builtin": true,
- "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
Delete Table
Delete Table
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Responses
Response samples
- 400
- 401
- 403
- 404
- 405
- 429
- 500
- 501
- 503
{- "code": "invalid_request",
- "message": "Invalid `fields` parameter. See https://developer.aircampi.com/api/query-fields"
}
Truncate Table
Truncate Table
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Responses
Response samples
- 400
- 401
- 403
- 405
- 429
- 500
- 501
- 503
{- "code": "invalid_request",
- "message": "Invalid `fields` parameter. See https://developer.aircampi.com/api/query-fields"
}
Rename Table
Rename Table
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Request Body schema: application/json
Rename Table
new_name | string (table_name) Table Name |
Responses
Request samples
- Payload
{- "new_name": "renamed_table"
}
Response samples
- 400
- 401
- 403
- 405
- 409
- 429
- 500
- 501
- 503
{- "code": "invalid_request",
- "message": "Invalid `fields` parameter. See https://developer.aircampi.com/api/query-fields"
}
Columns are used to define the structure of your data and help the Aircampi API validate your users' input. Add your first column by clicking the Add column button.
You can choose between the following types:
- string
- number
- boolean
- date
- datetime
- reference
- geopoint
- array
- json
- file
Get Columns
Retrieve filtered list of columns.
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
q | string This query parameter defines the where clause. Example: ?q=(id=497f6eca-6276-4993-bfeb-53cbbbba6f08) |
sort | string This parameter sort a resource collection based on the specified attributes. The parameter value is a comma-separated string of attribute names, each optionally followed by a colon and "asc" or "desc". Specify "asc" for ascending and "desc" for descending. For example, ?sort=created_at asc,updated_at desc |
offset | integer >= 0 Default: 0 Used to define the starting position of the item collection. If offset exceeds the item count then no items are returned. |
limit | integer >= 1 Default: 10 This parameter restricts the number of items returned inside the collection. If the limit exceeds the item count then the server will only return the available items. |
total_count | boolean Default: false The item collection representation will include the "estimated row count" when "?total_count=true", otherwise the total_count is not included. |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Responses
Response samples
- 200
- 400
- 401
- 403
- 405
- 429
- 500
- 501
- 503
{- "total_count": 0,
- "count": 0,
- "has_more": true,
- "limit": 0,
- "offset": 10,
- "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "id",
- "type": "string",
- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}, - "builtin": true,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
Create Column
Create Column
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Request Body schema: application/json
Create Column
name required | string (column_name) Column Name |
type required | string (column_type) Enum: "string" "number" "boolean" "date" "datetime" "reference" "geopoint" "array" "object" "file" Column Type |
description | string (column_description) Column Description |
object (column_metadata) Column Metadata |
Responses
Request samples
- Payload
{- "name": "id",
- "type": "string",
- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}
}
Response samples
- 201
- 400
- 401
- 403
- 405
- 409
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "id",
- "type": "string",
- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}, - "builtin": true,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
Get Column
Retrieve column details.
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
column required | string (column_name) Example: id Column Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "id",
- "type": "string",
- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}, - "builtin": true,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
Update Column
Update Column
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
column required | string (column_name) Example: id Column Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Request Body schema: application/json
Update Column
description | string (column_description) Column Description |
object (column_metadata) Column Metadata |
Responses
Request samples
- Payload
{- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 409
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "id",
- "type": "string",
- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}, - "builtin": true,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
Delete Column
Delete Column
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
column required | string (column_name) Example: id Column Name |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Responses
Response samples
- 400
- 401
- 403
- 404
- 405
- 429
- 500
- 501
- 503
{- "code": "invalid_request",
- "message": "Invalid `fields` parameter. See https://developer.aircampi.com/api/query-fields"
}
Rename Column
Rename Column
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
column required | string (column_name) Example: id Column Name |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Request Body schema: application/json
Rename Column
new_name | string (column_name) Column Name |
Responses
Request samples
- Payload
{- "new_name": "renamed_column"
}
Response samples
- 400
- 401
- 403
- 405
- 409
- 429
- 500
- 501
- 503
{- "code": "invalid_request",
- "message": "Invalid `fields` parameter. See https://developer.aircampi.com/api/query-fields"
}
Storing data through the Database API is built around a JSON encoding of the object’s data. This data's structure depends on column.
Get Rows
Retrieve filtered list of rows.
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
q | string This query parameter defines the where clause. Example: ?q=(id=497f6eca-6276-4993-bfeb-53cbbbba6f08) |
sort | string This parameter sort a resource collection based on the specified attributes. The parameter value is a comma-separated string of attribute names, each optionally followed by a colon and "asc" or "desc". Specify "asc" for ascending and "desc" for descending. For example, ?sort=created_at asc,updated_at desc |
offset | integer >= 0 Default: 0 Used to define the starting position of the item collection. If offset exceeds the item count then no items are returned. |
limit | integer >= 1 Default: 10 This parameter restricts the number of items returned inside the collection. If the limit exceeds the item count then the server will only return the available items. |
total_count | boolean Default: false The item collection representation will include the "estimated row count" when "?total_count=true", otherwise the total_count is not included. |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Responses
Response samples
- 200
- 400
- 401
- 403
- 405
- 429
- 500
- 501
- 503
{- "total_count": 0,
- "count": 0,
- "has_more": true,
- "limit": 0,
- "offset": 10,
- "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
]
}
Create Row
Create Row
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Request Body schema: application/json
Create Row
user_name | string
|
user_age | number
|
is_admin | boolean
|
date_of_birth | string <date>
|
last_login_at | string <date-time>
|
interests | Array of strings
|
object
|
Responses
Request samples
- Payload
{- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
Response samples
- 201
- 400
- 401
- 403
- 405
- 409
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
Get Row
Retrieve row details.
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
row_id required | string <uuid> (row_id) Row Id |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
Update Row
Update Row
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
row_id required | string <uuid> (row_id) Row Id |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Request Body schema: application/json
Update Row
user_name | string
|
user_age | number
|
is_admin | boolean
|
date_of_birth | string <date>
|
last_login_at | string <date-time>
|
interests | Array of strings
|
object
|
Responses
Request samples
- Payload
{- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 409
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
Delete Row
Delete Row
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
row_id required | string <uuid> (row_id) Row Id |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Responses
Response samples
- 400
- 401
- 403
- 404
- 405
- 429
- 500
- 501
- 503
{- "code": "invalid_request",
- "message": "Invalid `fields` parameter. See https://developer.aircampi.com/api/query-fields"
}
Indexes are used by Databases to quickly locate data without having to search through every data for results. To ensure the best performance, Aircampi Database requires an index for every query.
You can create an index by navigating to the Indexes tab of your table or by using your favorite Server SDK. If you plan to query multiple columns in a single query, you will need an index with all queried attributes.
Get Indexes
Retrieve filtered list of indexes.
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
q | string This query parameter defines the where clause. Example: ?q=(id=497f6eca-6276-4993-bfeb-53cbbbba6f08) |
sort | string This parameter sort a resource collection based on the specified attributes. The parameter value is a comma-separated string of attribute names, each optionally followed by a colon and "asc" or "desc". Specify "asc" for ascending and "desc" for descending. For example, ?sort=created_at asc,updated_at desc |
offset | integer >= 0 Default: 0 Used to define the starting position of the item collection. If offset exceeds the item count then no items are returned. |
limit | integer >= 1 Default: 10 This parameter restricts the number of items returned inside the collection. If the limit exceeds the item count then the server will only return the available items. |
total_count | boolean Default: false The item collection representation will include the "estimated row count" when "?total_count=true", otherwise the total_count is not included. |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Responses
Response samples
- 200
- 400
- 401
- 403
- 405
- 429
- 500
- 501
- 503
{- "total_count": 0,
- "count": 0,
- "has_more": true,
- "limit": 0,
- "offset": 10,
- "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "secondary_index",
- "type": "key",
- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}, - "builtin": true,
- "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
Create Index
Create Index
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Request Body schema: application/json
Create Index
name required | string (index_name) Index Name |
type required | string (index_type) Enum: "key" "unique" "fulltext" Index Type |
description | string (index_description) Index Description |
object (index_metadata) Index Metadata |
Responses
Request samples
- Payload
{- "name": "secondary_index",
- "type": "key",
- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}
}
Response samples
- 201
- 400
- 401
- 403
- 405
- 409
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "secondary_index",
- "type": "key",
- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}, - "builtin": true,
- "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
Get Index
Retrieve index details.
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
index required | string (index_name) Example: secondary_index Index Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Responses
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "secondary_index",
- "type": "key",
- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}, - "builtin": true,
- "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
Update Index
Update Index
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
index required | string (index_name) Example: secondary_index Index Name |
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Request Body schema: application/json
Update Index
description | string (index_description) Index Description |
object (index_metadata) Index Metadata |
Responses
Request samples
- Payload
{- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 405
- 409
- 429
- 500
- 501
- 503
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "secondary_index",
- "type": "key",
- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}, - "builtin": true,
- "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
Delete Index
Delete Index
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
index required | string (index_name) Example: secondary_index Index Name |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Responses
Response samples
- 400
- 401
- 403
- 404
- 405
- 429
- 500
- 501
- 503
{- "code": "invalid_request",
- "message": "Invalid `fields` parameter. See https://developer.aircampi.com/api/query-fields"
}
Rename Index
Rename Index
Authorizations:
path Parameters
table required | string (table_name) Example: users Table Name |
index required | string (index_name) Example: secondary_index Index Name |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
database required | string (database_name) Example: public Database |
Request Body schema: application/json
Rename Column
new_name | string (column_name) Column Name |
Responses
Request samples
- Payload
{- "new_name": "renamed_column"
}
Response samples
- 400
- 401
- 403
- 405
- 409
- 429
- 500
- 501
- 503
{- "code": "invalid_request",
- "message": "Invalid `fields` parameter. See https://developer.aircampi.com/api/query-fields"
}
Aircampi Database's settings allow you to edit your server setup configuration and customize it. You can easily change the it by changing them when running Aircampi Database.
Get Settings
Get Settings
Authorizations:
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
Responses
Response samples
- 200
- 400
- 401
- 403
- 405
- 429
- 500
- 501
- 503
{- "environment": "development"
}
Update Settings
Update Settings
Authorizations:
query Parameters
fields | string This parameter filters the resource attributes. Only the specified attributes are returned. Format: ?fields=id,name |
expand | string Default: "" When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". Example: ?expand=all |
header Parameters
Authorization required | string (bearer_authorization) Default: Bearer {{access_token}} Access Token |
Request Body schema: application/json
Update Settings
environment | string Default: "development" Enum: "development" "staging" "production" Environment |
Responses
Request samples
- Payload
{- "environment": "development"
}
Response samples
- 200
- 400
- 401
- 403
- 405
- 409
- 429
- 500
- 501
- 503
{- "environment": "development"
}
The Health service is designed to allow you to both validate and monitor that your Aircampi Database's instance and all of its internal components are up and responsive.
This section contains the information about resources for Aircampi Database and their fields, and child resources.
Group of models:
Database Models
Resource Type: Single Resource
Fields:
- name
- description
- metadata
- created_at
- updated_at
Child Resources:
- aggregations
- tables
id | string <uuid> (database_id) Database Unique Identifier (ID) |
name | string (database_name) Database Name |
description | string Database Description |
metadata | object (database_metadata) Database Metadata |
created_by | string <uuid> (user_id) User Id |
created_at | string <date-time> (created_at) Create at date and time |
updated_by | string <uuid> (user_id) User Id |
updated_at | string <date-time> (updated_at) Updated at date and time |
object (database_aggregation) Database Aggregation | |
Array of objects (table) |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "public",
- "description": "Public is a default database",
- "metadata": { },
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z",
- "aggregations": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "tables": 0,
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "tables": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "name": "users",
- "description": "string",
- "metadata": {
- "enabled": true
}, - "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
Resource Type: Collection Resource
total_count | integer (Total Count) The total number of search records that match the query If you send request with query parameter ?total_count=true only. Otherwise the total_count is not included. |
count | integer (Count) The number of items returned in the current range. |
has_more | boolean (HasMore) Indicates whether more resources are available on the server than the subset returned in the response. If the value is true, then there are more resources to retrieve from the server. The default value is false. |
limit | integer (Limit) The actual paging size used by the server. |
offset | integer (Offset) Default: 10 The offset value used in the current page. |
Array of objects (database_expanded) The clients in the collection. |
{- "total_count": 0,
- "count": 0,
- "has_more": true,
- "limit": 0,
- "offset": 10,
- "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "public",
- "description": "Public is a default database",
- "metadata": { },
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z",
- "aggregations": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "tables": 0,
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "tables": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "name": "users",
- "description": "string",
- "metadata": {
- "enabled": true
}, - "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
]
}
Resource Type: Single Resource
Fields:
- database
- tables
- columns
- rows
- indexes
- created_at
- updated_at
Child Resources:
No child resources.
id | string <uuid> (id) Unique Identifier (ID) |
database_id | string <uuid> (database_id) Database Unique Identifier (ID) |
tables | integer Default: 0 Number of Tables |
columns | integer Default: 0 Number of Columns |
rows | integer Default: 0 Number of Rows |
indexes | integer Default: 0 Number of Indexes |
created_by | string <uuid> (user_id) User Id |
created_at | string <date-time> (created_at) Create at date and time |
updated_by | string <uuid> (user_id) User Id |
updated_at | string <date-time> (updated_at) Updated at date and time |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "tables": 0,
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
Table Models
Resource Type: Single Resource
Fields:
- database
- name
- description
- metadata
- created_at
- updated_at
Child Resources:
- aggregations
- columns
- rows
- indexes
id | string <uuid> (table_id) Table Unique Identifier (ID) |
database_id | string <uuid> (database_id) Database Unique Identifier (ID) |
name | string (table_name) Table Name |
description | string Table Description |
object (table_metadata) Table Metadata | |
created_date | string <date-time> (created_at) Create at date and time |
updated_date | string <date-time> (updated_at) Updated at date and time |
object (table_aggregation) Table Aggregation | |
Array of objects (column) | |
Array of objects (row) | |
Array of objects (index) |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "name": "users",
- "description": "string",
- "metadata": {
- "enabled": true
}, - "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z",
- "aggregations": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "table_id": "ac92386a-00cc-4818-bf43-1a666d5a5e67",
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "columns": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "id",
- "type": "string",
- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}, - "builtin": true,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "rows": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
], - "indexes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "secondary_index",
- "type": "key",
- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}, - "builtin": true,
- "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
Resource Type: Collection Resource
total_count | integer (Total Count) The total number of search records that match the query If you send request with query parameter ?total_count=true only. Otherwise the total_count is not included. |
count | integer (Count) The number of items returned in the current range. |
has_more | boolean (HasMore) Indicates whether more resources are available on the server than the subset returned in the response. If the value is true, then there are more resources to retrieve from the server. The default value is false. |
limit | integer (Limit) The actual paging size used by the server. |
offset | integer (Offset) Default: 10 The offset value used in the current page. |
Array of objects (table_expanded) The resources in the collection. |
{- "total_count": 0,
- "count": 0,
- "has_more": true,
- "limit": 0,
- "offset": 10,
- "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "database_id": "91088904-0b92-46ad-9240-e1afa0da22df",
- "name": "users",
- "description": "string",
- "metadata": {
- "enabled": true
}, - "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z",
- "aggregations": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "table_id": "ac92386a-00cc-4818-bf43-1a666d5a5e67",
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}, - "columns": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "id",
- "type": "string",
- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}, - "builtin": true,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
], - "rows": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
], - "indexes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "secondary_index",
- "type": "key",
- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}, - "builtin": true,
- "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
]
}
Resource Type: Single Resource
Fields:
- table
- columns
- rows
- indexes
- created_at
- updated_at
Child Resources:
No child resources.
id | string <uuid> (table_id) Table Unique Identifier (ID) |
table_id | string <uuid> (table_id) Table Unique Identifier (ID) |
columns | integer Default: 0 Number of Columns |
rows | integer Default: 0 Number of Rows |
indexes | integer Default: 0 Number of Indexes |
created_by | string <uuid> (user_id) User Id |
created_at | string <date-time> (created_at) Create at date and time |
updated_by | string <uuid> (user_id) User Id |
updated_at | string <date-time> (updated_at) Updated at date and time |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "table_id": "ac92386a-00cc-4818-bf43-1a666d5a5e67",
- "columns": 0,
- "rows": 0,
- "indexes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
Resource Type: Single Resource
Fields:
- table
- name
- type
- description
- metadata
- builtin
- created_at
- updated_at
Child Resources:
No child resources.
id | string <uuid> (column_id) Column Unique Identifier (ID) |
name | string (column_name) Column Name |
type | string (column_type) Enum: "string" "number" "boolean" "date" "datetime" "reference" "geopoint" "array" "object" "file" Column Type |
description | string (column_description) Column Description |
object (column_metadata) Column Metadata | |
builtin | boolean Default: false Built-In Column |
created_by | string <uuid> (user_id) User Id |
created_at | string <date-time> (created_at) Create at date and time |
updated_by | string <uuid> (user_id) User Id |
updated_at | string <date-time> (updated_at) Updated at date and time |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "id",
- "type": "string",
- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}, - "builtin": true,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
Resource Type: Collection Resource
total_count | integer (Total Count) The total number of search records that match the query If you send request with query parameter ?total_count=true only. Otherwise the total_count is not included. |
count | integer (Count) The number of items returned in the current range. |
has_more | boolean (HasMore) Indicates whether more resources are available on the server than the subset returned in the response. If the value is true, then there are more resources to retrieve from the server. The default value is false. |
limit | integer (Limit) The actual paging size used by the server. |
offset | integer (Offset) Default: 10 The offset value used in the current page. |
Array of objects (column) The table's columns in the collection. |
{- "total_count": 0,
- "count": 0,
- "has_more": true,
- "limit": 0,
- "offset": 10,
- "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "id",
- "type": "string",
- "description": "Unique Identifier (ID)",
- "metadata": {
- "required": false,
- "enabled": true
}, - "builtin": true,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe",
- "updated_at": "2019-08-24T14:15:22Z"
}
]
}
Resource Type: Single Resource
Fields:
- id
builtin
- created_at
builtin
- updated_at
builtin
- Custom fields depends on table columns
Child Resources:
No child resources.
id | string <uuid> (row_id) Row Unique Identifier (ID). It is builtin. System will automatically generate new uuid when new row inserted. It's never updated. |
created_at | string <date-time> (row_created_at) Create at date and time. It is builtin. System will automatically set current date and time when new row inserted. It's never updated. |
updated_at | string <date-time> (row_updated_at) Updated at date and time. It is builtin. System will automatically set current date and time when new row inserted. It will be updated automatically when row is updated. |
user_name | string
|
user_age | number
|
is_admin | boolean
|
date_of_birth | string <date>
|
last_login_at | string <date-time>
|
interests | Array of strings
|
object
|
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
Resource Type: Collection Resource
total_count | integer (Total Count) The total number of search records that match the query If you send request with query parameter ?total_count=true only. Otherwise the total_count is not included. |
count | integer (Count) The number of items returned in the current range. |
has_more | boolean (HasMore) Indicates whether more resources are available on the server than the subset returned in the response. If the value is true, then there are more resources to retrieve from the server. The default value is false. |
limit | integer (Limit) The actual paging size used by the server. |
offset | integer (Offset) Default: 10 The offset value used in the current page. |
Array of objects (row) The table's rows in the collection. |
{- "total_count": 0,
- "count": 0,
- "has_more": true,
- "limit": 0,
- "offset": 10,
- "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "user_name": "Bayaraa Joe",
- "user_age": 13,
- "is_admin": true,
- "date_of_birth": "2019-08-24",
- "last_login_at": "2019-08-24T14:15:22Z",
- "interests": [
- "basketball",
- "fishing",
- "hiking"
], - "user_settings": {
- "language": "Mongolian",
- "theme": "Dark"
}
}
]
}
Resource Type: Single Resource
Fields:
- table
- name
- type
- description
- columns
- metadata
- builtin
- created_at
- updated_at
Child Resources:
No child resources.
id | string <uuid> (index_id) Index Unique Identifier (ID) |
name | string (index_name) Index Name |
type | string (index_type) Enum: "key" "unique" "fulltext" Index Type |
description | string (index_description) Index Description |
object (index_metadata) Index Metadata | |
builtin | boolean Default: false Built-in Index |
created_date | string <date-time> (created_at) Create at date and time |
updated_date | string <date-time> (updated_at) Updated at date and time |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "secondary_index",
- "type": "key",
- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}, - "builtin": true,
- "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
Resource Type: Collection Resource
total_count | integer (Total Count) The total number of search records that match the query If you send request with query parameter ?total_count=true only. Otherwise the total_count is not included. |
count | integer (Count) The number of items returned in the current range. |
has_more | boolean (HasMore) Indicates whether more resources are available on the server than the subset returned in the response. If the value is true, then there are more resources to retrieve from the server. The default value is false. |
limit | integer (Limit) The actual paging size used by the server. |
offset | integer (Offset) Default: 10 The offset value used in the current page. |
Array of objects (index) The indexes in the collection. |
{- "total_count": 0,
- "count": 0,
- "has_more": true,
- "limit": 0,
- "offset": 10,
- "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "secondary_index",
- "type": "key",
- "description": "PK index for id column",
- "metadata": {
- "columns": [
- "id"
]
}, - "builtin": true,
- "created_date": "2019-08-24T14:15:22Z",
- "updated_date": "2019-08-24T14:15:22Z"
}
]
}
Settings Models
Resource Type: Single Resource
Fields:
- id
- created_at
- updated_at
Child Resources:
No child resources.
environment | string Default: "development" Enum: "development" "staging" "production" Environment |
{- "environment": "development"
}
Health Check Models
Resource Type: Single Resource
Fields:
- server_name
- server_version
- server_status
- server_description
Child Resources:
No child resources.
server_name | string Name of server |
server_version | string Version of server |
server_status | string Default: "Active" Enum: "Active" "Warning" "Error" Status of server |
server_description | string Description of server |
{- "server_name": "Aircampi Database",
- "server_version": "0.1.0",
- "server_status": "Active",
- "server_description": "Data Store"
}