Tenant Manager REST API v2 version v2
{schema}://{host}/api/{version}
Tenant Manager REST API v2 provides tenant and user management capabilities using IAMCore authentication and authorization.
- schema: required(one of http, https - default: https)
The protocol scheme to use
- host: required(string - default: localhost)
The hostname or IP address of the Tenant Manager service
- version: required(v2)
Tenants
Operations for managing tenants in the system. Tenants represent isolated environments within the platform, each with their own configuration, users, and resources.
Retrieve a paginated list of tenants accessible to the authenticated user
get /tenants
Retrieve a paginated list of tenants accessible to the authenticated user
Query Parameters
- offset: (integer - default: 0 - minimum: 0)
The number of items to skip before starting to collect the result set
- limit: (integer - default: 100 - minimum: 1 - maximum: 100)
The number of items to return (max 100)
- search: (string)
Search term to filter results
Example:
my-tenant - sort_by: (one of name, created, modified - default: created)
Field to sort results by
- sort_order: (one of asc, desc - default: desc)
Sort order
HTTP status code 400
Bad Request - Invalid request parameters or body
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Invalid request parameters",
"details": {
"field": "name",
"message": "This field is required"
}
}HTTP status code 401
Unauthorized - Authentication required or invalid
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Authentication required"
}HTTP status code 403
Forbidden - Insufficient permissions
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Insufficient permissions to access this resource"
}HTTP status code 404
Not Found - Resource does not exist
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Resource not found"
}HTTP status code 500
Internal Server Error - Unexpected server error
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Internal server error"
}Package Types
Operations for managing package types. Package types define different service tiers and feature sets available for tenants.
Retrieve available package types
get /packages-types
Retrieve available package types
- kaa:tenant:package-type:read
Tenant Manager v2 supports OAuth 2.0 with IAMCore for authenticating all API requests. All endpoints require valid OAuth 2.0 bearer tokens issued by the IAMCore service.
Query Parameters
- offset: (integer - default: 0 - minimum: 0)
The number of items to skip before starting to collect the result set
- limit: (integer - default: 100 - minimum: 1 - maximum: 100)
The number of items to return (max 100)
HTTP status code 200
Successfully retrieved package types
Body
Media type: application/json
Type: object
Properties- count: required(integer)
Total number of items
- results: required(array of tenant-manager-api-types.PackageTypeInfo)
List of package type items
Items: PackageTypeInfo
- id: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$)
Package type ID
Example:
550e8400-e29b-41d4-a716-446655440000 - name: required(string)
Package type name
- devices: required(integer)
Number of devices allowed
- applications: required(integer)
Number of applications allowed
- disk_size: required(integer)
Disk size in MB
- traffic: required(integer)
Traffic allowance
- description: required(string)
Package description
- created: required(string)
Creation timestamp
Example:
2023-01-01T00:00:00Z - modified: required(string)
Last modification timestamp
Example:
2023-01-01T00:00:00Z
- id: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$)
- limit: required(integer)
Page size limit
- offset: required(integer)
Number of items skipped
Example:
{
"count": 7,
"results": [
{
"id": "00000000-0000-0000-0000-000000000005",
"name": "cloud-5",
"devices": 5,
"applications": 5,
"disk_size": 5,
"traffic": 5,
"description": "Cloud package for 5 devices",
"created": "2023-10-24T18:07:56.709497Z",
"modified": "2023-10-24T18:07:56.709497Z"
},
{
"id": "00000000-0000-0000-0000-00000000000f",
"name": "cloud-15",
"devices": 15,
"applications": 15,
"disk_size": 15,
"traffic": 15,
"description": "Cloud package for 15 devices",
"created": "2023-10-24T18:07:56.709497Z",
"modified": "2023-10-24T18:07:56.709497Z"
},
{
"id": "00000000-0000-0000-0000-000000000032",
"name": "cloud-50",
"devices": 50,
"applications": 50,
"disk_size": 50,
"traffic": 50,
"description": "Cloud package for 50 devices",
"created": "2023-10-24T18:07:56.709497Z",
"modified": "2023-10-24T18:07:56.709497Z"
},
{
"id": "00000000-0000-0000-0000-000000000064",
"name": "cloud-100",
"devices": 100,
"applications": 100,
"disk_size": 100,
"traffic": 100,
"description": "Cloud package for 100 devices",
"created": "2023-10-24T18:07:56.709497Z",
"modified": "2023-10-24T18:07:56.709497Z"
},
{
"id": "00000000-0000-0000-0000-0000000000fa",
"name": "cloud-250",
"devices": 250,
"applications": 250,
"disk_size": 250,
"traffic": 250,
"description": "Cloud package for 250 devices",
"created": "2023-10-24T18:07:56.709497Z",
"modified": "2023-10-24T18:07:56.709497Z"
},
{
"id": "00000000-0000-0000-0000-0000000001f4",
"name": "cloud-500",
"devices": 500,
"applications": 500,
"disk_size": 500,
"traffic": 500,
"description": "Cloud package for 500 devices",
"created": "2023-10-24T18:07:56.709497Z",
"modified": "2023-10-24T18:07:56.709497Z"
},
{
"id": "00000000-0000-0000-0000-0000000003e8",
"name": "cloud-1000",
"devices": 1000,
"applications": 1000,
"disk_size": 1000,
"traffic": 1000,
"description": "Cloud package for 1000 devices",
"created": "2023-10-24T18:07:56.709497Z",
"modified": "2023-10-24T18:07:56.709497Z"
}
],
"limit": 100,
"offset": 0
}
HTTP status code 400
Bad Request - Invalid request parameters or body
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Invalid request parameters",
"details": {
"field": "name",
"message": "This field is required"
}
}HTTP status code 401
Unauthorized - Authentication required or invalid
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Authentication required"
}HTTP status code 403
Forbidden - Insufficient permissions
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Insufficient permissions to access this resource"
}HTTP status code 404
Not Found - Resource does not exist
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Resource not found"
}HTTP status code 500
Internal Server Error - Unexpected server error
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Internal server error"
}Secured by oauth_2_0
Headers
- Authorization: required(string)
Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token issued by IAMCore. This header is required for all API endpoints.
HTTP status code 401
Unauthorized - Invalid or missing access token
HTTP status code 403
Forbidden - Token valid but insufficient permissions
Operations on a specific package type
Retrieve details of a specific package type
get /packages-types/{pk}
Retrieve details of a specific package type
- kaa:tenant:package-type:read
Tenant Manager v2 supports OAuth 2.0 with IAMCore for authenticating all API requests. All endpoints require valid OAuth 2.0 bearer tokens issued by the IAMCore service.
URI Parameters
- pk: required(string)
Package type identifier
Example:
1
HTTP status code 200
Successfully retrieved package type details
Body
Media type: application/json
Type: object
Properties- id: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$)
Package type ID
Example:
550e8400-e29b-41d4-a716-446655440000 - name: required(string)
Package type name
- devices: required(integer)
Number of devices allowed
- applications: required(integer)
Number of applications allowed
- disk_size: required(integer)
Disk size in MB
- traffic: required(integer)
Traffic allowance
- description: required(string)
Package description
- created: required(string)
Creation timestamp
Example:
2023-01-01T00:00:00Z - modified: required(string)
Last modification timestamp
Example:
2023-01-01T00:00:00Z
Example:
{
"id": "00000000-0000-0000-0000-000000000005",
"name": "cloud-5",
"devices": 5,
"applications": 5,
"disk_size": 5,
"traffic": 5,
"description": "Cloud package for 5 devices",
"created": "2023-10-24T18:07:56.709497Z",
"modified": "2023-10-24T18:07:56.709497Z"
}
HTTP status code 400
Bad Request - Invalid request parameters or body
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Invalid request parameters",
"details": {
"field": "name",
"message": "This field is required"
}
}HTTP status code 401
Unauthorized - Authentication required or invalid
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Authentication required"
}HTTP status code 403
Forbidden - Insufficient permissions
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Insufficient permissions to access this resource"
}HTTP status code 404
Not Found - Resource does not exist
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Resource not found"
}HTTP status code 500
Internal Server Error - Unexpected server error
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Internal server error"
}Secured by oauth_2_0
Headers
- Authorization: required(string)
Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token issued by IAMCore. This header is required for all API endpoints.
HTTP status code 401
Unauthorized - Invalid or missing access token
HTTP status code 403
Forbidden - Token valid but insufficient permissions
Tenant Subscriptions
Operations for managing tenant subscriptions. Subscriptions link tenants to package types and define billing and feature access.
Retrieve tenant subscriptions
get /tenants-subscriptions
Retrieve tenant subscriptions
- kaa:tenant:tenant-subscription:read
Tenant Manager v2 supports OAuth 2.0 with IAMCore for authenticating all API requests. All endpoints require valid OAuth 2.0 bearer tokens issued by the IAMCore service.
Query Parameters
- tenant_id: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$)
Filter subscriptions by tenant (required)
Example:
550e8400-e29b-41d4-a716-446655440000 - offset: (integer - default: 0 - minimum: 0)
The number of items to skip before starting to collect the result set.
- limit: (integer - default: 100 - minimum: 1 - maximum: 100)
The numbers of items to return (max 100).
HTTP status code 200
Successfully retrieved tenant subscriptions
Body
Media type: application/json
Type: object
Properties- count: required(integer)
Total number of items
- results: required(array of tenant-manager-api-types.TenantSubscriptionInfo)
List of subscription items
Items: TenantSubscriptionInfo
- id: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$)
Subscription ID
Example:
550e8400-e29b-41d4-a716-446655440000 - tenant_id: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$)
Tenant ID
Example:
550e8400-e29b-41d4-a716-446655440000 - package_type: required(integer)
Package type identifier
- start_date: required(string)
Subscription start date
Example:
2023-01-01T00:00:00Z - end_date: required(string)
Subscription end date
Example:
2023-01-01T00:00:00Z
- id: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$)
- limit: required(integer)
Page size limit
- offset: required(integer)
Number of items skipped
Example:
{
"count": 1,
"results": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"tenant_id": "b6d6ac85-e3a2-4153-ad26-5582d2773d40",
"package_type": 5,
"start_date": "2022-04-21T20:35:36.524970Z",
"end_date": "2022-05-21T20:35:36.524970Z"
}
],
"limit": 100,
"offset": 0
}
HTTP status code 400
Bad Request - Invalid request parameters or body
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Invalid request parameters",
"details": {
"field": "name",
"message": "This field is required"
}
}HTTP status code 401
Unauthorized - Authentication required or invalid
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Authentication required"
}HTTP status code 403
Forbidden - Insufficient permissions
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Insufficient permissions to access this resource"
}HTTP status code 404
Not Found - Resource does not exist
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Resource not found"
}HTTP status code 500
Internal Server Error - Unexpected server error
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Internal server error"
}Secured by oauth_2_0
Headers
- Authorization: required(string)
Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token issued by IAMCore. This header is required for all API endpoints.
HTTP status code 401
Unauthorized - Invalid or missing access token
HTTP status code 403
Forbidden - Token valid but insufficient permissions
Users
Operations for managing users in the system. Users can be associated with tenants and assigned various roles and permissions.
Retrieve a paginated list of users
Create a new user in the system
get /users
Retrieve a paginated list of users
- kaa:tenant:tenant-user:read
Tenant Manager v2 supports OAuth 2.0 with IAMCore for authenticating all API requests. All endpoints require valid OAuth 2.0 bearer tokens issued by the IAMCore service.
Query Parameters
- search: (string)
Search users by name, email, or username
Example:
admin - enabled: (boolean)
Filter users by enabled status
- offset: (integer - default: 0 - minimum: 0)
The number of items to skip before starting to collect the result set
- limit: (integer - default: 100 - minimum: 1 - maximum: 100)
The number of items to return (max 100)
HTTP status code 200
Successfully retrieved list of users
Body
Media type: application/json
Type: object
Properties- count: required(integer)
Total number of items
- results: required(array of tenant-manager-api-types.UserTemplateInfo)
List of user template items
Items: UserTemplateInfo
- id: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$)
User template ID
Example:
550e8400-e29b-41d4-a716-446655440000 - first_name: required(string)
First name
- last_name: required(string)
Last name
- email: required(string)
Email address
- username: required(string)
Username
- password: required(string)
Password
- enabled: required(boolean)
Whether user is enabled
- users: (array of tenant-manager-api-types.UserInfo)
Associated user instances
Items: UserInfo
- id: required(string)
User ID
- irn: required(string)
User IRN
- enabled: required(boolean)
Whether user is enabled
- tenant_id: required(string)
Tenant ID
- id: required(string)
- created: required(string)
Creation timestamp
Example:
2023-01-01T00:00:00Z - modified: required(string)
Last modification timestamp
Example:
2023-01-01T00:00:00Z
- id: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$)
- limit: required(integer)
Page size limit
- offset: required(integer)
Number of items skipped
Example:
{
"count": 1,
"results": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"first_name": "Admin",
"last_name": "Admin",
"email": "admin@example.com",
"username": "admin",
"password": "hashed-password",
"enabled": true,
"users": [
{
"id": "user-123",
"irn": "user:admin:123",
"enabled": true,
"tenant_id": "tenant-123"
}
],
"created": "2023-01-01T00:00:00Z",
"modified": "2023-01-01T00:00:00Z"
}
],
"limit": 100,
"offset": 0
}
HTTP status code 400
Bad Request - Invalid request parameters or body
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Invalid request parameters",
"details": {
"field": "name",
"message": "This field is required"
}
}HTTP status code 401
Unauthorized - Authentication required or invalid
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Authentication required"
}HTTP status code 403
Forbidden - Insufficient permissions
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Insufficient permissions to access this resource"
}HTTP status code 404
Not Found - Resource does not exist
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Resource not found"
}HTTP status code 500
Internal Server Error - Unexpected server error
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Internal server error"
}Secured by oauth_2_0
Headers
- Authorization: required(string)
Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token issued by IAMCore. This header is required for all API endpoints.
HTTP status code 401
Unauthorized - Invalid or missing access token
HTTP status code 403
Forbidden - Token valid but insufficient permissions
post /users
Create a new user in the system
- kaa:tenant:tenant-user:create
Tenant Manager v2 supports OAuth 2.0 with IAMCore for authenticating all API requests. All endpoints require valid OAuth 2.0 bearer tokens issued by the IAMCore service.
Body
Media type: application/json
Type: object
Properties- email: required(string)
Email address (must be valid)
- first_name: required(string)
First name (required, non-empty)
- last_name: required(string)
Last name (required, non-empty)
- username: (string)
Username (optional, non-empty if provided)
- password: required(string - minLength: 8)
Password (min 8 characters)
- enabled: (boolean - default: true)
Whether user should be enabled
Example:
{
"first_name": "Admin",
"last_name": "Admin",
"email": "admin@example.com",
"enabled": true,
"username": "admin",
"password": "secure-password-123"
}
HTTP status code 201
User created successfully
Body
Media type: application/json
Type: object
Properties- id: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$)
User template ID
Example:
550e8400-e29b-41d4-a716-446655440000 - first_name: required(string)
First name
- last_name: required(string)
Last name
- email: required(string)
Email address
- username: required(string)
Username
- password: required(string)
Password
- enabled: required(boolean)
Whether user is enabled
- users: (array of tenant-manager-api-types.UserInfo)
Associated user instances
Items: UserInfo
- id: required(string)
User ID
- irn: required(string)
User IRN
- enabled: required(boolean)
Whether user is enabled
- tenant_id: required(string)
Tenant ID
- id: required(string)
- created: required(string)
Creation timestamp
Example:
2023-01-01T00:00:00Z - modified: required(string)
Last modification timestamp
Example:
2023-01-01T00:00:00Z
Example:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"first_name": "Admin",
"last_name": "Admin",
"email": "admin@example.com",
"username": "admin",
"password": "hashed-password",
"enabled": true,
"users": [
{
"id": "user-123",
"irn": "user:instance:123",
"enabled": true,
"tenant_id": "tenant-123"
}
],
"created": "2023-01-01T00:00:00Z",
"modified": "2023-01-01T00:00:00Z"
}
HTTP status code 400
Bad Request - Invalid request parameters or body
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Invalid request parameters",
"details": {
"field": "name",
"message": "This field is required"
}
}HTTP status code 401
Unauthorized - Authentication required or invalid
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Authentication required"
}HTTP status code 403
Forbidden - Insufficient permissions
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Insufficient permissions to access this resource"
}HTTP status code 404
Not Found - Resource does not exist
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Resource not found"
}HTTP status code 500
Internal Server Error - Unexpected server error
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Internal server error"
}Secured by oauth_2_0
Headers
- Authorization: required(string)
Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token issued by IAMCore. This header is required for all API endpoints.
HTTP status code 401
Unauthorized - Invalid or missing access token
HTTP status code 403
Forbidden - Token valid but insufficient permissions
Operations on a specific user identified by primary key
Delete a user from the system
delete /users/{pk}
Delete a user from the system
- kaa:tenant:tenant-user:delete
Tenant Manager v2 supports OAuth 2.0 with IAMCore for authenticating all API requests. All endpoints require valid OAuth 2.0 bearer tokens issued by the IAMCore service.
URI Parameters
- pk: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$)
Unique identifier of the user
Example:
user-template-550e8400-e29b-41d4-a716-446655440000
HTTP status code 204
User deleted successfully
HTTP status code 400
Bad Request - Invalid request parameters or body
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Invalid request parameters",
"details": {
"field": "name",
"message": "This field is required"
}
}HTTP status code 401
Unauthorized - Authentication required or invalid
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Authentication required"
}HTTP status code 403
Forbidden - Insufficient permissions
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Insufficient permissions to access this resource"
}HTTP status code 404
Not Found - Resource does not exist
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Resource not found"
}HTTP status code 500
Internal Server Error - Unexpected server error
Body
Media type: application/json
Type: traits.ErrorResponse
Example:
{
"error": "Internal server error"
}Secured by oauth_2_0
Headers
- Authorization: required(string)
Used to send a valid OAuth 2 access token. Example: "Authorization: Bearer 'access_token'" where 'access_token' must be replaced by a valid OAuth access token issued by IAMCore. This header is required for all API endpoints.
HTTP status code 401
Unauthorized - Invalid or missing access token
HTTP status code 403
Forbidden - Token valid but insufficient permissions