Skip to content
GitLab

Responses & Errors

All successful responses use the ApiResponse<T> envelope:

{
"data": { ... },
"meta": { "version": "1.0" }
}

The meta field is optional and omitted when not applicable.

List endpoints use CursorPage<T> with cursor-based pagination:

{
"data": [ ... ],
"pagination": {
"has_next": true,
"has_previous": false,
"next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wMS0xNVQxMDozMDowMFoiLCJpZCI6ImFiYzEyMyJ9",
"previous_cursor": null,
"total_count": 142
}
}

All errors follow RFC 7807 Problem Details:

{
"type": "urn:akili:error:not_found",
"title": "Product not found",
"status": 404,
"detail": "Not found: product 550e8400-e29b-41d4-a716-446655440000",
"instance": "req_01ARZ3NDEKTSV4RRFFQ69G5FAV"
}

Validation errors (422) include per-field details:

{
"type": "urn:akili:error:validation_failed",
"title": "Request validation failed",
"status": 422,
"detail": "Validation failed",
"instance": "req_01ARZ3NDEKTSV4RRFFQ69G5FAV",
"errors": [
{ "field": "/name", "message": "Name is required", "code": "required" },
{ "field": "/version", "message": "Invalid semver format", "code": "invalid_format" }
]
}
ParameterTypeDefaultDescription
limitinteger20Items per page (1-100)
afterstringOpaque cursor: return items after this position
beforestringOpaque cursor: return items before this position

after and before are mutually exclusive. Providing both returns a 400 error.

Default sort order is created_at DESC, id DESC (newest first with deterministic tiebreak). The cursor encodes (created_at, id) for stable, gap-free pagination.

CodeMeaningContent-Type
200Success (GET, PUT)application/json
201Created (POST)application/json
202Accepted (async operations: deploy, trigger, replay)application/json
204No Content (DELETE, preflight)
400Bad request (malformed JSON, invalid cursor)application/problem+json
401Unauthorized (missing/invalid/expired JWT)application/problem+json
403Forbidden (insufficient role, suspended tenant)application/problem+json
404Not found (within tenant scope)application/problem+json
409Conflict (duplicate, invalid state transition)application/problem+json
413Payload too large (manifest upload > 10 MB)application/problem+json
422Validation failed (field-level errors)application/problem+json
429Rate limit exceededapplication/problem+json
500Internal server errorapplication/problem+json
503Service unavailable (dependency down)application/problem+json
504Gateway timeout (Dagster, Redpanda unresponsive)application/problem+json