Skip to content

Overview

The tenant plane: what a tenant administers across its own accounts — account provisioning, the tenant’s own people and their API keys, and the roles its users hold. Reached with a tenant-level user’s session or API key; neither tenant nor account is a path segment — both resolve from the credential, with the scope-override headers for a principal broader than its target.

A permission is named <resource>:<action> or <resource>:<sub_resource>:<action>, and the action is read, write or manage. On one resource manage includes write, and write includes read. Every tenant has five fixed roles: the account roles reader, writer and account_admin, and the tenant roles tenant_admin and tenant_dpu. tenant_dpu holds what account_admin holds, reads the accounts of the tenant and changes their lines, also on an account that carries an external_id. Any other write that managed_resources restricts is refused to it; only tenant_admin makes that write. A tenant’s own role may inherit a fixed account role.

Each operation names the permission it needs in x-athena-permission; none means the operation checks no permission.

A list refuses a limit above its maximum, and an order_by, filter_or or include name that its parameter does not accept.

Request tracing

Every response carries the trace id of its request in the X-Trace-ID header, as 32 lowercase hexadecimal characters. A path that differs from a route only by a trailing slash is answered with a redirect to that route, and the redirect carries no X-Trace-ID header.

A request may name its own trace id, in the W3C traceparent header or in X-Trace-ID. An X-Trace-ID value is 32 hexadecimal characters or a UUID; the response returns it in lowercase and without dashes. A valid traceparent takes precedence over X-Trace-ID. A request with no valid id in either header is served under a new id.

Errors

An error response carries an error field that names the case. A client branches on error; the text in message is for people.

Common to every resource

These errors have the same status and meaning on every resource. An operation that cannot answer one, or answers it in its own way, says so in its responses.

Status error Meaning
401 unauthenticated Refuses a request that cannot be authenticated.
Returned when:
- The request carries no usable credential.
- The user, account or tenant behind the credential is not active.
403 permission_denied The credential is valid and in scope, but the caller’s roles do not grant the permission the operation needs.
404 not_found Refuses an identifier that names no resource the caller can use.
Returned when:
- No live resource with this identifier is visible to the caller.
- The resource the identifier names belongs to another account.
405 method_not_allowed The path exists and does not accept this method.
500 internal The server failed to answer; the request did not take effect and may be retried. Any operation can answer it, so no operation lists it.

All errors

Every error this API answers itself. An operation lists the ones it can answer in its responses.

Status error Meaning
400 bad_request Refuses a request whose form is wrong.
Returned when:
- The body, a path parameter or a query parameter does not parse.
- Content-Encoding names a compression the API does not accept, or the body cannot be decompressed as named.
- A brick to validate names a type or a version the API does not know.
- A data field path or a column name in the body is not well formed, or a key of a row’s data is empty or holds a dot.
- A node position in the constructor of a scenario save carries one of x and y without the other.
- The operation needs a WebSocket upgrade, and the request is not one.
message names what failed.
400 email_required The tenant declares account in managed_resources, which makes email required, and the request carries none.
400 external_id_required The tenant declares this resource type in managed_resources, which makes external_id required, and the request carries none.
400 missing_scope_header The credential acts for a tenant or for the platform, and the request names no account in X-Account-Sid (or no tenant in X-Tenant-Sid).
400 scope_conflict Refuses the value of the scope header.
Returned when:
- The scope header names an account or tenant the credential does not cover.
- The scope header carries a value that is not an id of that kind.
400, 422 validation_failed Refuses a body that does not pass validation.
Returned when:
- The body does not parse.
- The body lacks a required field.
- The body carries a value that is not accepted.
message names the field.
401 unauthenticated Refuses a request that cannot be authenticated.
Returned when:
- The request carries no usable credential.
- The user, account or tenant behind the credential is not active.
403 access_denied Refuses the request because of a permission the caller does not hold.
Returned when:
- The request assigns, creates, edits or deletes a role that carries a permission the caller does not hold.
- The request writes to a user whose roles carry such a permission.
403 permission_denied The credential is valid and in scope, but the caller’s roles do not grant the permission the operation needs.
403 self_administration The target is the caller’s own user, which the user operations do not change or delete. PATCH /v1/a/profile on the account plane edits the caller’s own name and email.
404 audio_not_found Refuses the audio file name in the request.
Returned when:
- No stored file with this name is in the caller’s account.
- The name is malformed.
404 not_found Refuses an identifier that names no resource the caller can use.
Returned when:
- No live resource with this identifier is visible to the caller.
- The resource the identifier names belongs to another account.
405 method_not_allowed The path exists and does not accept this method.
409 account_calls_in_flight A call of the account, or of an account under the tenant, is being dialled or is in progress.
409 conflict The write collides with the current state of the resource; message says what collided.
409 email_conflict Another live user, at either level, already holds the email address.
409 external_id_conflict Another live resource of the same kind and scope already holds the external identifier.
409 role_fixed The role is defined by the platform and cannot be edited or deleted.
409 role_in_use Refuses the request while the role is in use.
Returned when:
- A live user of the tenant holds the role.
- A live role inherits it.
The data:
- data.users: names the users that hold the role.
- data.roles: names the roles that inherit it.
413 payload_too_large The body exceeds the size limit of the operation.
422 invalid_role Refuses a role named in the request.
Returned when:
- The role does not exist.
- The role is a tenant role named for an account-level user.
422 scenario_validation_failed The constructor is missing, or the constructor or a brick checked alone does not pass validation; data.errors.scenario lists each failure.
500 internal The server failed to answer; the request did not take effect and may be retried. Any operation can answer it, so no operation lists it.

Information

  • OpenAPI version: 3.1.0

A tenant API key, issued by the platform operator.

Security scheme type: http