Read a tenant's write-mode
const url = 'https://api.aerandil.com/v1/tenant-write-mode?tenant_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.aerandil.com/v1/tenant-write-mode?tenant_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --header 'Authorization: Bearer <token>'Return the tenant’s current write-mode (active | read_only | relocated). A tenant whose mode was never set reads back active with null provenance.
Operator-level scope: tenant_admin:write (same surface as tenant export / import / erasure).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The tenant whose write-mode is read or set.
Responses
Section titled “Responses”The tenant’s write-mode record.
A tenant’s write-mode plus the provenance of the last change. A tenant that was never set reads back active with null provenance.
object
Operator note from the last set, if any.
The principal that last set the mode (serialised).
When the mode was last set; null for a synthesised default.
Example
{ "mode": "active"}Missing the tenant_admin:write scope. Tenant-level tokens MUST NOT carry this scope.
Structured error wrapper. Every non-2xx response from any Aerandil endpoint serialises to this shape; the HTTP status carries the failure class (4xx/5xx), the body adds a stable code for programmatic dispatch plus a human-readable message.
object
object
Stable, programmatic error code (e.g. unauthorized, forbidden, not_found, invalid_body, invalid_url, precondition_failed, no_secondary_key). Clients dispatch on code, not on the message (which may be localised or contextualised in future versions).
Request-id correlation handle echoed on the request-id response header — support teams correlate without scraping logs.
Human-readable explanation of the failure.
Per-error structured detail. The shape varies by code (e.g. forbidden_action carries {"action": "..."}; precondition_failed carries {"current_version": N}).
Examplegenerated
{ "error": { "code": "example", "instance_id": "example", "message": "example", "parameters": "example" }}