REST APITenant

Get tenant settings

Get tenant settings.

GET/v1/tenant

Overview

Read or change your tenant's display name and monthly quota.

Endpoints

Get tenant settingsGET/v1/tenant

Get tenant settings.

Returns your tenant's display name, monthly quota, and monetization setting. A null quota means usage is unlimited. deletion is null unless your tenant is scheduled for deletion, when it holds the request and deletion times.

Request

Requires bearer authentication.

There are no parameters and no request body.

Response

Your tenant's settings.

TenantSettingsobjectrequired

Your tenant's settings.

Returns 200 OK as application/json. Your tenant's settings.

Response schema: TenantSettings.

{
  "name": "Acme",
  "quota": {
    "monthlyTokenLimit": 5000000,
    "monthlyRequestLimit": 10000,
    "resetDay": 1
  },
  "monetizationEnabled": false,
  "deletion": null
}

Errors

StatusCodesDescription
401unauthorizedThe credential is missing or invalid
402subscription_requiredAn active subscription or usage credit is required

See REST errors for the error envelope and shared codes.

cURL

curl "$BLAZING_AGENTS_BASE_URL/v1/tenant" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"

Update tenant settingsPATCH/v1/tenant

Update tenant settings.

Updates your tenant's display name, monthly quota, or monetization setting. Send at least one field; the ones you leave out keep their values. A quota replaces the whole quota, so send all three of its fields with at least one limit set, or send null to remove it. Turning monetizationEnabled off drops usage events your merchant has not yet accepted.

Request

Requires bearer authentication and a JSON body.

FieldTypeLocationRequiredDescription
monetizationEnabledbooleanbodyBill usage to your end users through your merchant account. Turning it off drops usage events your merchant has not yet accepted.
namestringbodyDisplay name of your tenant. 1–80 characters.
quotaobject | nullbodyThe whole monthly quota, replacing the current one, or null to remove it. Send monthlyTokenLimit, monthlyRequestLimit, and resetDay, with at least one limit set.

Response

Your tenant's settings.

TenantSettingsobjectrequired

Your tenant's settings.

Returns 200 OK as application/json. Your tenant's updated settings.

Response schema: TenantSettings.

{
  "name": "Acme",
  "quota": {
    "monthlyTokenLimit": 5000000,
    "monthlyRequestLimit": null,
    "resetDay": 1
  },
  "monetizationEnabled": false,
  "deletion": null
}

Errors

StatusCodesDescription
400validation_failed, invalid_requestThe request is invalid
401unauthorizedThe credential is missing or invalid
402subscription_requiredAn active subscription or usage credit is required

See REST errors for the error envelope and shared codes.

cURL

curl --request PATCH "$BLAZING_AGENTS_BASE_URL/v1/tenant" \
  --header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"quota":{"monthlyTokenLimit":5000000,"monthlyRequestLimit":null,"resetDay":1}}'

Next