Tenant settings
5 calls. Every request needs the Authorization header: see the overview.
tenant.modelAccess
Section titled “tenant.modelAccess”GET /tenants/self/model-accessWhether the tenant’s runs may fall back to the platform’s own provider keys, and whether it has keys of its own. When forbidMaitentoCredentials is true, every model call needs a key the run supplies or a tenant model key.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Response: TenantModelAccess (200)
curl -X GET "https://api.maitento.com/tenants/self/model-access" \ -H "Authorization: $MAITENTO_AUTH"const { forbidMaitentoCredentials, hasModelKeys } = await mt.tenant.modelAccess();mt.tenant.model_access()tenant.retention
Section titled “tenant.retention”GET /tenants/self/retentionHow long finished runs are kept, and the lease limits.
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Response: TenantRetention (200)
curl -X GET "https://api.maitento.com/tenants/self/retention" \ -H "Authorization: $MAITENTO_AUTH"const retention = await mt.tenant.retention();mt.tenant.retention()tenant.setRetention
Section titled “tenant.setRetention”PUT /tenants/self/retentionSets how long finished runs are kept, in hours, up to the plan’s planMaxHours (Tenant.Admin); hours: null goes back to the platform default.
Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.
Request body: TenantRetentionRequest
| Field | Type | Required | Description |
|---|---|---|---|
hours | integer | null | How long the tenant’s runs are kept once they end, in whole hours: at least TenantRetention.MinHours, and at most the plan’s TenantRetention.PlanMaxHours (and the platform’s MaxHours). Null goes back to the platform default. |
Response: TenantRetention (200)
curl -X PUT "https://api.maitento.com/tenants/self/retention" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"hours":0}'await mt.tenant.setRetention({ hours: 7 * 24 });mt.tenant.set_retention(hours=7 * 24)tenant.webAccess
Section titled “tenant.webAccess”GET /tenants/self/web-accessThe tenant’s web-access settings (its default web-download partition).
Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.
Response: WebAccessSettings (200)
curl -X GET "https://api.maitento.com/tenants/self/web-access" \ -H "Authorization: $MAITENTO_AUTH"const settings = await mt.tenant.webAccess();mt.tenant.web_access()tenant.setWebAccess
Section titled “tenant.setWebAccess”PUT /tenants/self/web-accessReplaces the tenant’s web-access settings (Tenant.Admin).
Who can call it: Tenant admins only, with an API key or a portal session. Try it in the API playground.
Request body: WebAccessSettingsInput
| Field | Type | Required | Description |
|---|---|---|---|
defaultWebDownloadPartitionId | uuid | null | The temporary partition web downloads go to by default. Null: none is set here (sending null clears it). |
Response: WebAccessSettings (200)
curl -X PUT "https://api.maitento.com/tenants/self/web-access" \ -H "Authorization: $MAITENTO_AUTH" \ -H "Content-Type: application/json" \ -d '{"defaultWebDownloadPartitionId":"..."}'await mt.tenant.setWebAccess({ defaultWebDownloadPartitionId: "d6e5f4a3-b2c1-4d0e-9f8a-7b6c5d4e3f2a" });mt.tenant.set_web_access(default_web_download_partition_id="4b5c6d7e-8f9a-4b0c-9d1e-2f3a4b5c6d7e")