latestOpenAPI 3.1.0Apache License Version 2.02026-08-17498525913.3 KB

40169ccdec5c

tenant-controller

Create Or update Tenant (saveTenant)

Create or update the Tenant. When creating tenant, platform generates Tenant Id as time-based UUID. Default Rule Chain and Device profile are also generated for the new tenants automatically. The newly created Tenant Id will be present in the response. Specify existing Tenant Id id to update the Tenant. Referencing non-existing Tenant Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Tenant entity.

Available for users with 'SYS_ADMIN' authority.

post/api/tenant

Request body

createdTimeinteger

Timestamp of the tenant creation, in milliseconds

countrystring

Country

statestring

State

citystring

City

addressstring

Address Line 1

address2string

Address Line 2

zipstring

Zip code

phonestring

Phone number

emailstring

Email

titlestring required

Title of the tenant

regionstring

Geo region of the tenant

versioninteger
namestring

Name of the tenant. Read-only, duplicated from title for backward compatibility

{"stackTrail":"components:schemas:JsonNode","oasType":"schema","type":"unknown","description":"A value representing the any type (object or primitive)","example":{}}

Example request

{
  "id": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "TENANT"
  },
  "createdTime": 1609459200000,
  "country": "US",
  "state": "NY",
  "city": "New York",
  "phone": "+1(415)777-7777",
  "email": "example@company.com",
  "title": "Company A",
  "region": "North America",
  "tenantProfileId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "TENANT_PROFILE"
  },
  "name": "Company A",
  "additionalInfo": {}
}

Response

OK

createdTimeinteger

Timestamp of the tenant creation, in milliseconds

countrystring

Country

statestring

State

citystring

City

addressstring

Address Line 1

address2string

Address Line 2

zipstring

Zip code

phonestring

Phone number

emailstring

Email

titlestring required

Title of the tenant

regionstring

Geo region of the tenant

versioninteger
namestring

Name of the tenant. Read-only, duplicated from title for backward compatibility

{"stackTrail":"components:schemas:JsonNode","oasType":"schema","type":"unknown","description":"A value representing the any type (object or primitive)","example":{}}

Example response

{
  "id": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "TENANT"
  },
  "createdTime": 1609459200000,
  "country": "US",
  "state": "NY",
  "city": "New York",
  "phone": "+1(415)777-7777",
  "email": "example@company.com",
  "title": "Company A",
  "region": "North America",
  "tenantProfileId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "TENANT_PROFILE"
  },
  "name": "Company A",
  "additionalInfo": {}
}