For the complete documentation index, see llms.txt. This page is also available as Markdown.

Tenant

Manage tenant settings.

Get a list of tenants.

get

Retrieve a list of tenants and their details.

Authorizations
AuthorizationstringRequired

Bearer authentication

Query parameters
deletedbooleanOptional

Include soft-deleted tenants in the response when true.

Default: false
Responses
200

Executed successfully.

application/json
idinteger · int32Required

The id of the tenant.

Example: 1001
mimirIdstringOptional
uuidstring · uuidRequired

The universally unique identifier of the tenant.

namestringRequired

The internal system name of the tenant.

displayNamestringOptional

The name of the tenant as shown to users within the tenant.

smgbooleanRequired
statusstring · enumRequired

The current status of the tenant. Possible values:

  • Creating
  • Failed
  • Updating
  • Deleted
  • Deleting
  • Ready
Possible values:
createdAtstring · date-timeRequired

The date and time when the tenant was created.

updatedAtstring · date-timeRequired

The date and time when the tenant was last updated.

contractTypestring · enumRequiredPossible values:
eulastringOptional

The signer details for the tenant's EULA (End User License Agreement).

get/api/v1/tenants
GET /api/v1/tenants HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": 1,
    "name": "example",
    "displayName": "Example",
    "status": "Ready",
    "tenantId": 123,
    "createdAt": "2020-01-01T00:00:00Z",
    "updatedAt": "2020-01-02T00:00:00Z",
    "deletedAt": null
  }
]

Create tenant

post
Authorizations
AuthorizationstringRequired

Bearer authentication

Body
namestring · min: 2 · max: 255Required

The name of the tenant.

Example: namePattern: ^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$
emailstring · min: 5 · max: 254Required

The email of the tenant's admin user.

Example: first@run.aiPattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
passwordstring · min: 8 · max: 255Optional

The password for the tenant's admin user. Must contain at least 1 special character, 1 uppercase letter, 1 lowercase letter, 1 digit, and be at least 8 characters long.

contractTypestring · enumOptionalPossible values:
rolestring · enum · nullableOptional

The role assigned to the tenant's admin user. Possible value: System administrator.

Possible values:
Responses
201

Created

application/json
additionalDataobject · nullableOptional

additional data for tenant creation

post/api/v1/tenants
POST /api/v1/tenants HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 437

{
  "name": "name",
  "email": "first@run.ai",
  "password": "text",
  "contractType": "normal",
  "role": "System administrator",
  "metricStore": {
    "read": {
      "url": "http://mimir-nginx.mimir-test.svc:80/api/v1/query",
      "auth": {
        "basic": {
          "username": "text",
          "password": "text"
        }
      },
      "headers": {
        "X-Scope-OrgID": "id"
      }
    },
    "write": {
      "url": "http://mimir-nginx.mimir-test.svc:80/api/v1/query",
      "auth": {
        "basic": {
          "username": "text",
          "password": "text"
        }
      },
      "headers": {
        "X-Scope-OrgID": "id"
      }
    }
  }
}
{
  "tenant": {
    "id": 1,
    "name": "example",
    "displayName": "Example",
    "status": "Ready",
    "tenantId": 123,
    "eulaSigningUser": {
      "email": "user@tenant",
      "date": "2020-01-01T00:00:00Z",
      "ip": "192.168.10.210",
      "contract_type": "normal"
    },
    "created_at": "2020-01-01T00:00:00Z",
    "updated_at": "2020-01-02T00:00:00Z",
    "deleted_at": null
  },
  "additionalData": {
    "tenantDomain": "tenant.test.run.ai",
    "testUser": {
      "tenant-test@run.ai": "Abc!23"
    },
    "customerUser": {
      "user@tenant": "Abc!23"
    }
  }
}

Get tenant

get
Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
tenantIdinteger · int32Required

The id of the tenant to retrieve

Responses
200

Executed successfully.

application/json
idinteger · int32Required

The id of the tenant.

Example: 1001
mimirIdstringOptional
uuidstring · uuidRequired

The universally unique identifier of the tenant.

namestringRequired

The internal system name of the tenant.

displayNamestringOptional

The name of the tenant as shown to users within the tenant.

smgbooleanRequired
statusstring · enumRequired

The current status of the tenant. Possible values:

  • Creating
  • Failed
  • Updating
  • Deleted
  • Deleting
  • Ready
Possible values:
createdAtstring · date-timeRequired

The date and time when the tenant was created.

updatedAtstring · date-timeRequired

The date and time when the tenant was last updated.

contractTypestring · enumRequiredPossible values:
eulastringOptional

The signer details for the tenant's EULA (End User License Agreement).

get/api/v1/tenants/{tenantId}
GET /api/v1/tenants/{tenantId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 1,
  "name": "example",
  "displayName": "Example",
  "status": "Ready",
  "tenantId": 123,
  "createdAt": "2020-01-01T00:00:00Z",
  "updatedAt": "2020-01-02T00:00:00Z",
  "deletedAt": null
}

soft/hard delete tenant

delete
Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
tenantIdinteger · int32Required

The id of the tenant to retrieve

Query parameters
isHardDeletebooleanOptional

Boolean indicator for soft/hard delete

Responses
200

tenant uid that was deleted.

application/json
uidstringRequired
delete/api/v1/tenants/{tenantId}
DELETE /api/v1/tenants/{tenantId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "uid": "text"
}

Last updated