Skip to main content

Generic Data Structures

AstraBox API groups reuse the following cross-resource structures. Each AstraBox instance publishes resource-specific request and response structures at /docs and /openapi.json.

Success envelope

AstraBox REST resource handlers return the operation's result in data.

FieldTypeDescription
codestringOK for a successful request
messagestringsuccess for a successful request
dataanyThe operation's response value

Example:

{
"code": "OK",
"message": "success",
"data": {
"session_id": "21e061ee-c00b-48cb-a702-fc8f410792f7"
}
}

Streaming, file-download, MCP, redirect, and 204 No Content endpoints use the response type declared for that operation instead of the JSON success envelope.

Paginated list

The paginated Session list returns its cursor page inside the standard success envelope:

FieldTypeDescription
data.sessionsarraySession objects on the current page
data.has_morebooleanWhether more Sessions are available
data.next_cursorstring | nullOpaque cursor for the next page, or null at the end

Pass data.next_cursor back as the cursor query parameter. See Pagination for request parameters and traversal examples.

Error envelope

Error responses use this envelope:

{
"code": "INVALID_REQUEST",
"message": "permission_mode is required",
"data": null,
"error": {
"code": "INVALID_REQUEST",
"status_code": 400,
"category": "request",
"retryable": false,
"owner": "client",
"user_message": "permission_mode is required"
}
}
FieldTypeDescription
codestringStable error code for programmatic handling
messagestringMessage safe to show to the caller
dataany | nullError-specific structured data, when available
errorobjectError status, category, retryability, owner, caller-safe message, and optional diagnostics

See Errors for every envelope field and handling guidance.

Timestamp

Platform-generated timestamps are ISO 8601 / RFC 3339 strings in UTC, for example "2026-08-24T19:26:39.616690+00:00". Some fields are nullable; each resource schema calls that out explicitly.

Identifiers

AstraBox identifiers are opaque strings. Resources do not share one public ID prefix convention.

RuleDescription
TypeJSON string
SourceRead the ID from the create, list, or detail response
UsePass the complete value unchanged in path parameters and request fields
MeaningDetermine the resource type from its field and endpoint, not from the ID text
StorageStore enough characters for the returned value; do not assume a UUID or fixed length

Next steps

  • Overview — how AstraBox fits together.