JSON API Documentation
It is not officially supported yet and might change without notice at any time. USE AT YOUR OWN RISK!
Table of Contents
- GET /api/dbs
- POST /api/dbs
- DELETE /api/dbs/:dbId
- GET /api/dbs/:dbId
- PATCH /api/dbs/:dbId
- GET /api/dbs/:dbId/apps
- GET /api/dbs/:dbId/azimutt-schema
- POST /api/dbs/:dbId/charts
- DELETE /api/dbs/:dbId/charts/:chartId
- PATCH /api/dbs/:dbId/charts/:chartId
- GET /api/dbs/:dbId/dashboards
- POST /api/dbs/:dbId/dashboards
- DELETE /api/dbs/:dbId/dashboards/:dashboardId
- PATCH /api/dbs/:dbId/dashboards/:dashboardId
- GET /api/dbs/:dbId/env
- POST /api/dbs/:dbId/env
- DELETE /api/dbs/:dbId/env/:varName
- PATCH /api/dbs/:dbId/env/:varName
- GET /api/dbs/:dbId/functions
- POST /api/dbs/:dbId/functions
- DELETE /api/dbs/:dbId/functions/:funcId
- GET /api/dbs/:dbId/functions/:funcId
- PATCH /api/dbs/:dbId/functions/:funcId
- GET /api/dbs/:dbId/functions/:funcId/invocations
- POST /api/dbs/:dbId/functions/:funcId/republish
- GET /api/dbs/:dbId/functions/:funcId/versions/:versionId
- POST /api/dbs/:dbId/prompt
- POST /api/dbs/:dbId/prompt/describe-database
- POST /api/dbs/:dbId/prompt/describe-function
- POST /api/dbs/:dbId/prompt/describe-table
- GET /api/dbs/:dbId/schema
- GET /api/dbs/:dbId/settings
- PATCH /api/dbs/:dbId/settings
- GET /api/dbs/:dbId/tables/:id
- PATCH /api/dbs/:dbId/tables/:id
- PUT /api/dbs/:dbId/tables/:id
- DELETE /api/dbs/:dbId/tables/:id/columns/:id
- PATCH /api/dbs/:dbId/tables/:id/columns/:id
- PUT /api/dbs/:dbId/tables/:id/columns/:id
- GET /api/dbs/:dbId/tables/:id/export
- GET /api/dbs/:dbId/tables/:id/search/:searchTerm
- DELETE /api/dbs/:dbId/tables/:tableId
- GET /api/dbs/:dbId/tables/:tableId/columns/:columnName/files/:primaryKey/:equalsValue
- PUT /api/dbs/:dbId/tables/:tableId/columns/:columnName/files/:primaryKey/:equalsValue
- POST /api/dbs/:dbId/vacuum
- GET /api/dbs/:id/charts
- GET /api/docs
- POST /api/events/paddle
- POST /api/login
- POST /api/logout
- POST /api/prompt/create-database
- GET /api/settings
- PATCH /api/settings
- GET /api/settings/env
- POST /api/settings/env
- DELETE /api/settings/env/:varName
- PATCH /api/settings/env/:varName
- GET /api/status
- DELETE /api/teams/:teamName
- GET /api/teams/:teamName
- PATCH /api/teams/:teamName
- GET /api/teams/:teamName/members
- DELETE /api/teams/:teamName/members/:username
- PATCH /api/teams/:teamName/members/:username
- GET /api/teams/:teamName/tokens
- POST /api/tokens
- DELETE /api/tokens/:tokenId
- GET /api/tokens/:tokenId
- PATCH /api/tokens/:tokenId
- POST /api/users
- GET /api/users/:username
- POST /api/users/invite
- POST /api/users/reset-password
- POST /api/users/reset-password/submit
- POST /dbs
- PUT /dbs/:dbId
- GET /dbs/:dbId/apps/:appId
- GET /dbs/:dbId/download
- GET /dbs/:dbId/duplicate
- GET /dbs/:dbId/graphql
- POST /dbs/:dbId/graphql
- GET /dbs/:dbId/playground/default-query
- GET /dbs/:dbId/regenerate-db-id
- GET /dbs/:dbId/regenerate-readonly-id
- POST /dbs/:dbId/sql
- DELETE /fns/:funcId
- GET /fns/:funcId
- PATCH /fns/:funcId
- POST /fns/:funcId
- PUT /fns/:funcId
- GET /password-reset/:passwordResetKey
- GET /readonly/:readonlyId/duplicate
- GET /readonly/:readonlyId/graphql
- POST /readonly/:readonlyId/graphql
- GET /readonly/:readonlyId/tables/:tableId/columns/:columnName/files/:primaryKey/:equalsValue
- GET /verify-email/:emailVerificationKey
GET /api/dbs
Response
Example Response Body
{ "databases": [ { "auditing": false, "createdUtc": "2023-02-15T10:22:06.487Z", "description": "This is a description of the database.", "environment": "Staging", "fileFormat": "sqlite", "fileName": "database.sqlite", "id": "01gd0anjtp0mex97a23s8s63j9", "lastModifiedUtc": "2023-03-11T14:56:17.198Z", "location": { "lat": 50, "long": 40, "name": "City X" }, "owner": "johns-team", "readonlyId": "mfbqyg17y98vq", "schemaLocked": false, "schemaVersion": 0, "size": 123, "tables": [], "userVersion": 0, "viewsTab": false, "visibility": "public" } ], "numberOfDatabases": 1 }
POST /api/dbs
Request
Example Request Body
{ "fileFormat": "csv", "name": "Example Database", "query": "CREATE TABLE users (name TEXT, email TEXT)", "team": "example-team" }
Response
Example Response Body
{ "id": "example-database-wqaldslkjfvlbdxqwehfhj", "ownerName": "some-user", "ownershipUtc": "2023-03-11T14:56:17.198Z" }
DELETE /api/dbs/:dbId
:dbId
- ID of the database to be served
Response
Example Response Body
{}
GET /api/dbs/:dbId
:dbId
- ID of the database to be served
Response
Example Response Body
{ "auditing": false, "createdUtc": "2023-02-15T10:22:06.487Z", "description": "This is a description of the database.", "environment": "Staging", "fileFormat": "sqlite", "fileName": "database.sqlite", "id": "01gd0anjtp0mex97a23s8s63j9", "lastModifiedUtc": "2023-03-11T14:56:17.198Z", "location": { "lat": 50, "long": 40, "name": "City X" }, "owner": "johns-team", "readonlyId": "mfbqyg17y98vq", "schemaLocked": false, "schemaVersion": 0, "size": 123, "tables": [], "userVersion": 0, "viewsTab": false, "visibility": "public" }
PATCH /api/dbs/:dbId
:dbId
- ID of the database to be served
Request
Example Request Body
{ "description": "New Database Description", "name": "New Database Name", "owner": { "contents": "johns-team", "tag": "TextValue" } }
Response
Example Response Body
{}
GET /api/dbs/:dbId/apps
:dbId
- ID of the database to be served
Response
Example Response Body
{ "apps": [] }
GET /api/dbs/:dbId/azimutt-schema
:dbId
- ID of the database to be served
Response
Example Response Body
{ "relations": [], "tables": [ { "checks": [ { "columns": [ "id" ], "name": "id_check", "predicate": "id IS 0" } ], "columns": [ { "columns": [], "comment": null, "default": null, "name": "id", "nullable": false, "type": "TEXT" } ], "comment": "table storing todos", "primaryKey": { "columns": [ "id" ], "name": "id" }, "schema": "public", "table": "todos", "uniques": [ { "columns": [ "id" ], "definition": "(id)", "name": "id_unique" } ], "view": false } ] }
POST /api/dbs/:dbId/charts
:dbId
- ID of the database to be served
Request
Example Request Body
{ "chartType": "BarChart", "headers": [], "hideNullValues": false, "labelRotation": 30, "table": "users", "title": "Example Chart" }
Response
Example Response Body
{ "chartType": "BarChart", "headers": [], "hideNullValues": false, "labelRotation": 30, "table": "users", "title": "Example Chart", "ulid": "01gdbtepbmpt3jk8y94yc05snr" }
DELETE /api/dbs/:dbId/charts/:chartId
:dbId
- ID of the database to be served
:chartId
- ID of the chart
Response
Example Response Body
{}
PATCH /api/dbs/:dbId/charts/:chartId
:dbId
- ID of the database to be served
:chartId
- ID of the chart
Request
Example Request Body
{ "chartType": "BarChart", "headers": [], "hideNullValues": false, "labelRotation": 30, "table": "users", "title": "Example Chart" }
Response
Example Response Body
{}
GET /api/dbs/:dbId/dashboards
:dbId
- ID of the database to be served
Response
Example Response Body
{ "dashboards": [] }
POST /api/dbs/:dbId/dashboards
:dbId
- ID of the database to be served
Request
Example Request Body
{ "charts": [], "title": "Example Dashboard" }
Response
Example Response Body
{ "charts": [], "title": "Example Dashboard", "ulid": "01gd08ghjpx1vzzwdrp3pfcjh1" }
DELETE /api/dbs/:dbId/dashboards/:dashboardId
:dbId
- ID of the database to be served
:dashboardId
- ID of the dashboard to be served
Response
Example Response Body
{}
PATCH /api/dbs/:dbId/dashboards/:dashboardId
:dbId
- ID of the database to be served
:dashboardId
- ID of the dashboard to be served
Request
Example Request Body
{ "charts": [], "title": "Example Dashboard" }
Response
Example Response Body
{}
GET /api/dbs/:dbId/env
:dbId
- ID of the database to be served
Response
Example Response Body
{ "envVars": [ { "created_utc": "2022-01-01T00:00:00Z", "name": "ENVIRONMENT", "value": "production" } ] }
POST /api/dbs/:dbId/env
:dbId
- ID of the database to be served
Request
Example Request Body
{ "name": "ENVIRONMENT", "value": "development" }
Response
Example Response Body
{ "created_utc": "2022-01-01T00:00:00Z", "name": "ENVIRONMENT", "value": "production" }
DELETE /api/dbs/:dbId/env/:varName
:dbId
- ID of the database to be served
:varName
- Name of the environment variable to modify
Response
Example Response Body
{}
PATCH /api/dbs/:dbId/env/:varName
:dbId
- ID of the database to be served
:varName
- Name of the environment variable to modify
Request
Example Request Body
{ "name": "ENVIRONMENT", "value": "development" }
Response
Example Response Body
{}
GET /api/dbs/:dbId/functions
:dbId
- ID of the database to be served
Response
Example Response Body
{ "functions": [] }
POST /api/dbs/:dbId/functions
:dbId
- ID of the database to be served
Request
Example Request Body
{ "content": "export default function() { \n console.info(\"Hello World!\") \n}", "description": "This is an awesome function", "name": "Awesome Function", "runtime": "deno" }
Response
Example Response Body
{ "content": null, "description": null, "diagnostics": null, "id": "01grkhvbtwgmchjfbxnqg6gxxg", "name": "Awesome Function", "runtime": "deno", "versions": [ "01grkhvhzm0vszqbrcvhb0bwad" ] }
DELETE /api/dbs/:dbId/functions/:funcId
:dbId
- ID of the database to be served
:funcId
- ID of the function
Response
Example Response Body
{}
GET /api/dbs/:dbId/functions/:funcId
:dbId
- ID of the database to be served
:funcId
- ID of the function
Response
Example Response Body
{ "content": null, "description": null, "diagnostics": null, "id": "01grkhvbtwgmchjfbxnqg6gxxg", "name": "Awesome Function", "runtime": "deno", "versions": [ "01grkhvhzm0vszqbrcvhb0bwad" ] }
PATCH /api/dbs/:dbId/functions/:funcId
:dbId
- ID of the database to be served
:funcId
- ID of the function
Request
Example Request Body
{ "content": "export default function() { \n console.info(\"Hello World!\") \n}", "description": "This is an awesome function", "name": "Awesome Function", "runtime": "deno" }
Response
Example Response Body
{ "diagnostics": [], "id": "01hh1wcq83r49v3t3wss8z9t7k" }
GET /api/dbs/:dbId/functions/:funcId/invocations
:dbId
- ID of the database to be served
:funcId
- ID of the function
Response
Example Response Body
{ "invocations": [ { "createdUtc": "2023-02-15T10:22:06.487Z", "data": "null", "logs": [ { "message": "Hello world ^-^", "stream": "stdout", "utc": "2023-02-15T10:22:06.487Z" } ], "runtimeMs": 3.2 } ] }
POST /api/dbs/:dbId/functions/:funcId/republish
:dbId
- ID of the database to be served
:funcId
- ID of the function
Request
Example Request Body
{ "runtime": "deno", "version": "my-old-but-awesome-function-version-id" }
Response
Example Response Body
{ "diagnostics": [], "id": "01hh1wcq83r49v3t3wss8z9t7k" }
GET /api/dbs/:dbId/functions/:funcId/versions/:versionId
:dbId
- ID of the database to be served
:funcId
- ID of the function
:versionId
- ID of the function version
Response
Example Response Body
{ "content": null, "description": null, "diagnostics": null, "id": "01grkhvbtwgmchjfbxnqg6gxxg", "name": "Awesome Function", "runtime": "deno", "versions": [ "01grkhvhzm0vszqbrcvhb0bwad" ] }
POST /api/dbs/:dbId/prompt
:dbId
- ID of the database to be served
Request
Example Request Body
{ "funcId": "01hg5j9esf8xvwvrjej58feybn", "prompt": "Insert a new user", "tableName": null }
Response
Example Response Body
{}
POST /api/dbs/:dbId/prompt/describe-database
:dbId
- ID of the database to be served
Request
Example Request Body
{ "funcId": "01hg5j9esf8xvwvrjej58feybn", "prompt": "Insert a new user", "tableName": null }
Response
Example Response Body
{}
POST /api/dbs/:dbId/prompt/describe-function
:dbId
- ID of the database to be served
Request
Example Request Body
{ "funcId": "01hg5j9esf8xvwvrjej58feybn", "prompt": "Insert a new user", "tableName": null }
Response
Example Response Body
{}
POST /api/dbs/:dbId/prompt/describe-table
:dbId
- ID of the database to be served
Request
Example Request Body
{ "funcId": "01hg5j9esf8xvwvrjej58feybn", "prompt": "Insert a new user", "tableName": null }
Response
Example Response Body
{}
GET /api/dbs/:dbId/schema
:dbId
- ID of the database to be served
Response
Example Response Body
text/plain;charset=utf-8
GET /api/dbs/:dbId/settings
:dbId
- ID of the database to be served
Response
Example Response Body
{}
PATCH /api/dbs/:dbId/settings
:dbId
- ID of the database to be served
Request
Example Request Body
{ "auditing": true, "envVars": [ { "name": "HELLO", "value": "world" } ], "environment": { "contents": "production", "tag": "TextValue" }, "schemaLocked": false, "viewsTab": true, "visibility": "public" }
Response
Example Response Body
{}
GET /api/dbs/:dbId/tables/:id
:dbId
- ID of the database to be served
:id
- ID of the object
Response
Example Response Body
{ "columns": [], "description": null, "maxCellLimitReached": false, "name": "Example Table", "numberOfRows": 0, "rowidColumnName": "rowid", "tableType": "Table" }
PATCH /api/dbs/:dbId/tables/:id
:dbId
- ID of the database to be served
:id
- ID of the object
Request
Example Request Body
{ "after": "existing_table", "description": "New Table Description", "name": "New Table Name" }
Response
Example Response Body
{}
PUT /api/dbs/:dbId/tables/:id
:dbId
- ID of the database to be served
:id
- ID of the object
Request
Example Request Body
{}
Response
Example Response Body
{ "columns": [], "description": null, "maxCellLimitReached": false, "name": "Example Table", "numberOfRows": 0, "rowidColumnName": "rowid", "tableType": "Table" }
DELETE /api/dbs/:dbId/tables/:id/columns/:id
:dbId
- ID of the database to be served
:id
- ID of the object
:id
- ID of the object
Response
Example Response Body
{}
PATCH /api/dbs/:dbId/tables/:id/columns/:id
:dbId
- ID of the database to be served
:id
- ID of the object
:id
- ID of the object
Request
Example Request Body
{}
Response
Example Response Body
{}
PUT /api/dbs/:dbId/tables/:id/columns/:id
:dbId
- ID of the database to be served
:id
- ID of the object
:id
- ID of the object
Request
Example Request Body
{}
Response
Example Response Body
{ "gqlDataType": null, "inputElement": "InputText", "isGenerated": false, "isNonNull": false, "isOmittable": false, "isPrimaryKey": false, "isUnique": false, "items": null, "name": "", "sqliteDataType": "TEXT", "validations": null }
GET /api/dbs/:dbId/tables/:id/export
:dbId
- ID of the database to be served
:id
- ID of the object
Response
Example Response Body
""
GET /api/dbs/:dbId/tables/:id/search/:searchTerm
:dbId
- ID of the database to be served
:id
- ID of the object
:searchTerm
- Value to fuzzy find inside table
Response
Example Response Body
{ "columns": [], "description": null, "maxCellLimitReached": false, "name": "Example Table", "numberOfRows": 0, "rowidColumnName": "rowid", "tableType": "Table" }
DELETE /api/dbs/:dbId/tables/:tableId
:dbId
- ID of the database to be served
:tableId
- Name of table
Request
Example Request Body
{}
Response
Example Response Body
{}
GET /api/dbs/:dbId/tables/:tableId/columns/:columnName/files/:primaryKey/:equalsValue
:dbId
- ID of the database to be served
:tableId
- Name of table
:columnName
- Name of column
:primaryKey
- Name of primary key column
:equalsValue
- Value to compare primary key to
Response
Example Response Body
PUT /api/dbs/:dbId/tables/:tableId/columns/:columnName/files/:primaryKey/:equalsValue
Multipart Request SamplesThis endpoint takes `multipart/form-data` requests. The following is a list of sample requests:
:dbId
- ID of the database to be served
:tableId
- Name of table
:columnName
- Name of column
:primaryKey
- Name of primary key column
:equalsValue
- Value to compare primary key to
[DocNote {_noteTitle = "Multipart Request Samples", _noteBody = ["This endpoint takes `multipart/form-data` requests. The following is a list of sample requests:",""]}]
Response
Example Response Body
{}
POST /api/dbs/:dbId/vacuum
:dbId
- ID of the database to be served
Response
Example Response Body
{}
GET /api/dbs/:id/charts
:id
- ID of the object
Response
Example Response Body
{ "charts": [] }
GET /api/docs
Response
Example Response Body
text/html;charset=utf-8
text/html
POST /api/events/paddle
[DocQueryParam {_paramName = "key", _paramValues = ["2Nug0JwezlPKjMu3PlwwSsLdIo76Ex1P"], _paramDesc = "Key to grant access to endpoint", _paramKind = Normal}]
Request
Example Request Body
application/x-www-form-urlencoded
subscription_id=7& email=john%40example.org& passthrough=Example%20String& status=trialing& checkout_id=6-d9e06ad42f600cc-bccba0a4b7& p_signature=123abc& custom_data=%7B%22airsequel_instance%22%3A%22corp.airsequel.net%22%2C%22airsequel_team_name%22%3A%22cool-team%22%7D& update_url=https%3A%2F%2Fcheckout.paddle.com%2Fsubscription%2Fupdate%3Fuser%3D8%26subscription%3D5%26hash%3D236d383c6f2e68a88d79f3e598f2100ef398b701& unit_price=unit_price& quantity=42& currency=EUR& user_id=2& marketing_consent=1& alert_id=575684& alert_name=subscription_created& event_time=2023-08-06T15%3A33%3A25.859Z& next_bill_date=2023-09-06& source=Checkout& subscription_plan_id=4& linked_subscriptions=8%2C%204%2C%208& cancel_url=https%3A%2F%2Fcheckout.paddle.com%2Fsubscription%2Fcancel%3Fuser%3D5%26subscription%3D2%26hash%3D29242ee38bc43ffd9f00ce51c4d38235faa0c989
Response
Example Response Body
{}
POST /api/login
Request
Example Request Body
{ "password": "test123", "username": "john" }
Response
Example Response Body
{ "sessionToken": "ANnlP4ZQt2CFcaKsCuuGVc0SNNjQ4Ujm", "teams": [ { "billing": null, "name": "Team 1", "numberOfDatabases": 1 } ], "username": "john" }
POST /api/logout
Request
Example Request Body
{}
Response
Example Response Body
{}
POST /api/prompt/create-database
Request
Example Request Body
{ "funcId": "01hg5j9esf8xvwvrjej58feybn", "prompt": "Insert a new user", "tableName": null }
Response
Example Response Body
{}
GET /api/settings
Response
Example Response Body
{}
PATCH /api/settings
Request
Example Request Body
{ "allowedHosts": [ "localhost", "example.org:1234" ], "envVars": [ { "name": "HELLO", "value": "world" } ] }
Response
Example Response Body
{}
GET /api/settings/env
Response
Example Response Body
{ "envVars": [ { "created_utc": "2022-01-01T00:00:00Z", "name": "ENVIRONMENT", "value": "production" } ] }
POST /api/settings/env
Request
Example Request Body
{ "name": "ENVIRONMENT", "value": "development" }
Response
Example Response Body
{ "created_utc": "2022-01-01T00:00:00Z", "name": "ENVIRONMENT", "value": "production" }
DELETE /api/settings/env/:varName
:varName
- Name of the environment variable to modify
Response
Example Response Body
{}
PATCH /api/settings/env/:varName
:varName
- Name of the environment variable to modify
Request
Example Request Body
{ "name": "ENVIRONMENT", "value": "development" }
Response
Example Response Body
{}
GET /api/status
Response
Example Response Body
{}
DELETE /api/teams/:teamName
:teamName
- Name of team
Response
Example Response Body
{}
GET /api/teams/:teamName
:teamName
- Name of team
Response
Example Response Body
{ "billing": { "email_address": "billing@good-corp.com", "plan": null, "subscription_id": 1 }, "created_utc": "2023-05-30T13:30:15.467Z", "databases": [ { "environment": "Testing", "id": "01h2v1ask448h1wdaqdwvd90v9", "name": "App Database", "ownership_utc": "2023-05-30T13:32:46.788Z", "visibility": "private" } ], "name": "good-corp" }
PATCH /api/teams/:teamName
:teamName
- Name of team
Request
Example Request Body
{ "billing_email_address": "john@example.com", "billing_plan": "pro", "billing_subscription_id": 1234567890, "name": "New Team Name" }
Response
Example Response Body
{ "billing": { "email_address": "billing@good-corp.com", "plan": null, "subscription_id": 1 }, "created_utc": "2023-05-30T13:30:15.467Z", "databases": [ { "environment": "Testing", "id": "01h2v1ask448h1wdaqdwvd90v9", "name": "App Database", "ownership_utc": "2023-05-30T13:32:46.788Z", "visibility": "private" } ], "name": "good-corp" }
GET /api/teams/:teamName/members
:teamName
- Name of team
Response
Example Response Body
{}
DELETE /api/teams/:teamName/members/:username
:teamName
- Name of team
:username
- Username of the user
Response
Example Response Body
{}
PATCH /api/teams/:teamName/members/:username
:teamName
- Name of team
:username
- Username of the user
Request
Example Request Body
{ "roles": [ "Admin", "Editor" ] }
Response
Example Response Body
{}
GET /api/teams/:teamName/tokens
:teamName
- Name of team
Response
Example Response Body
{ "tokens": [] }
POST /api/tokens
Request
Example Request Body
{ "description": "Allows cool app to access GraphQL API", "expiration_utc": null, "name": "TokenPost for cool app", "permissions": [ { "db_id": "01h3enjs4aa42a737wpmb31d0f", "name": "read" }, { "db_id": "01h3enjy6vfr6na02sbs8yfqr5", "name": "write" } ], "team_name": "cool-team" }
Response
Example Response Body
{ "body": "ast_BKPda5Dx…", "created_utc": "2023-06-21T09:44:42Z", "description": "Allows cool app to access GraphQL API", "expiration_utc": null, "id": 1, "name": "Token for cool app", "permissions": [ { "db_id": "01h3enjs4aa42a737wpmb31d0f", "db_name": "cool-app-database", "name": "read" }, { "db_id": "01h3enjy6vfr6na02sbs8yfqr5", "db_name": "cool-app-database-2", "name": "write" } ] }
DELETE /api/tokens/:tokenId
:tokenId
- ID of the token
Response
Example Response Body
{}
GET /api/tokens/:tokenId
:tokenId
- ID of the token
Response
Example Response Body
{ "body": "ast_BKPda5Dx…", "created_utc": "2023-06-21T09:44:42Z", "description": "Allows cool app to access GraphQL API", "expiration_utc": null, "id": 1, "name": "Token for cool app", "permissions": [ { "db_id": "01h3enjs4aa42a737wpmb31d0f", "db_name": "cool-app-database", "name": "read" }, { "db_id": "01h3enjy6vfr6na02sbs8yfqr5", "db_name": "cool-app-database-2", "name": "write" } ] }
PATCH /api/tokens/:tokenId
:tokenId
- ID of the token
Request
Example Request Body
{ "description": { "contents": "Allows cool app to access GraphQL API", "tag": "TextValue" }, "expiration_utc": { "tag": "TextNull" }, "name": "TokenPatch for cool app", "team_name": "cool-team" }
Response
Example Response Body
{ "body": "ast_BKPda5Dx…", "created_utc": "2023-06-21T09:44:42Z", "description": "Allows cool app to access GraphQL API", "expiration_utc": null, "id": 1, "name": "Token for cool app", "permissions": [ { "db_id": "01h3enjs4aa42a737wpmb31d0f", "db_name": "cool-app-database", "name": "read" }, { "db_id": "01h3enjy6vfr6na02sbs8yfqr5", "db_name": "cool-app-database-2", "name": "write" } ] }
POST /api/users
Request
Example Request Body
{ "email_address": "john@example.org", "password": "test123", "username": "john" }
Response
Example Response Body
{}
GET /api/users/:username
:username
- Username of the user
Response
Example Response Body
{ "serverRoles": [ "admin" ], "teams": [ { "billing": null, "name": "Team 1", "numberOfDatabases": 1 } ], "username": "john" }
POST /api/users/invite
Request
Example Request Body
{ "email": "joe@example.com" }
Response
Example Response Body
{}
POST /api/users/reset-password
Request
Example Request Body
{ "email": "joe@example.com" }
Response
Example Response Body
{}
POST /api/users/reset-password/submit
Request
Example Request Body
{ "password": "donotusethispassword", "resetKey": "joe@example.com" }
Response
Example Response Body
{}
POST /dbs
Multipart Request SamplesThis endpoint takes `multipart/form-data` requests. The following is a list of sample requests:
[DocNote {_noteTitle = "Multipart Request Samples", _noteBody = ["This endpoint takes `multipart/form-data` requests. The following is a list of sample requests:",""]}]
Response
Example Response Body
{ "id": "example-database-wqaldslkjfvlbdxqwehfhj", "ownerName": "some-user", "ownershipUtc": "2023-03-11T14:56:17.198Z" }
PUT /dbs/:dbId
Multipart Request SamplesThis endpoint takes `multipart/form-data` requests. The following is a list of sample requests:
:dbId
- ID of the database to be served
[DocNote {_noteTitle = "Multipart Request Samples", _noteBody = ["This endpoint takes `multipart/form-data` requests. The following is a list of sample requests:",""]}]
Response
Example Response Body
{ "id": "example-database-wqaldslkjfvlbdxqwehfhj", "ownerName": "some-user", "ownershipUtc": "2023-03-11T14:56:17.198Z" }
GET /dbs/:dbId/apps/:appId
:dbId
- ID of the database to be served
:appId
- ID of the app to be served
Response
Example Response Body
GET /dbs/:dbId/download
:dbId
- ID of the database to be served
Response
Example Response Body
GET /dbs/:dbId/duplicate
:dbId
- ID of the database to be served
Response
Example Response Body
text/html;charset=utf-8
text/html
GET /dbs/:dbId/graphql
:dbId
- ID of the database to be served
Response
Example Response Body
text/html;charset=utf-8
text/html
POST /dbs/:dbId/graphql
:dbId
- ID of the database to be served
Request
Example Request Body
{ "operationName": null, "query": "{ users { name, email } }", "variables": null }
Response
Example Response Body
{}
GET /dbs/:dbId/playground/default-query
:dbId
- ID of the database to be served
Response
Example Response Body
text/plain;charset=utf-8
GET /dbs/:dbId/regenerate-db-id
:dbId
- ID of the database to be served
Response
Example Response Body
text/html;charset=utf-8
text/html
GET /dbs/:dbId/regenerate-readonly-id
:dbId
- ID of the database to be served
Response
Example Response Body
text/html;charset=utf-8
text/html
POST /dbs/:dbId/sql
:dbId
- ID of the database to be served
Request
Example Request Body
{ "query": "SELECT * FROM users" }
Response
Example Response Body
{ "affectedTables": [ "users" ], "errors": [], "rows": [ { "id": 1, "name": "John" }, { "id": 2, "name": "Jane" } ], "runtimeSeconds": 5.0e-2 }
DELETE /fns/:funcId
:funcId
- ID of the function
Request
Example Request Body
{}
Response
Example Response Body
{}
GET /fns/:funcId
:funcId
- ID of the function
Response
Example Response Body
{}
PATCH /fns/:funcId
:funcId
- ID of the function
Request
Example Request Body
{}
Response
Example Response Body
{}
POST /fns/:funcId
:funcId
- ID of the function
Request
Example Request Body
{}
Response
Example Response Body
{}
PUT /fns/:funcId
:funcId
- ID of the function
Request
Example Request Body
{}
Response
Example Response Body
{}
GET /password-reset/:passwordResetKey
:passwordResetKey
- Unique short-lived token used to reset passwords
Response
Example Response Body
text/html;charset=utf-8
text/html
GET /readonly/:readonlyId/duplicate
:readonlyId
- Read-only ID of the database
Response
Example Response Body
text/html;charset=utf-8
text/html
GET /readonly/:readonlyId/graphql
:readonlyId
- Read-only ID of the database
Response
Example Response Body
text/html;charset=utf-8
text/html
POST /readonly/:readonlyId/graphql
:readonlyId
- Read-only ID of the database
Request
Example Request Body
{ "operationName": null, "query": "{ users { name, email } }", "variables": null }
Response
Example Response Body
{}
GET /readonly/:readonlyId/tables/:tableId/columns/:columnName/files/:primaryKey/:equalsValue
:readonlyId
- Read-only ID of the database
:tableId
- Name of table
:columnName
- Name of column
:primaryKey
- Name of primary key column
:equalsValue
- Value to compare primary key to
Response
Example Response Body
GET /verify-email/:emailVerificationKey
:emailVerificationKey
- Unique token to verify email address
Response
Example Response Body
text/html;charset=utf-8
text/html