Document List
On This Page

API Reference: Tenants

Tenant Endpoints

Get Tenant

Retrieve details about a specific tenant.

Endpoint: GET /tenant/{tenantId}

Parameters:

NameTypeLocationRequiredDescription
tenantIdstringpathYesThe unique identifier of the tenant

Response:

{
	"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
	"displayName": "My Company",
	"createdAt": "2024-01-15T10:30:00Z",
	"plan": "professional"
}

Update Tenant

Update tenant settings such as display name.

Endpoint: PUT /tenant/{tenantId}

Parameters:

NameTypeLocationRequiredDescription
tenantIdstringpathYesThe unique identifier of the tenant

Request Body:

{
	"displayName": "New Company Name"
}

Response: Returns the updated tenant object.


Get Tenant Statistics

Retrieve usage statistics for a tenant.

Endpoint: GET /tenant/{tenantId}/statistics

Parameters:

NameTypeLocationRequiredDescription
tenantIdstringpathYesThe unique identifier of the tenant

Response:

{
	"processCount": 15,
	"datasetCount": 8,
	"userCount": 5,
	"storageUsedBytes": 1073741824
}

Tenant Users Endpoints

List Tenant Users

Retrieve all users that have access to a tenant.

Endpoint: GET /tenant/{tenantId}/users

Parameters:

NameTypeLocationRequiredDescription
tenantIdstringpathYesThe unique identifier of the tenant

Response:

[
	{
		"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
		"email": "user@example.com",
		"firstName": "John",
		"lastName": "Doe",
		"createdAt": "2024-01-15T10:30:00Z",
		"lastLoginAt": "2024-03-01T14:00:00Z",
		"tenantId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
		"isActiveInTenant": true,
		"isAdminInTenant": false,
		"isDeveloperInTenant": false,
		"organizationId": "c3d4e5f6-a7b8-9012-cdef-345678901234",
		"isActiveInOrganization": true,
		"isAdminInOrganization": false
	}
]

Add Tenant User

Add a new user to a tenant. The user will be created if they don’t exist, or added to the tenant if they already have an account. The user ID is returned in the response.

Endpoint: POST /tenant/{tenantId}/users

Parameters:

NameTypeLocationRequiredDescription
tenantIdstringpathYesThe unique identifier of the tenant

Request Body:

{
	"email": "newuser@example.com",
	"firstName": "John",
	"lastName": "Doe",
	"isAdminInTenant": false,
	"isActiveInTenant": true,
	"isDeveloperInTenant": false
}
FieldTypeRequiredDescription
emailstringYesEmail address of the user
firstNamestringNoUser’s first name
lastNamestringNoUser’s last name
isAdminInTenantbooleanNoWhether the user has admin privileges in this tenant
isActiveInTenantbooleanNoWhether the user is active in this tenant
isDeveloperInTenantbooleanNoWhether the user has developer access in this tenant

Response:

{
	"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
	"message": "User added to tenant."
}

Update Tenant User

Update a user’s permissions within a tenant.

Endpoint: PUT /tenant/{tenantId}/users

Request Body:

{
	"userId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
	"tenantId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
	"isAdminInTenant": true,
	"isActiveInTenant": true,
	"isDeveloperInTenant": false
}
FieldTypeRequiredDescription
userIdstringYesThe unique identifier of the user
tenantIdstringYesThe unique identifier of the tenant
isAdminInTenantbooleanNoWhether the user has admin privileges
isActiveInTenantbooleanNoWhether the user is active in this tenant
isDeveloperInTenantbooleanNoWhether the user has developer access

Response:

{
	"message": "User tenant settings updated."
}

Remove Tenant User

Remove a user’s access to a tenant.

Endpoint: DELETE /tenant/{tenantId}/users

Request Body:

{
	"userId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
	"tenantId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
FieldTypeRequiredDescription
userIdstringYesThe unique identifier of the user to remove
tenantIdstringYesThe unique identifier of the tenant

Response:

{
	"message": "User removed from tenant."
}