SISuperintelligenceDocs

Search docs

Search every page of the documentation.

API reference

Repositories, databases and buckets

Create, list, link and delete repositories, databases and buckets.

Repositories need git scopes; databases and buckets need resource scopes. To read and write data in a database or bucket, use the Databases and Storage routes.

GET /v1/orgs/:orgId/resources

Lists repositories, databases and buckets, optionally of one type.

Auth: user access token or platform agent key · Scopes: git:read (with type=repository), resources:read (with any other type, or none)

Path parameterDescription
:orgIdOrganization id (org_…).
Query parameterTypeRequiredNotes
type"repository" | "database" | "bucket"No

Response 200

{
  resources: {
    type: "repository" | "database" | "bucket"
    name: string
    status?: "error" | "active" | "creating" | "deleting"
    createdAt?: number
    updatedAt?: number
    region: string
    orgId: string
    createdBy: string
    projectId?: string
    location: string
    resourceId: string
    arn?: string
    physicalName: string
  }[]
}

POST /v1/orgs/:orgId/resources

Creates a repository, database or bucket in a location. With projectId, a database or bucket is linked to that project. Databases take an optional key schema (default pk/sk strings; sortKey: null for a partition key only).

Auth: user access token or platform agent key · Scopes: git:write (for repositories), resources:write (for databases and buckets)

Path parameterDescription
:orgIdOrganization id (org_…).

Request body

FieldTypeRequiredNotes
type"repository" | "database" | "bucket"Yes
namestringYesmatches ^[a-z0-9][a-z0-9-]{1,38}[a-z0-9]$
projectIdstringNo
locationstringNo
descriptionstringNoup to 256 characters
partitionKeyobjectNo
partitionKey.namestringYesmatches ^[A-Za-z_][A-Za-z0-9_.-]{0,254}$
partitionKey.type"S" | "N" | "B"Yes
sortKeyobjectNocan be null
sortKey.namestringYesmatches ^[A-Za-z_][A-Za-z0-9_.-]{0,254}$
sortKey.type"S" | "N" | "B"Yes

Response 201

{
  resource: {
    type: "repository" | "database" | "bucket"
    name: string
    status?: "error" | "active" | "creating" | "deleting"
    createdAt?: number
    updatedAt?: number
    region: string
    orgId: string
    createdBy: string
    projectId?: string
    location: string
    resourceId: string
    arn?: string
    physicalName: string
  }
}

Errors

StatusMessage
400Only databases have keys.
400The sort key must differ from the partition key.
400Project not found in this organization.
400Unknown location: …
409… already uses … for ….
409Repository exists.
502Provisioning failed.

PATCH /v1/orgs/:orgId/resources/:type/:resourceId

Links a database or bucket to a project, or unlinks it with projectId: null. Takes effect on the project's next deployment.

Auth: user access token or platform agent key · Scope: resources:write

Path parameterDescription
:orgIdOrganization id (org_…).
:typerepository, database or bucket.
:resourceIdResource id (res_…).

Request body

FieldTypeRequiredNotes
projectIdstringYesat least 1 character; can be null

Response 200

{
  resource: {
    type: "repository" | "database" | "bucket"
    name: string
    status?: "error" | "active" | "creating" | "deleting"
    createdAt?: number
    updatedAt?: number
    region: string
    orgId: string
    createdBy: string
    projectId?: string
    location: string
    resourceId: string
    arn?: string
    physicalName: string
  }
}

Errors

StatusMessage
400Only databases and buckets can be linked.
400Project not found in this organization.
404Not found
409… already uses … for ….

DELETE /v1/orgs/:orgId/resources/:type/:resourceId

Deletes 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: user access token or platform agent key · Scopes: git:write (for repositories), resources:write (for databases and buckets)

Path parameterDescription
:orgIdOrganization id (org_…).
:typerepository, database or bucket.
:resourceIdResource id (res_…).

Response 204 with no body.

Errors

StatusMessage
400Unknown type
404… not found
404Not found
404Table not found
409Turn 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 are mapped as in AWS errors.