API reference
Repositories, databases and buckets
/ v1/ orgs/ :orgId/ resourcesLists repositories, databases and buckets, optionally of one type.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scopes
- git:read (with
type=repository), resources:read (with any othertype, or none)
Path parameters
orgIdOrganization id (
org_…).
Query parameters
type"repository" | "database" | "bucket"
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/resources' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 200
{
resources: {
region: string
type: "repository" | "database" | "bucket"
name: string
status?: "error" | "active" | "deleting" | "creating"
createdAt?: number
updatedAt?: number
orgId: string
resourceId: string
createdBy: string
projectId?: string
location: string
arn?: string
physicalName: string
restoredFrom?: string
pendingSetup?: boolean
}[]
}/ v1/ orgs/ :orgId/ resourcesCreates a repository, database or bucket in a location. With projectId, a database or bucket is linked to that Serverless App Service. Databases take an optional key schema (default pk/sk strings; sortKey: null for a partition key only).
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scopes
- git:write (for repositories), resources:write (for databases and buckets)
Path parameters
orgIdOrganization id (
org_…).
Request body
type"repository" | "database" | "bucket"requirednamestringrequiredMatches
^[a-z0-9][a-z0-9-]{1,38}[a-z0-9]$.projectIdstringlocationstringdescriptionstringUp to 256 characters.
partitionKeyobjectpartitionKey.namestringrequiredMatches
^[A-Za-z_][A-Za-z0-9_.-]{0,254}$.partitionKey.type"S" | "N" | "B"requiredsortKeyobjector nullsortKey.namestringrequiredMatches
^[A-Za-z_][A-Za-z0-9_.-]{0,254}$.sortKey.type"S" | "N" | "B"required
Errors
400Only databases have keys.400The sort key must differ from the partition key.400Serverless App Service not found in this organization.400Unknown location: …409… already uses … for ….409Repository exists.502Provisioning failed.
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/resources' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"type": "repository",
"name": "Example"
}'Response 201
{
resource: {
region: string
type: "repository" | "database" | "bucket"
name: string
status?: "error" | "active" | "deleting" | "creating"
createdAt?: number
updatedAt?: number
orgId: string
resourceId: string
createdBy: string
projectId?: string
location: string
arn?: string
physicalName: string
restoredFrom?: string
pendingSetup?: boolean
}
}/ v1/ orgs/ :orgId/ resources/ :type/ :resourceIdLinks a database or bucket to a Serverless App Service, or unlinks it with projectId: null. Takes effect on the Serverless App Service's next deployment.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scope
- resources:write
Path parameters
orgIdOrganization id (
org_…).typerepository,databaseorbucket.resourceIdResource id (
res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.
Request body
projectIdstringrequiredor nullAt least 1 character.
Errors
400Only databases and buckets can be linked.400Serverless App Service not found in this organization.404Not found409… already uses … for ….
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/resources/{type}/{resourceId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"projectId": "<projectId>"
}'Response 200
{
resource: {
region: string
type: "repository" | "database" | "bucket"
name: string
status?: "error" | "active" | "deleting" | "creating"
createdAt?: number
updatedAt?: number
orgId: string
resourceId: string
createdBy: string
projectId?: string
location: string
arn?: string
physicalName: string
restoredFrom?: string
pendingSetup?: boolean
}
}/ v1/ orgs/ :orgId/ resources/ :type/ :resourceIdDeletes a resource and the AWS resource behind it. Databases must have deletion protection off; buckets must be empty. On failure the resource keeps its status.
- Auth
- A person's token or an API key, as Authorization: Bearer.
- Scopes
- git:write (for repositories), resources:write (for databases and buckets)
Path parameters
orgIdOrganization id (
org_…).typerepository,databaseorbucket.resourceIdResource id (
res_…); for a group's access, the Serverless App Service id (prj_…) or the repository's resource id.
Errors
400Unknown type404… not found404Not found404Table not found409Turn off deletion protection first.409Wait for index … to finish …, then try again.409Delete every file in this bucket first.409Still removing old file versions. Try again to continue.409Couldn't delete … file…: …409Files were added while deleting. Delete them first.
Errors from AWS map as in AWS errors.
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/resources/{type}/{resourceId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"Response 204 with no body