SDK reference
Databases
GET/
The org's databases with live status, item count and size from DynamoDB.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/databases' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
A database record and its live table description (keys, indexes, status). table is null when the table was deleted outside the platform.
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
One page of a scan. Pass cursor from the previous page to continue.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/scan' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"index": "example",
"limit": 25,
"cursor": "example"
}'POST/
One page of a query on the table or an index.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/query' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"partition": {}
}'POST/
Strongly consistent read of one item by key.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/items/get' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"key": {}
}'PUT/
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.
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/items' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"item": {}
}'POST/
Deletes items by key.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/items/delete' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"key": {}
}'POST/
Deletes up to 100 items by key (batched). failed counts deletes DynamoDB kept throttling.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/items/batch-delete' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"keys": [
{}
]
}'POST/
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.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/items/import' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"items": [
{}
]
}'POST/
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.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/restore' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example"
}'GET/
The table's recent full exports to S3.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/exports' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
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.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/exports' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"bucketId": "<bucketId>"
}'POST/
Adds a global secondary index. The table answers with status UPDATING while DynamoDB backfills the index.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/indexes' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example",
"partitionKey": {
"name": "Example",
"type": "S"
},
"projection": {
"type": "ALL"
}
}'DELETE/
Removes a global secondary index.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/indexes/{indexName}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Consumed capacity, throttles and latency from CloudWatch.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/metrics' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Time to live, point-in-time recovery, deletion protection, table class and tags.
Parameters and answerscurl 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/settings' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PATCH/
Time to live, point-in-time recovery, deletion protection and table class.
Parameters and answerscurl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}/settings' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"ttl": {
"enabled": true
},
"pitr": true,
"deletionProtection": true
}'DELETE/
Deletes the table and its record. Refused while deletion protection is on.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/databases/{resourceId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"