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.

RouteWhat it does
GET /v1/orgs/:orgId/databasesThe org's databases with live status, item count and size from DynamoDB.
GET /v1/orgs/:orgId/databases/:resourceIdA 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/scanOne page of a scan. Pass cursor from the previous page to continue.
POST /v1/orgs/:orgId/databases/:resourceId/queryOne page of a query on the table or an index.
POST /v1/orgs/:orgId/databases/:resourceId/items/getStrongly consistent read of one item by key.
PUT /v1/orgs/:orgId/databases/:resourceId/itemsWrites 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/deleteDeletes items by key.
POST /v1/orgs/:orgId/databases/:resourceId/items/batch-deleteDeletes up to 100 items by key (batched). failed counts deletes DynamoDB kept throttling.
POST /v1/orgs/:orgId/databases/:resourceId/items/importImports 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/restoreRestores 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/exportsThe table's recent full exports to S3.
POST /v1/orgs/:orgId/databases/:resourceId/exportsExports 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/indexesAdds a global secondary index. The table answers with status UPDATING while DynamoDB backfills the index.
DELETE /v1/orgs/:orgId/databases/:resourceId/indexes/:indexNameRemoves a global secondary index.
GET /v1/orgs/:orgId/databases/:resourceId/metricsConsumed capacity, throttles and latency from CloudWatch.
GET /v1/orgs/:orgId/databases/:resourceId/settingsTime to live, point-in-time recovery, deletion protection, table class and tags.
PATCH /v1/orgs/:orgId/databases/:resourceId/settingsTime to live, point-in-time recovery, deletion protection and table class.
PATCH /v1/orgs/:orgId/databases/:resourceId/tagsAdds, changes or removes the table's own tags. si: tags are the platform's and can't be changed.
DELETE /v1/orgs/:orgId/databases/:resourceIdDeletes the table and its record. Refused while deletion protection is on.