API
Databases
Browse and edit DynamoDB tables: items, indexes, metrics and settings.
These routes back the database explorer in Cloud. Each one works on a table the organization owns, found by its resource id; reads need resources:read and changes resources:write. See Databases.
Every route below, with its parameters, request and response, errors and samples, is in the API reference.
| Route | What it does |
|---|---|
GET /v1/orgs/:orgId/databases | The org's databases with live status, item count and size from DynamoDB. |
GET /v1/orgs/:orgId/databases/:resourceId | A database record and its live table description (keys, indexes, status). table is null when the table was deleted outside the platform. |
POST /v1/orgs/:orgId/databases/:resourceId/scan | One page of a scan. Pass cursor from the previous page to continue. |
POST /v1/orgs/:orgId/databases/:resourceId/query | One page of a query on the table or an index. |
POST /v1/orgs/:orgId/databases/:resourceId/items/get | Strongly consistent read of one item by key. |
PUT /v1/orgs/:orgId/databases/:resourceId/items | Writes an item. With originalKey, replaces that item (a key change moves it); with expected, the write fails with 409 if the item changed since it was read. |
POST /v1/orgs/:orgId/databases/:resourceId/items/delete | Deletes items by key. |
POST /v1/orgs/:orgId/databases/:resourceId/items/batch-delete | Deletes up to 100 items by key (batched). failed counts deletes DynamoDB kept throttling. |
POST /v1/orgs/:orgId/databases/:resourceId/items/import | Imports up to 100 items (typed DynamoDB JSON). overwrite replaces items with the same key; skip keeps existing ones. Nothing is written if any item is invalid. |
POST /v1/orgs/:orgId/databases/:resourceId/restore | Restores the table as it was at time (epoch ms; default the latest restorable time) into a new database named name. Needs point-in-time recovery; the new table takes minutes or longer to appear. |
GET /v1/orgs/:orgId/databases/:resourceId/exports | The table's recent full exports to S3. |
POST /v1/orgs/:orgId/databases/:resourceId/exports | Exports the whole table (DynamoDB JSON, gzipped) into one of the organization's buckets under prefix. Needs point-in-time recovery; large tables take a while. |
POST /v1/orgs/:orgId/databases/:resourceId/indexes | Adds a global secondary index. The table answers with status UPDATING while DynamoDB backfills the index. |
DELETE /v1/orgs/:orgId/databases/:resourceId/indexes/:indexName | Removes a global secondary index. |
GET /v1/orgs/:orgId/databases/:resourceId/metrics | Consumed capacity, throttles and latency from CloudWatch. |
GET /v1/orgs/:orgId/databases/:resourceId/settings | Time to live, point-in-time recovery, deletion protection, table class and tags. |
PATCH /v1/orgs/:orgId/databases/:resourceId/settings | Time to live, point-in-time recovery, deletion protection and table class. |
PATCH /v1/orgs/:orgId/databases/:resourceId/tags | Adds, changes or removes the table's own tags. si: tags are the platform's and can't be changed. |
DELETE /v1/orgs/:orgId/databases/:resourceId | Deletes the table and its record. Refused while deletion protection is on. |