REST API¶
Note
You need token to access REST API. Receiving a token is described in tab with additional information.
RS server API¶
It provides API for managing remote desktops.
Module information¶
Detailed information about module.
Request¶
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/info | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
version (Optional) | body | string | Module version number. |
license (Optional) | body | string | License information. |
Example of getting information about module in JSON format:
{
"info": {
"license": {
"created_at": 1538141220,
"expire_at": 1545955200,
"module_package": "rs_server",
"name": "Laboratoria",
"product": "RSserver",
"surrogate_name": "RSserver",
"unique_id": "07-002-decf3c6c893561752802",
"verified": true
},
"version": "0.1.0"
}
}
TRS projects¶
Actions with TRS projects.
Creating new TRS project with given parameters.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
name | body | string | Project name, unique within the domain. |
enabled (Optional) | body | bool | Project status (enabled/disabled). |
description (Optional) | body | string | Project description. |
parent_id (Optional) | body | string | Parent project/domain ID. |
is_domain (Optional) | body | string | Flag indicating the ability to use the project as domain. |
tags (Optional) | body | string | Project tags list. |
domain_id (Optional) | body | string | Project domain ID. |
flavor_id | body | string | Project flavor ID. |
image_id | body | string | Project image ID. |
operation_mode (Optional) | body | string | Operating mode of TRS instances of the project. Possible values:
|
network_id (Optional) | body | string | Project network ID. |
availability_zone (Optional) | body | string | Project availability zone. |
instance_init_script (Optional) | body | string | Base64 encoded script. It is executed when all TRS instances in the project are created.. |
min_reserve_vm (Optional) | body | integer | Minimum number of reserved instances in the project. Default value is None. |
instance_name_pattern (Optional) | body | string | Instance name pattern. |
user_volume_enabled (Optional) | body | string | Flag enabling automatic creation of custom volumes when connected to instance. |
volume_size (Optional) | body | int | Volume size. |
volume_type_id (Optional) | body | string | Volume type ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"project":{"name": "test_proj","enabled": "True","description":"Test Project_2","parent_id":"37e51ab4c5134e5198788d1f6afe5b8b","domain_id":"37e51ab4c5134e5198788d1f6afe5b8b","flavor_id": "25a8679f-582a-4f7c-b9c2-286a60bedb76","image_id": "bdd277be-ebf3-4ff7-8c05-c6f20cbddd61","network_id": "39523179-37b5-4fd7-bf14-a1f7134a6b1f","operation_mode": "2", "availability_zone": "nova"}}' http://controller:9364/v1/projects/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | body | string | Project ID. |
Example result in JSON format:
{
"project": {
"id": "d394da7c4d0747bd879e0e865222b3d9",
}
}
Editing TRS TRS project parameters.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
project_id | path | string | Project ID. |
name (Optional) | body | string | Project name, unique within the domain. |
enabled (Optional) | body | bool | Project status (enabled/disabled). |
description (Optional) | body | string | Project description. |
domain_id (Optional) | body | string | Project domain ID. |
tags (Optional) | body | string | Project tags list. |
flavor_id (Optional) | body | string | Project flavor ID. |
image_id (Optional) | body | string | Project image ID. |
network_id (Optional) | body | string | Project network ID. |
availability_zone (Optional) | body | string | Project availability zone. |
instance_init_script (Optional) | body | string | Base64 encoded script. It is executed when all TRS instances in the project are created.. |
min_reserve_vm (Optional) | body | integer | Minimum number of reserved instances in the project. Default value is None. |
instance_name_pattern (Optional) | body | string | Instance name pattern. |
user_volume_enabled (Optional) | body | string | Flag enabling automatic creation of custom volumes when connected to instance. |
volume_size (Optional) | body | int | Volume size. |
volume_type_id (Optional) | body | string | Volume type ID. |
Request example:¶
curl -X PUT -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"project":{"name": "new name","enabled": "False","description":"Test Project_2","flavor_id": "25a8679f-582a-4f7c-b9c2-286a60bedb76","image_id": "bdd277be-ebf3-4ff7-8c05-c6f20cbddd61","network_id": "39523179-37b5-4fd7-bf14-a1f7134a6b1f", "availability_zone": "nova", "instance_init_script": "IyEvYmluL3NoCmVjaG8gJ0hlbGxvIGZyb20gdGhlIGRldiB0ZWFtISc="}}' http://controller:9364/v1/projects/5f62c4da73f34e869d9a3e8ab79b147a | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | body | string | Project ID. |
flavor_id (Optional) | body | string | Project flavor ID. |
image_id (Optional) | body | string | Project image ID. |
network_id (Optional) | body | string | Project network ID. |
availability_zone (Optional) | body | string | Project availability zone. |
operation_mode (Optional) | body | string | Operating mode of TRS instances of the project. Possible values:
|
instance_init_script (Optional) | body | string | Base64 encoded script. It is executed when all TRS instances in the project are created.. |
user_volume_enabled (Optional) | body | string | Flag enabling automatic creation of custom volumes when connected to instance. |
volume_size (Optional) | body | int | Volume size. |
volume_type_id (Optional) | body | string | Volume type ID. |
Example result in JSON format:
{
"project": {
"id": "d394da7c4d0747bd879e0e865222b3d9",
"image_id": "bdd277be-ebf3-4ff7-8c05-c6f20cbddd61",
"flavor_id": "25a8679f-582a-4f7c-b9c2-286a60bedb76",
"network_id": "39523179-37b5-4fd7-bf14-a1f7134a6b1f",
"availability_zone": "nova",
"operation_mode": "1",
"instance_init_script": "IyEvYmluL3NoCmVjaG8gJ0hlbGxvIGZyb20gdGhlIGRldiB0ZWFtISc=",
"user_volume_enabled": true,
"volume_size": 1,
"volume_type_id": null
}
}
Getting list of TRS projects (tenants).
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
name (Optional) | body | string | Project name, unique within the domain. |
enabled (Optional) | body | bool | Project status (enabled/disabled). |
domain (Optional) | body | string | Project domain name. |
user (Optional) | body | string | User ID. |
operation_mode (Optional) | body | string | Operating mode of TRS instances of the project. Possible values:
|
with_os_object (Optional) | path | bool | Parameter that allows to extend the response with os_project object containing attributes of OpenStack instance. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/projects/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | body | string | Project ID. |
image_id (Optional) | body | string | Project image ID. |
flavor_id (Optional) | body | string | Project flavor ID. |
network_id (Optional) | body | string | Project network ID. |
availability_zone (Optional) | body | string | Project availability zone. |
operation_mode (Optional) | body | string | Operating mode of TRS instances of the project. Possible values:
|
os_project (Optional) | body | object | OpenStack project. |
Example result in JSON format:
{
"projects": [
{
"id": "d394da7c4d0747bd879e0e865222b3d9",
"image_id": "d91232fa-14ad-4e41-980a-d82dc9ea3929",
"flavor_id": "0972fadc-6f8d-415a-b4cb-d4a0992b2370",
"network_id": "2506940c-22f9-4b81-a865-9aa6e7d7cba3",
"availability_zone": "nova",
"operation_mode": "1",
"user_volume_enabled": true,
"volume_size": 1,
"volume_type_id": null
},
{
"id": "37e51ab4c5134e5198788d1f6afe5b8b",
"image_id": "747488c2-5aa6-4d92-a982-e0319bee70e1",
"flavor_id": "fc77978d-02fb-4a53-b839-313abb7343c3",
"network_id": "d57e3c66-69bb-46d3-af75-28c41ed1076f",
"availability_zone": "nova",
"operation_mode": "2",
"user_volume_enabled": true,
"volume_size": 1,
"volume_type_id": null
}
]
}
Getting detailed information about TRS project.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
project_id | path | string | Project ID. |
with_os_object (Optional) | path | bool | Parameter that allows to extend the response with os_project object containing attributes of OpenStack instance. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" "http://controller:9364/v1/projects/$project_id?with_os_object=true" | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | body | string | Project ID. |
image_id (Optional) | body | string | Project image ID. |
flavor_id (Optional) | body | string | Project flavor ID. |
network_id (Optional) | body | string | Project network ID. |
availability_zone (Optional) | body | string | Project availability zone. |
operation_mode (Optional) | body | string | Operating mode of TRS instances of the project. Possible values:
|
instance_init_script (Optional) | body | string | Base64 encoded script. It is executed when all TRS instances in the project are created.. |
min_reserve_vm (Optional) | body | integer | Minimum number of reserved instances in the project. Default value is None. |
instance_name_pattern (Optional) | body | string | Instance name pattern. |
os_project (Optional) | body | object | OpenStack project. |
Example result in JSON format:
{
"project": {
"availability_zone": "",
"flavor_id": "41f2e2b1-d806-4688-8814-d4bedd6aee20",
"id": "c445f25f8c7e48a99ee7985309ed6954",
"image_id": "1e56ddcc-4d8d-42a1-8650-8a496c498e8c",
"instance_init_script": null,
"network_id": "3bff4756-aed7-4603-8fec-cfbe83654f14",
"operation_mode": "1",
"user_volume_enabled": true,
"volume_size": 1,
"volume_type_id": null,
"os_project": {
"availability_zone": "",
"description": "",
"domain_id": "default",
"enabled": true,
"flavor_id": "41f2e2b1-d806-4688-8814-d4bedd6aee20",
"id": "c445f25f8c7e48a99ee7985309ed6954",
"image_id": "1e56ddcc-4d8d-42a1-8650-8a496c498e8c",
"is_domain": false,
"links": {
"self": "http://dev-cnt7q-ovs-02.stand.loc:5000/v3/projects/c445f25f8c7e48a99ee7985309ed6954"
},
"name": "0745ee8b21a949fab34cd2d05265234c",
"network_id": "3bff4756-aed7-4603-8fec-cfbe83654f14",
"operation_mode": "1",
"parent_id": "default",
"project_type": "TRS",
"tags": [
"trs"
]
}
}
}
Getting TRS projects default values from the config file: TRS instances names pattern, availability zone.
Request parameters:¶
Request has no parameters.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" "http://controller:9364/v1/projects/actions/get-settings" | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
instance_name_pattern (Optional) | body | string | Instance name pattern. |
default_availability_zone (Optional) | body | string | Default availability zone. |
Example result in JSON format:
{
"project_settings": {
"instance_name_pattern": "trs-**",
"default_availability_zone": "nova"
}
}
Getting statistics of TRS project.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
project_id | path | string | Project ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" "http://controller:9364/v1/projects/$project_id/statistics" | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
created_servers (Optional) | body | string | Number of instances created. |
active_servers (Optional) | body | string | Number of active instances. |
error_servers (Optional) | body | string | Number of error instances. |
created_trs_servers (Optional) | body | string | Number of TRS instances created. |
active_trs_servers (Optional) | body | string | Number of active TRS instances. |
error_trs_servers (Optional) | body | string | Number of error TRS instances. |
free_trs_servers (Optional) | body | string | Number of free TRS instances (no associated users). |
occupied_trs_servers (Optional) | body | string | Number of occupied TRS instances. |
simultaneous_trs_servers (Optional) | body | string | Number of TRS instances for which more than one user is associated. |
Example result in JSON format:
{
"statistics": {
"created_servers": 10,
"active_servers": 8,
"error_servers": 1,
"created_trs_servers": 10,
"active_trs_servers": 8,
"error_trs_servers": 1,
"free_trs_servers": 2,
"occupied_trs_servers": 8,
"simultaneous_trs_servers": 4
}
}
Automatic allocation of free instances of project to users.
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
project_id | path | string | Project ID. |
with_os_object (Optional) | path | bool | Parameter that allows to extend the response with os_project object containing attributes of OpenStack instance. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" http://controller:9364/v1/projects/db172307fd47470ca0cf254427d22f14/actions/auto-allocate-users
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id (Optional) | body | string | Celery task ID. |
Example result in JSON format:
{
"task_id": "7c8fbc6c-468d-4afb-a292-e70a3d475edc"
}
TRS instances¶
Actions with TRS instances.
Creating new instance with type TRS
.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
name | body | string | Instance name. The maximum length of TRS instance name must not exceed 245 characters. |
count (Optional) | body | integer | Number of instances created. |
description (Optional) | body | string | Instance description. |
users (Optional) | body | array | TRS instance users. |
groups (Optional) | body | array | Instance users groups. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"server":{"name": "test_vm", "count": 1,"description":"Test TRS vm"}}' http://controller:9364/v1/servers/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | body | string | Instance ID. |
reservation_id (Optional) | body | string | Reservation ID of created instances. |
Example result in JSON format:
{
"servers": [
{
"id": "2506940c-22f9-4b81-a865-9aa6e7d7cba3",
},
{
"id": "0972fadc-6f8d-415a-b4cb-d4a0992b2370",
},
],
"reservation_id": "r-vd4o1bvy"
}
Editing TRS instance parameters.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
server_id | path | string | Instance ID. |
users (Optional) | body | array | TRS instance users. |
groups (Optional) | body | array | Instance users groups. |
Request example:¶
curl -X PUT -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"server":{"users": ["d91232fa-14ad-4e41-980a-d82dc9ea3929", "0972fadc-6f8d-415a-b4cb-d4a0992b2370"], "groups": ["d57e3c66-69bb-46d3-af75-28c41ed1076f"]}}' http://controller:9364/v1/servers/254ba49f-584b-419d-9e86-afe9aa8a122e | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | string | Instance ID. |
project_id | body | string | Project ID. |
assigned | body | string | Flag that indicates whether user or group is assigned to the instance. |
users (Optional) | body | array | TRS instance users. |
groups (Optional) | body | array | Instance users groups. |
Example result in JSON format:
{
"server": {
"id": "2506940c-22f9-4b81-a865-9aa6e7d7cba3",
"project_id": "3005d0d44cf84c7cbcb1ad1be83fba8f",
"assigned": true,
"users": ["d91232fa-14ad-4e41-980a-d82dc9ea3929",
"0972fadc-6f8d-415a-b4cb-d4a0992b2370"],
"groups": ["d57e3c66-69bb-46d3-af75-28c41ed1076f"]
}
}
Getting list of TRS instances.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
project_id (Optional) | path | string | Project ID. |
assigned (Optional) | path | string | Flag that indicates whether user or group is assigned to the instance. |
group (Optional) | path | string | Instance user group. |
user (Optional) | path | string | TRS instance user. |
with_os_object (Optional) | path | bool | Parameter that allows to extend the response with os_server object containing attributes of OpenStack instance. |
Parameters supporting modifiers are``project_id``, assigned
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/servers/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | body | string | Instance ID. |
project_id | body | string | Project ID. |
assigned | body | string | Flag that indicates whether user or group is assigned to the instance. |
users (Optional) | body | array | TRS instance users. |
groups (Optional) | body | array | Instance users groups. |
os_server (Optional) | body | object | OpenStack instance. |
Example result in JSON format:
{
"servers": [
{
"id": "2506940c-22f9-4b81-a865-9aa6e7d7cba3",
"project_id": "3005d0d44cf84c7cbcb1ad1be83fba8f",
"assigned": true,
"users": ["0972fadc-6f8d-415a-b4cb-d4a0992b2370"],
"groups": [],
},
{
"id": "0972fadc-6f8d-415a-b4cb-d4a0992b2370",
"project_id": "3005d0d44cf84c7cbcb1ad1be83fba8f",
"assigned": true,
"users": ["2506940c-22f9-4b81-a865-9aa6e7d7cba3",
"747488c2-5aa6-4d92-a982-e0319bee70e1"],
"groups": ["d91232fa-14ad-4e41-980a-d82dc9ea3929"],
}
]
}
Getting detailed information about TRS instance.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
server_id | path | string | Instance ID. |
with_os_object (Optional) | path | bool | Parameter that allows to extend the response with os_server object containing attributes of OpenStack instance. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" "http://controller:9364/v1/servers/$server_id?with_os_object=true" | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | body | string | Instance ID. |
project_id | body | string | Project ID. |
assigned | body | string | Flag that indicates whether user or group is assigned to the instance. |
users (Optional) | body | array | TRS instance users. |
groups (Optional) | body | array | Instance users groups. |
os_server (Optional) | body | object | OpenStack instance. |
Example result in JSON format:
{
"server": {
"groups": [
"4a2fa50aad544c81ae23dfb22a871755"
],
"id": "7ad6183a-817e-47c7-b848-741fdfbecc40",
"project_id": "184e540c7dc74df9ba31df50e1c3daf5",
"assigned": true,
"os_server": {
"OS-DCF:diskConfig": "MANUAL",
"OS-EXT-AZ:availability_zone": "test",
"OS-EXT-SRV-ATTR:host": null,
"OS-EXT-SRV-ATTR:hostname": "d2a83cd9-8ba7-4807-a29e-f59e11b7e49a-2",
"OS-EXT-SRV-ATTR:hypervisor_hostname": null,
"OS-EXT-SRV-ATTR:instance_name": "instance-00000009",
"OS-EXT-SRV-ATTR:kernel_id": "",
"OS-EXT-SRV-ATTR:launch_index": 1,
"OS-EXT-SRV-ATTR:ramdisk_id": "",
"OS-EXT-SRV-ATTR:reservation_id": "r-sr4oac5f",
"OS-EXT-SRV-ATTR:root_device_name": "/dev/vda",
"OS-EXT-SRV-ATTR:user_data": null,
"OS-EXT-STS:power_state": 0,
"OS-EXT-STS:task_state": null,
"OS-EXT-STS:vm_state": "active",
"OS-SRV-USG:launched_at": null,
"OS-SRV-USG:terminated_at": null,
"accessIPv4": "",
"accessIPv6": "",
"addresses": {},
"config_drive": "",
"created": "2018-12-17T12:25:04Z",
"description": null,
"flavor": {
"disk": 0,
"ephemeral": 0,
"extra_specs": {},
"original_name": "c1_r1G_d0",
"ram": 1024,
"swap": 0,
"vcpus": 1
},
"hostId": "",
"host_status": "",
"id": "7ad6183a-817e-47c7-b848-741fdfbecc40",
"image": {
"id": "d0bed70d-560d-48cd-bd20-0b1818545d39",
"links": [
{
"href": "http://dev-cnt7q-ovs-02.stand.loc:8774/ce1eaa969dd74cf0a33fe222f087533c/images/d0bed70d-560d-48cd-bd20-0b1818545d39",
"rel": "bookmark"
}
]
},
"key_name": null,
"links": [
{
"href": "http://dev-cnt7q-ovs-02.stand.loc:8774/v2.1/ce1eaa969dd74cf0a33fe222f087533c/servers/7ad6183a-817e-47c7-b848-741fdfbecc40",
"rel": "self"
},
{
"href": "http://dev-cnt7q-ovs-02.stand.loc:8774/ce1eaa969dd74cf0a33fe222f087533c/servers/7ad6183a-817e-47c7-b848-741fdfbecc40",
"rel": "bookmark"
}
],
"locked": false,
"metadata": {},
"name": "d2a83cd9-8ba7-4807-a29e-f59e11b7e49a-2",
"os-extended-volumes:volumes_attached": [],
"progress": 0,
"status": "ACTIVE",
"tags": [
"trs"
],
"tenant_id": "184e540c7dc74df9ba31df50e1c3daf5",
"updated": "2018-12-17T12:43:06Z",
"user_id": "cf5910a0ff0c43158c82f86a2b974b55"
},
"users": [
"47aa3ba7eb48459bac24c5929f49a3c3"
]
}
}
Users and user groups of TRS instances¶
Managing users and user groups of TRS instances.
Assigning users to TRS instance. All information about user assignments and cancellations is stored in database.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
server_id | path | string | Instance ID. |
users | body | array | TRS instance users. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"users": ["d91232fa-14ad-4e41-980a-d82dc9ea3929", "2506940c-22f9-4b81-a865-9aa6e7d7cba3"]}' http://controller:9364/v1/servers/246bc0c0-6f82-4343-8d9e-9c1ef706a3d0/users/
This operation has no response content.
Assigning user groups to TRS instance. All information about user group assignments and cancellations is stored in database.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
server_id | path | string | Instance ID. |
groups | body | array | Instance users groups. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"groups": ["d91232fa-14ad-4e41-980a-d82dc9ea3929", "2506940c-22f9-4b81-a865-9aa6e7d7cba3"]}' http://controller:9364/v1/servers/246bc0c0-6f82-4343-8d9e-9c1ef706a3d0/groups/
This operation has no response content.
Assigning users to TRS instances. All information about user assignments and cancellations is stored in database.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
user_id | path | string | User ID. |
servers | body | array | User TRS instances. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"servers": ["d91232fa-14ad-4e41-980a-d82dc9ea3929", "2506940c-22f9-4b81-a865-9aa6e7d7cba3"]}' http://controller:9364/v1/users/246bc0c0-6f82-4343-8d9e-9c1ef706a3d0/servers/
This operation has no response content.
Assigning user groups to TRS instances. All information about user group assignments and cancellations is stored in database.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
group_id | path | string | User group ID. |
servers | body | array | User group instances. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"servers": ["d91232fa-14ad-4e41-980a-d82dc9ea3929", "2506940c-22f9-4b81-a865-9aa6e7d7cba3"]}' http://controller:9364/v1/groups/246bc0c0-6f82-4343-8d9e-9c1ef706a3d0/servers/
This operation has no response content.
Getting a list of TRS machines of a user
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
user_id | path | string | User ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/users/bd4a97119113445e8d3ce323051b945d/servers/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
instance_id | body | string | Instance ID. |
project_id (Optional) | body | string | Project ID. |
project_name (Optional) | body | string | Project name, unique within the domain. |
Example result in JSON format:
{
"servers": [
{
"instance_id": "64946d43-6bec-4a34-898c-25b67426e3e4",
"project_id": "10145e7899324f03bef44502e316bf96",
"project_name": "fdd89303-1e16-4dfa-a48a-3d8de47f550a"
},
{
"instance_id": "937a0e68-98f7-474f-b2ed-f2b6ab121579",
"project_id": "10145e7899324f03bef44502e316bf96",
"project_name": "fdd89303-1e16-4dfa-a48a-3d8de47f550a"
}
]
}
Getting list of TRS instance users.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
server_id | body | string | Instance ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/servers/2506940c-22f9-4b81-a865-9aa6e7d7cba3/users/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | body | string | User ID. |
Example result in JSON format:
{
"users": [
{"id": "0972fadc-6f8d-415a-b4cb-d4a0992b2370"},
{"id": "2506940c-22f9-4b81-a865-9aa6e7d7cba3"},
{"id": "747488c2-5aa6-4d92-a982-e0319bee70e1"}
]
}
Getting list of TRS instance user groups.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
server_id | body | string | Instance ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/servers/2506940c-22f9-4b81-a865-9aa6e7d7cba3/groups/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | body | string | User group ID. |
Example result in JSON format:
{
"groups": [
{"id": "0972fadc-6f8d-415a-b4cb-d4a0992b2370"},
{"id": "2506940c-22f9-4b81-a865-9aa6e7d7cba3"},
{"id": "747488c2-5aa6-4d92-a982-e0319bee70e1"}
]
}
Unassign users to TRS instances.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
server_id | path | string | Instance ID. |
user_id | path | string | User ID. |
Request example:¶
curl -X DELETE -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/servers/0972fadc-6f8d-415a-b4cb-d4a0992b2370/users/747488c2-5aa6-4d92-a982-e0319bee70e1
This operation has no response content.
Unassign group users to TRS instances.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
server_id | path | string | Instance ID. |
group_id | path | string | User group ID. |
Request example:¶
curl -X DELETE -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/servers/0972fadc-6f8d-415a-b4cb-d4a0992b2370/groups/747488c2-5aa6-4d92-a982-e0319bee70e1
This operation has no response content.
Floating IP addresses¶
Actions with floating IP addresses.
Getting list of users with assigned floating IP address.
Request¶
Request parameters:¶
Request has no parameters.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/users/ | python -m json.tool
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | string | User ID. |
floating_ip_id | body | string | Floating IP ID. |
Example result in JSON format:
{
"users": [
{
"id": "56d88dd0a3ab4c4c8d1d15534352d7de",
"floating_ip_id": "c3bdc5ba-cdff-49d0-b84c-ac9329ab1410"
}
]
}
Getting user with assigned floating IP.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
user_id | path | string | User ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/users/$user_id | python -m json.tool
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | string | User ID. |
floating_ip_id (Optional) | body | string | Floating IP ID. |
Example result in JSON format:
{
"user": [
{
"id": "56d88dd0a3ab4c4c8d1d15534352d7de",
"floating_ip_id": "c3bdc5ba-cdff-49d0-b84c-ac9329ab1410"
}
]
}
Assigning floating IP address to user.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
user_id | path | string | User ID. |
floating_ip_id | body | string | Floating IP ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/users/$user_id/floating-ip -d '{"floating_ip_id": "c3bdc5ba-cdff-49d0-b84c-ac9329ab1410"}'
This operation has no response content.
Updating floating IP address assignment to user.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
user_id | path | string | User ID. |
floating_ip_id | body | string | Floating IP ID. |
Request example:¶
curl -X PUT -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/users/$user_id/floating-ip -d '{"floating_ip_id": "c3bdc5ba-cdff-49d0-b84c-ac9329ab1410"}'
This operation has no response content.
Sessions¶
Actions with sessions.
Getting of list sessions.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
user_id (Optional) | body | string | User ID. |
user_name (Optional) | body | string | Username. |
instance_id (Optional) | body | string | Instance ID. |
instance_name (Optional) | body | string | Instance name. |
project_id (Optional) | body | string | Project ID. |
connection_type (Optional) | body | string | Connection type. Possible values:
|
last (Optional) | body | bool | Additional parameter specifying whether to display only the latest sessions of instances. |
Parameters supporting modifiers are``user_id``, user_name
, instance_id
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/sessions/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
instance_id (Optional) | body | string | Instance ID. |
session_id (Optional) | body | string | Session ID. |
user_id (Optional) | body | string | User ID. |
user_name (Optional) | body | string | Username. |
connection_type (Optional) | body | string | Connection type. Possible values:
|
closed_at (Optional) | body | string | Session closing date and time. |
client_ip (Optional) | body | string | Client IP address. |
client_os (Optional) | body | string | Client operating system. |
client_info (Optional) | body | string | Client information. |
created_at (Optional) | body | string | Session creation time. |
Example result in JSON format:
{
"sessions": [
{
"instance_id": "e3afefea-7dfe-4754-8607-fb3f45b0fe07",
"session_id": "11fa220f-9f88-406a-ba79-0acbba83c32b",
"user_id": "56d88dd0a3ab4c4c8d1d15534352d7de",
"user_name": "admin",
"connection": "web",
"closed_at": null,
"client_ip": "192.168.0.2",
"client_os": "Ubuntu 16.04",
"client_info": "RSclient 0.1.0"
"created_at": "2018-10-31T12:59:43"
}
]
}
Getting number of sessions.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
user_id (Optional) | body | string | User ID. |
user_name (Optional) | body | string | Username. |
instance_id (Optional) | body | string | Instance ID. |
instance_name (Optional) | body | string | Instance name. |
project_id (Optional) | body | string | Project ID. |
connection_type (Optional) | body | string | Connection type. Possible values:
|
last (Optional) | body | bool | Additional parameter specifying whether to display only the latest sessions of instances. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/sessions/count | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
count (Optional) | body | integer | Number of objects. |
Example result in JSON format:
{
"count": 5
}
Adding new session.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
conn_type (Optional) | body | string | Connection type. Possible values:
|
instance_id | body | string | Instance ID. |
client_ip (Optional) | body | string | Client IP address. |
client_os (Optional) | body | string | Client operating system. |
client_info (Optional) | body | string | Client information. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"session": {"instance_id": "8735df50-6e08-462e-b091-1552f8588fd4", "conn_type": "web"}}' http://controller:9364/v1/sessions/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
instance_id (Optional) | body | string | Instance ID. |
user_id (Optional) | body | string | User ID. |
user_name (Optional) | body | string | Username. |
connection_type (Optional) | body | string | Connection type. Possible values:
|
closed_at (Optional) | body | string | Session closing date and time. |
client_ip (Optional) | body | string | Client IP address. |
client_os (Optional) | body | string | Client operating system. |
client_info (Optional) | body | string | Client information. |
created_at (Optional) | body | string | Session creation time. |
Example result in JSON format:
{
"session": {
"instance_id": "e3afefea-7dfe-4754-8607-fb3f45b0fe07",
"user_id": "56d88dd0a3ab4c4c8d1d15534352d7de",
"user_name": "admin",
"connection": "web",
"closed_at": null,
"client_ip": "192.168.0.2",
"client_os": "Ubuntu 16.04",
"client_info": "RSclient 0.1.0",
"created_at": "2018-10-31T12:59:43"
}
}
Assigning volumes to user¶
Assigning volumes to user.
Getting list of volume assignings.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
user_id (Optional) | path | string | User ID. |
project_id (Optional) | path | string | Project ID. |
volume_id (Optional) | path | string | Volume assignment ID. |
Parameters supporting modifiers are``user_id``, project_id
, volume_id
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/volume-assignments/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | string | Volume assignment ID. |
user_id | body | string | User ID. |
project_id | body | string | Project ID. |
volume_id | body | string | Volume assignment ID. |
Example result in JSON format:
{
"volume-assignments": [
{
"id": 5,
"project_id": "3005d0d44cf84c7cbcb1ad1be83fba8f",
"user_id": "c72a1b62a8194426a0e4c40a4b4d77a0",
"volume_id": "c8327ff2-eb85-4495-ab68-df4aa36d7ae0"
},
{
"id": 10,
"project_id": "3005d0d44cf84c7cbcb1ad1be83fba8f",
"user_id": "7ac2f8179b174f7bb5a34d9646e856ef",
"volume_id": "2f1a653b-2f5a-499c-a2b9-2a893b855504"
}
]
}
Getting information about volume assigning.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
assignment_id | path | string | Volume assignment ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/volume-assignments/5 | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | string | Volume assignment ID. |
user_id | body | string | User ID. |
project_id | body | string | Project ID. |
volume_id | body | string | Volume assignment ID. |
Example result in JSON format:
{
"volume-assignment": {
"id": 5,
"project_id": "3005d0d44cf84c7cbcb1ad1be83fba8f",
"user_id": "c72a1b62a8194426a0e4c40a4b4d77a0",
"volume_id": "c8327ff2-eb85-4495-ab68-df4aa36d7ae0"
}
}
Creating volume assignment to user.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
user_id | body | string | User ID. |
project_id | body | string | Project ID. |
volume_id | body | string | Volume assignment ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9364/v1/volume-assignments/ -d '{"user_id": "c72a1b62a8194426a0e4c40a4b4d77a0", "project_id": "3005d0d44cf84c7cbcb1ad1be83fba8f", "volume_id": "c8327ff2-eb85-4495-ab68-df4aa36d7ae0"}'
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | string | Volume assignment ID. |
user_id | body | string | User ID. |
project_id | body | string | Project ID. |
volume_id | body | string | Volume assignment ID. |
Example result in JSON format:
{
"volume-assignment": {
"id": 5,
"project_id": "3005d0d44cf84c7cbcb1ad1be83fba8f",
"user_id": "c72a1b62a8194426a0e4c40a4b4d77a0",
"volume_id": "c8327ff2-eb85-4495-ab68-df4aa36d7ae0"
}
}
TRS broker API¶
TRS instances¶
Interface provides ability to connect to TRS instance.
Getting of asynchronous task ID of getting instance address to connect.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
user | body | string | Username. |
password | body | string | User password. |
user_domain_name | body | string | User domain name. |
auth_tenant (Optional) | body | string | Project name, unique within the domain. |
project_domain_name (Optional) | body | string | Project domain name. |
ip_address (Optional) | body | string | IP address for creating instance security group rules. |
conn_type (Optional) | body | string | Connection type. Possible values:
|
os (Optional) | body | string | Client operating system. |
client (Optional) | body | string | Client information. |
Request parameters using authorization token:¶
Name | In | Type | Description |
---|---|---|---|
token | body | string | Authentication Token. |
auth_tenant (Optional) | body | string | Project name, unique within the domain. |
project_domain_name (Optional) | body | string | Project domain name. |
ip_address (Optional) | body | string | IP address for creating instance security group rules. |
conn_type (Optional) | body | string | Connection type. Possible values:
|
os (Optional) | body | string | Client operating system. |
client (Optional) | body | string | Client information. |
Request example:¶
curl -X POST -H "Content-Type: application/json" http://controller:9365/v1/request-vm/ -d '{"user": "trs", "password": "rR0666&4", "user_domain_name": "default"}' | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
X-Auth-Token | header | string | Authentication Token. |
request_id | body | string | Request ID. |
Example result in JSON format:
{
"request_id": "fe8775d4-1ac0-4224-9fec-93151e0bfc43"
}
Getting TRS instance IP by asynchronous task ID.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
request | body | string | Request ID. |
Request example:¶
curl -X POST -H "Authorization: Bearer $token" -H "Content-Type: application/json" http://controller:9365/v1/get-vm/ -d '{"request": "req-48a56205-f4b5-4c05-8c64-30342a7e1cee"}' | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
status | body | string | Request status. |
message | body | string | Request message. |
id | body | string | Instance ID. |
vm_state | body | string | Instance state. |
ip | body | string | Instance IP address. |
progress | body | integer | Progress state of the instance creation. It is provided by nova service. |
task_state | body | string | Task state. |
Example result in JSON format:
{
"status": "completed",
"message": null,
"server": {
"status": "ACTIVE",
"vm_state": "active",
"ip": "192.168.1.13",
"progress": 0,
"task_state": null,
"id": "c14d27cd-799e-4317-a430-af7c877703cf"
}
}
Getting list of TRS projects of user.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
user | body | string | Username. |
password | body | string | User password. |
user_domain_name | body | string | User domain name. |
Request example:¶
curl -X POST -H "Authorization: Bearer $token" -H "Content-Type: application/json" http://controller:9365/v1/get-projects/ -d '{"user": "trs", "password": "rR0666&4", "user_domain_name": "default"}' | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
projects | body | array | List of projects available to user. |
Example result in JSON format:
{
"projects": [
"trs_project1",
"trs_project2",
"trs_project3"
]
}
Description of errors in calls to TRS server¶
In case of an error, the server will return response with the HTTP 400 status, which will contain error
object with following parameters:
code
is error code;message
is short description of error;data
is additional error information.
List of error codes with description¶
Код ошибки | Описание на английском | Сообщение в RS клиенте на английском | Описание на русском | Сообщение в RS клиенте на русском |
---|---|---|---|---|
1 | Unexpected error occurred.
|
Unexpected error occurred. Please contact system administrator.
|
Произошла непредвиденная ошибка.
|
Произошла непредвиденная ошибка. Обратитесь к системному администратору.
|
2 | License expired.
|
License of RS server {cloud_url} got out. Please contact system administrator.
|
Истек срок действия лицензии.
|
Срок лицензии модуля RS сервер {cloud_url} истек. Обратитесь к системному администратору.
|
3 | Asynchronous task of getting an instance failed.
|
–
|
Ошибка при выполнении асинхронной задачи получения виртуальной машины.
|
–
|
4 | Failed to start asynchronous task of getting an instance.
|
–
|
Не удалось запустить асинхронную задачу получения виртуальной машины.
|
–
|
5 | No available TRS project in the specified domain found.
|
No available TRS project found. Please contact system administrator.
|
Нет доступных TRS проектов для пользователя в указанном домене.
|
Нет ни одного доступного TRS проекта. Обратитесь к системному администратору.
|
6 | Authentication error.
|
Invalid credentials. Please contact system administrator.
|
Ошибка аутентификации.
|
Неправильные учётные данные. Обратитесь к системному администратору.
|
7 | Password expired.
|
The password needs to be changed.
|
Истек срок действия пароля.
|
Необходимо изменить пароль.
|
8 | The specified project is not TRS.
|
Not a TRS project: {project_name}.
|
Указанный проект не является TRS проектом.
|
Проект {project_name} не является TRS проектом.
|
9 | Invalid request body.
|
–
|
Неверное тело запроса.
|
–
|
10 | Unable to find an instance obtain request by given ID.
|
–
|
Не удалось найти запрос на получение виртуальной машины по указанному ID.
|
–
|
11 | Forbidden to obtain an instance request.
|
–
|
Нет доступа к указанному запросу на получение виртуальной машины.
|
–
|
12 | Project quota exceeded.
|
Quota exceeded for TRS project “{project_name}”. Please contact system administrator.
|
Превышена квота проекта.
|
Превышена квота для TRS проекта “{project_name}”. Обратитесь к системному администратору.
|
13 | Instance creation failed.
|
Unable to create instance in project {project_name}. Please contact system administrator.
|
Не удалось создать новую виртуальную машину.
|
Не удалось создать виртуальную машину в проекте {project_name}. Обратитесь к системному администратору.
|
14 | No instances found in the specified project.
|
No instance found in project {project_name}. Please contact system administrator.
|
Нет доступных виртуальных машин в указанном проекте.
|
Не найдена виртуальная машина в проекте {project_name}. Обратитесь к системному администратору.
|
15 | Specified domain not found.
|
Domain {domain_name} not found.
|
Указанный домен не найден.
|
Домен {domain_name} не найден.
|
16 | Specified user not found.
|
User {user_name} not found in domain {domain_name}.
|
Указанный пользователь не найден.
|
Пользователь {user_name} не найден в домене {domain_name}.
|
17 | Instance is in an invalid state.
|
Instance with id {instance_id} is in invalid state: {instance_status}. Please contact system administrator.
|
Виртуальная машина находится в необрабатываемом статусе.
|
Виртуальная машина с ID {instance_id} находится в некорректном состоянии: {instance_status}. Обратитесь к системному администратору.
|
18 | Unable to obtain an instance IP address.
|
Unable to get IP address of instance with id {instance_id}. Please contact system administrator.
|
Не удалось получить IP-адрес виртуальной машины.
|
Не удалось получить IP-адрес виртуальной машины с ID {instance_id}. Обратитесь к системному администратору.
|
19 | Password expiration warning.
|
Password expires in {seconds} seconds and needs to be changed.
|
Предупреждение о том, что пароль скоро истечёт.
|
Ваш пароль истекает через {seconds} секунд, измените его.
|
20 | Warning that amount of authentications with current password is limited.
|
Password expired, {attempts} grace logins remain.
|
Предупреждение о том, что осталось ограниченное число аутентификаций с использованием текущего пароля.
|
Срок вашего пароля истек, осталось {attempts} попытки для входа.
|
21 | Authentication server is not available.
|
Authentication server is not available. Please contact system administrator.
|
Недоступен сервер аутентификации.
|
Сервер аутентификации недоступен. Обратитесь к системному администратору.
|
22 | Kerberos script file is not available because of it does not exist or it has wrong permissions.
|
Couldn’t change password because of the KERBEROS.script_path file doesn’t exist or it’s unaccessible. Please contact system administrator.
|
Файл скрипта для изменения пароля в Kerberos недоступен по причнине того, что он не найден или неверные права доступа.
|
Не удалось изменить пароль в связи с отсутствием файла KERBEROS.script_path или прав для его запуска. Обратитесь к системному администратору.
|
23 | Error while password change process, so script returned 1
|
Couldn’t change password because of an error while change password process execution. Please contact system administrator.
|
Ошибка во время выполнения скрипта изменения пароля, скрипт вернул код 1.
|
Не удалось изменить пароль в связи с ошибкой во время запуска процесса смены пароля. Обратитесь к системному администратору.
|
24 | Auth token is not valid.
|
Unexpected error occurred. Please contact system administrator.
|
Токен авторизации недействителен.
|
Произошла непредвиденная ошибка. Обратитесь к системному администратору.
|
25 | Failed to process asynchronous task of getting an instance.
|
–
|
Не удалось выполнить асинхронную задачу получения виртуальной машины.
|
–
|
26 | Request doesn’t match current Web Guard settings.
|
Invalid settings of Web Guard. Please contact system administrator.
|
Запрос не соответствует текущим настройкам Web Guard.
|
Неправильные настройки Web Guard.Обратитесь к системному администратору.
|
27 | OTP is required for authentication.
|
–
|
Для аутентификации требуется код OTP.
|
–
|
Example of error in JSON format:
{
"error": {
"message": "Quota exceeded for TRS project \"c70379f3-e905-431f-b3b4-d0820e225edf\".",
"code": 12,
"data": {
"project_name": "c70379f3-e905-431f-b3b4-d0820e225edf"
}
}
}
Passwords¶
Passwords management.
Changing user password.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
user | body | string | Username. |
user_domain_name | body | string | User domain name. |
password | body | string | User password. |
new_password | body | string | New user password. |
Request example:¶
curl -X POST -H "Authorization: Bearer $token" -H "Content-Type: application/json" http://controller:9365/v1/change-password/ -d '{"user": "demo", "user_domain_name": "default", "password": "123456", "new_password": "Qdr4H2d5bn01"}' | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
message | body | string | Message. |
Example result in JSON format:
{
"message": "Password successfully changed for user \'admin\'"
}
Celery tasks¶
Information about celery tasks.
Getting list of recent celery task IDs.
Request¶
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9364/v1/tasks
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id | body | string | Celery task ID. |
Example result in JSON format:
{
"tasks":[
"3519adaf-7669-499e-88eb-8f05f64514e2",
"013b9778-1d39-4b18-a06c-2780b67e1091",
"31c71e8a-26cd-4b8e-a4c5-9181d578616f",
"3e720334-7533-43b7-a079-24ea84b7a8a0",
"8869de12-3f44-4b96-a20e-80a03dd575a3",
"641de831-95b2-43ba-8fd5-7822ee5d6445",
"f0204f11-8e59-410a-8108-a73212c5439a",
"3b8eff74-55b1-4eb8-80e2-adf8472fc968",
"93e30a3c-117b-4e05-990d-4ff46ac5ac84",
"7c8fbc6c-468d-4afb-a292-e70a3d475edc"
]
}
Getting information about celery task by ID.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
task_id | body | string | Celery task ID. |
Request example:¶
curl -X GET -H "X-Auth-Token: $token" http://controller:9364/v1/tasks/$task_id
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
status | body | string | Task status. |
name (Optional) | body | string | Celery task name. |
traceback (Optional) | body | string | Traceback errors while executing a task. |
result (Optional) | body | string | Task result. |
Example result in JSON format:
{
"status":"SUCCESS"
}