Skip to main content

Tenants

Generated from apiome-rest/openapi.yaml (API version 1.719.0) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: tenants · 7 operations

GET /v1/tenants/me​

List My Tenants

Tenants accessible to the caller, enriched for the tenant switcher (OLO-6.2, #4219).

Ordered by slug. Pages by cursor: pass the previous page's next_cursor until has_more is false. total is the caller's own membership count — a list one user bounds — so it is always present.

  • JWT: all memberships for the user, each carrying the effective RBAC role slug (V119 assignment; legacy administrators read as owner; Editor default), the V121 member lifecycle status, and the tenant's attached license plan — resolved in a single query, no per-tenant follow-ups.
  • API key: the key's tenant only (single-item list) with role member and the tenant's license plan.

Operation id: list_my_tenants_v1_tenants_me_get

Parameters

NameInTypeRequiredDescription
limitqueryintegernoPage size. At most 100.
cursorquerystring or nullnoOpaque cursor from the previous page (next_cursor, or the X-Next-Cursor header). Omit for the first page.
offsetqueryintegernoRows to skip. Deprecated: page with cursor instead. At most 10,000.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list my tenants.application/json TenantsMeResponse
422Validation Errorapplication/json HTTPValidationError

GET /v1/tenants/{tenant_slug}​

Get Tenant Info

Tenant summary including usage counts; 403 when the caller cannot access the tenant.

Operation id: get_tenant_info_v1_tenants__tenant_slug__get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for get tenant info.application/json TenantInfoResponse
422Validation Errorapplication/json HTTPValidationError

HEAD /v1/tenants/{tenant_slug}​

Verify Tenant Access

Lightweight access check for CLI default-tenant selection (#3199).

Operation id: verify_tenant_access_v1_tenants__tenant_slug__head

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Caller has access to the tenant.—
401Missing or invalid session credentials.—
403Credentials valid but caller has no access to this tenant.—
404Tenant not found.—
422Validation Errorapplication/json HTTPValidationError

GET /v1/tenants/{tenant_slug}/document-store​

Read where the workspace's documents are kept

Whether originals and rendered documents are kept in the install's store (platform) or in the workspace's own S3-compatible bucket (tenant), the bucket settings, whether the bucket answered the last time it was used, and the progress of a move. allowed is false when the install does not offer tenant buckets. A credential is never returned — only the id and name of the storage credential in use.

Requires document_store:manage.

Operation id: get_tenant_document_store_v1_tenants__tenant_slug__document_store_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for read where the workspace's documents are kept.application/json TenantDocumentStore
422Validation Errorapplication/json HTTPValidationError

PUT /v1/tenants/{tenant_slug}/document-store​

Choose where the workspace's documents are kept

Set mode to tenant with a credentialId and bucket to keep documents in your own bucket, or to platform to go back to the install's store. Fields left out keep their saved value.

Before a bucket is saved it must pass the same write, read and delete test as POST …/document-store/test; a failed test answers 400 tenant-document-store-test-failed and changes nothing. The endpoint must pass the SSRF guard.

Changing mode starts a move of the existing objects in the background. New documents go to the new place at once; each existing one is copied, verified and only then read from the new place, so nothing fails while the move runs. GET reports its progress. Old copies stay until POST …/document-store/cleanup.

409 tenant-document-store-move-running while a move runs. 409 tenant-document-store-bucket-in-use when the bucket, folder or endpoint is changed while documents are stored there. 403 tenant-document-store-disabled when the install does not offer tenant buckets.

Audited as document_store.settings_updated. Requires document_store:manage.

Operation id: put_tenant_document_store_v1_tenants__tenant_slug__document_store_put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for choose where the workspace's documents are kept.

Responses

StatusDescriptionBody
200Successful response for choose where the workspace's documents are kept.application/json TenantDocumentStore
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/document-store/cleanup​

Delete the copies a move left behind

After a move, every moved object still has a copy in the place it came from. This deletes those copies. It needs {"confirm": true}; anything else answers 400 tenant-document-store-confirm-required. An object that failed to move is never touched, so no document's only copy can be deleted. In your own bucket only keys under Apiome's folder for this workspace are removed.

409 tenant-document-store-move-running while a move runs.

Audited as document_store.old_copies_deleted. Requires document_store:manage.

Operation id: cleanup_tenant_document_store_v1_tenants__tenant_slug__document_store_cleanup_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for delete the copies a move left behind.

Responses

StatusDescriptionBody
200Successful response for delete the copies a move left behind.application/json TenantDocumentStoreCleanupResult
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/document-store/test​

Test the workspace's bucket

Writes, reads back and deletes one small probe object under <prefix>/tenants/<tenant id>/objects/sha256/… — the key layout every document uses — so a bucket policy that does not allow it fails here and not during an import. Send settings in the body to test them before saving; send no body to test the saved settings.

Answers 200 whether or not the test passed: ok and each step's error say what failed. An error never contains a credential.

Requires document_store:manage.

Operation id: test_tenant_document_store_v1_tenants__tenant_slug__document_store_test_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (optional)

Request body for test the workspace's bucket.

Responses

StatusDescriptionBody
200Successful response for test the workspace's bucket.application/json TenantDocumentStoreProbeResult
422Validation Errorapplication/json HTTPValidationError

Schemas used​

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

TenantDocumentStore​

A tenant's document store settings, health and move progress. Never a credential.

PropertyTypeRequiredDescription
allowedbooleanyesWhether this install lets workspaces use their own bucket.
modeenum "platform", "tenant"yesMode.
credentialIdstring or nullnoCredential ID.
credentialNamestring or nullnoCredential Name.
bucketstring or nullnoBucket.
prefixstringnoPrefix.
regionstringnoRegion.
endpointUrlstringnoEndpoint URL.
addressingStyleenum "auto", "path", "virtual"noAddressing Style.
sseenum "", "s3", "kms"noSse.
kmsKeyIdstringnoKms Key ID.
healthTenantDocumentStoreHealthyesHealth.
moveTenantDocumentStoreMoveyesMove.
cleanupPendingbooleannoA finished move left old copies that POST …/cleanup deletes.

TenantDocumentStoreCleanupInput​

The explicit confirm that old copies may be deleted.

PropertyTypeRequiredDescription
confirmbooleannoConfirm.

TenantDocumentStoreCleanupResult​

What the cleanup removed.

PropertyTypeRequiredDescription
checkedintegeryesChecked.
deletedintegeryesDeleted.

TenantDocumentStoreInput​

Where a tenant's documents should be kept.

PropertyTypeRequiredDescription
modeenum "platform", "tenant"yesplatform keeps documents in the install's store; tenant keeps them in your own bucket.
credentialIdstring or nullnoA storage credential of this workspace (POST /v1/export/{tenant}/storage-credentials).
bucketstring or nullnoThe bucket. It must already exist.
prefixstring or nullnoFolder inside the bucket. Defaults to apiome; empty writes at the root.
regionstring or nullnoSigning region; empty takes the credential's.
endpointUrlstring or nullnoService URL for a non-AWS store; empty takes the credential's.
addressingStyleenum "auto", "path", "virtual" or nullnoAddressing Style.
sseenum "", "s3", "kms" or nullnoServer-side encryption: empty, s3 (SSE-S3) or kms (SSE-KMS).
kmsKeyIdstring or nullnoThe KMS key for sse = kms.

TenantDocumentStoreProbeResult​

The outcome of writing, reading back and deleting one probe object in the bucket.

PropertyTypeRequiredDescription
okbooleanyesOk.
bucketstring or nullnoBucket.
errorstring or nullnoWhy the test could not run at all.
stepsarray of TenantDocumentStoreProbeStepnoSteps.

TenantInfoResponse​

Tenant summary for GET /v1/tenants/{slug}.

PropertyTypeRequiredDescription
slugstringyesURL-safe identifier.
namestringyesHuman-readable name.
planstring or nullnoPlan.
created_atstring or nullnoCreation timestamp (ISO 8601).
members_countintegernoNumber of members.
projects_countintegernoNumber of projects.
versions_countintegernoNumber of versions.
published_versions_countintegernoNumber of published versions.
storage_used_bytesinteger or nullnoStorage Used Bytes.
storage_quota_bytesinteger or nullnoStorage Quota Bytes.

TenantsMeResponse​

Paginated list of tenants for the current principal (JWT user or API key tenant).

PropertyTypeRequiredDescription
itemsarray of TenantMembershipSchemayesItems.
totalintegeryesTotal.
limitintegeryesLimit.
offsetintegeryesThe offset used (deprecated; 0 when paging by cursor).
has_morebooleannoWhether another page exists.
next_cursorstring or nullnoPass as cursor to read the next page; null on the last page.