The system tenant api endpoints allow authorized users to read, modify and delete tenants.
For more information about the architecture and core concepts of system tenants, you may consult the Tenant component documentation.
This endpoint returns the list of tenants.
GET /system/tenants
Name | Type | Description | Example |
---|---|---|---|
Accept | string | The accepted returned content types. Optional. Default: application/ld+json . Options: application/json , application/ld+json . |
Accept: application/json |
Authorization | string | The basic auth credentials. Required. | Authorization: Basic c3lzdGVtOnN5c3RlbQ== |
Name | Type | Description | Example |
---|---|---|---|
id | integer | Filter tenants by the given id. Optional. | id=1 id[]=1&id[]=2 |
uuid | string | Filter tenants by the given uuid. Optional. | uuid=d928b020-94f6-4928-a510-04fc49d5a174 uuid[]=d928b020-94f6-4928-a510-04fc49d5a174&uuid[]=f9412502-67de-4c1f-b4cf-12a92df58a5a |
createdAt[before] | string | Filter tenants that were created before the given date. Optional. | createdAt[before]=2018-07-20T13:19:30.181Z |
createdAt[after] | string | Filter tenants that were created after the given date. Optional. | createdAt[after]2018-07-20T13:19:30.181Z |
updatedAt[before] | string | Filter tenants that were updated before the given date. Optional. | updatedAt[before]=2018-07-20T13:19:30.181Z |
updatedAt[after] | string | Filter tenants that were updated after the given date. Optional. | updatedAt[after]=2018-07-20T13:19:30.181Z |
page | integer | The current page in the pagination. Optional. Default: 1 . |
page=2 |
limit | integer | The number of items per page. Optional. Default: 10 . |
limit=25 |
A JSON array of objects. Each object contains the following properties:
Name | Type | Description |
---|---|---|
id | integer | The tenant id. |
uuid | string | The tenant uuid. |
createdAt | string | The date the tenant was created on. |
updatedAt | string | The date the tenant was update at. |
data | object | The tenant initialization data. |
version | integer | The tenant version. This value is used for optimistic locking. |
Method:
GET /system/tenants
Headers:
Accept: application/json
Code:
200 OK
Body:
[
{
"id": 1,
"uuid": "d928b020-94f6-4928-a510-04fc49d5a174",
"createdAt": "2018-07-31T14:57:10+00:00",
"updatedAt": "2018-07-31T14:57:10+00:00",
"data": {},
"version": 1
}
]
This endpoint returns a specific tenant.
Name | Type | Description | Example |
---|---|---|---|
Accept | string | The accepted returned content types. Optional. Default: application/ld+json . Options: application/json , application/ld+json . |
Accept: application/json |
Authorization | string | The basic auth credentials. Required. | Authorization: Basic c3lzdGVtOnN5c3RlbQ== |
GET /system/tenants/{uuid}
Name | Type | Description | Example |
---|---|---|---|
uuid | string | The uuid of the tenant. Required. | d928b020-94f6-4928-a510-04fc49d5a174 |
A JSON object that contains the following properties:
Name | Type | Description |
---|---|---|
id | integer | The tenant id. |
uuid | string | The tenant uuid. |
createdAt | string | The date the tenant was created on. |
updatedAt | string | The date the tenant was update at. |
data | object | The tenant initialization data. |
version | integer | The tenant version. This value is used for optimistic locking. |
The tenant with the given uuid does not exist.
Method:
GET /system/tenants/d928b020-94f6-4928-a510-04fc49d5a174
Headers:
Accept: application/json
Code:
200 OK
Body:
{
"id": 1,
"uuid": "d928b020-94f6-4928-a510-04fc49d5a174",
"createdAt": "2018-07-31T14:57:10+00:00",
"updatedAt": "2018-07-31T14:57:10+00:00",
"data": {},
"version": 1
}
This endpoint adds a tenant to the list.
Name | Type | Description | Example |
---|---|---|---|
Content-Type | string | The accepted returned content types. Options: application/json . |
Content-Type: application/json |
Accept | string | The accepted returned content types. Optional. Default: application/ld+json . Options: application/json , application/ld+json . |
Accept: application/json |
Authorization | string | The basic auth credentials. Required. | Authorization: Basic c3lzdGVtOnN5c3RlbQ== |
POST /system/tenants
A JSON object that contains the following properties:
Name | Type | Description | Example |
---|---|---|---|
uuid | string | The tenant uuid. Optional. Default: auto-generated. | d928b020-94f6-4928-a510-04fc49d5a174 |
data | object | The tenant initialization data. Required. | {} |
version | integer | The tenant version. This value is used for optimistic locking. Required. | 1 |
A JSON object that contains the following properties:
Name | Type | Description |
---|---|---|
id | integer | The tenant id. |
uuid | string | The tenant uuid. |
createdAt | string | The date the tenant was created on. |
updatedAt | string | The date the tenant was update at. |
data | object | The tenant initialization data. |
version | integer | The tenant. This value is used for optimistic locking. |
There were some validation errors.
Method:
POST /system/tenants
Headers:
Content-Type: application/json
Accept: application/json
Authorization: Basic c3lzdGVtOnN5c3RlbQ==
Body:
{
"data": {},
"version": 1
}
Code:
200 OK
Body:
{
"id": 1,
"uuid": "d928b020-94f6-4928-a510-04fc49d5a174",
"createdAt": "2018-07-19T12:08:30+00:00",
"updatedAt": "2018-07-19T12:08:30+00:00",
"data": {},
"version": 1
}
This endpoint edits a specific tenant.
PUT /system/tenants/{uuid}
Name | Type | Description | Example |
---|---|---|---|
Content-Type | string | The accepted returned content types. Options: application/json . |
Content-Type: application/json |
Accept | string | The accepted returned content types. Optional. Default: application/ld+json . Options: application/json , application/ld+json . |
Accept: application/json |
Authorization | string | The basic auth credentials. Required. | Authorization: Basic c3lzdGVtOnN5c3RlbQ== |
Name | Type | Description | Example |
---|---|---|---|
uuid | string | The uuid of the tenant. Required. | d928b020-94f6-4928-a510-04fc49d5a174 |
A JSON object that contains the following properties:
Name | Type | Description | Example |
---|---|---|---|
uuid | string | The tenant uuid. Optional. | d928b020-94f6-4928-a510-04fc49d5a174 |
data | object | The tenant initialization. Optional. | {} |
version | integer | The tenant version. This value is used for optimistic locking. Required. | 1 |
A JSON object that contains the following properties:
Name | Type | Description |
---|---|---|
id | integer | The tenant id. |
uuid | string | The tenant uuid. |
createdAt | string | The date the tenant was created on. |
updatedAt | string | The date the tenant was update at. |
data | object | The tenant initialization data. |
version | integer | The tenant version. This value is used for optimistic locking. |
There were some validation errors.
Method:
PUT /system/tenants/d928b020-94f6-4928-a510-04fc49d5a174
Headers:
Content-Type: application/json
Accept: application/json
Authorization: Basic c3lzdGVtOnN5c3RlbQ==
Body:
{
"data": {},
"version": 1
}
Code:
200 OK
Body:
{
"id": 1,
"uuid": "d928b020-94f6-4928-a510-04fc49d5a174",
"createdAt": "2018-07-31T14:57:10+00:00",
"updatedAt": "2018-08-01T12:30:15+00:00",
"data": {},
"version": 2
}
This endpoint deletes a specific tenant from the list.
DELETE /system/tenants/{uuid}
Name | Type | Description | Example |
---|---|---|---|
Authorization | string | The basic auth credentials. Required. | Authorization: Basic c3lzdGVtOnN5c3RlbQ== |
Name | Type | Description | Example |
---|---|---|---|
uuid | string | The uuid of the tenant. Required. | d928b020-94f6-4928-a510-04fc49d5a174 |
The request was successful and returns no content.
Method:
DELETE /system/tenants/d928b020-94f6-4928-a510-04fc49d5a174
Code:
204 No Content
Body: