API reference
System operations
Description
Detailed descriptions of each API operation including outputs.
Login
post
http://vlm.crp.cybexer.com/rest/system/login
Authenticates a user in the system. Returns authentication token if authentication succeeded.
The returned authentication token should be used for all other requests.
Requirements
- header Content-Type set to
application/x-www-form-urlencoded
- valid service_key header
- body content with username and password
Response
Returns authentication token if authentication succeeded.
Element | Description | Usage |
---|---|---|
auth_token | authentication token for current user | necessary for further interactions with API |
Sample Response
{ "auth_token": "6f0a48b5-b49f-432c-8197-e49d6eb98fe3" }
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Missing or bad authentication |
403 | Forbidden | Invalid service_key |
Sample Request
Content-Length: 31
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
---
username=tester&password=secret
Logout
post
http://vlm.crp.cybexer.com/rest/system/logout
Signs out user from the system making current authentication_token not valid for making any other requests.
Requirements
- valid service_key header
- valid authentication_token header
Response
No content.
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
204 | No content | Successfully logged out |
401 | Unauthorized | Missing or bad authentication |
403 | Forbidden | Invalid service_key |
Sample Request
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
auth_token: 064ce9a2-d448-4483-9af3-350debc11a9b
service_key: 899761897980392491406020450169825653298
System version
get
http://vlm.crp.cybexer.com/rest/system/version
Returns information concerning the latest application version.
Requirements
- valid service_key header
- valid authentication_token header
Response
{
"vlmName": "com.CybExer.VLM"
"vlmVersion": "3.5.0-SNAPSHOT",
"vlmBuildTime": "2016-05-09 15:33",
}
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Missing or bad authentication |
403 | Forbidden | Invalid service_key |
Sample Request
Accept: application/json
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
auth_token: 064ce9a2-d448-4483-9af3-350debc11a9b
service_key: 899761897980392491406020450169825653298
Project operations
Prerequisites
service_key parameter should be set in header in order for all operations to work.
Project Hierarchy
get
http://vlm.crp.cybexer.com/rest/project/hierarchy
Get all projects structure.
Requirements
- valid service_key header
- valid authentication_token header
Response
Returns structure of projects, which are allowed to be accessed via API.
Element | Description | Usage |
---|---|---|
auth_token | authentication token for current user | necessary for further interactions with API |
Response example
[
{
"id": "6f0a48b5-b49f-432c-8197-e49d6eb98fe3",
"name": "project_name",
"deploymentStatus": "DEPLOYED",
"teams": [
{
"id": "00ac0d54-10c2-4c89-9ecd-a6794b3225d0",
"name": "team-003-pr",
"index": 2,
"folders": [
{
"id": "e45bd767-1109-42db-aae5-0d27ad15f458",
"name": "/",
"virtualMachines": [],
"vmsAllowed": false
},
{
"id": "da163be5-bbe3-4f03-8fa6-35741fd9f831",
"name": "/a/b/c/",
"virtualMachines": [
{
"id": "429b69e4-7679-4eb6-bd02-ea6100ac43c3",
"name": "vm_name"
}
],
"vmsAllowed": true
}
]
},
...
]
},
...
]
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Wrong credentials |
403 | Forbidden | Wrong service key |
Sample request
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Get Virtual Machines
get
http://vlm.crp.cybexer.com/rest/{projectId}/vm
Get project's virtual machines.
Requirements
- valid service_key header
- valid authentication_token header
- project ID as path parameter
Response
Returns list of virtual machines with their corresponding data, which belong to given project.
Response example
{
"offset": 0,
"count": 10,
"totalCount": 25,
"projectId": "cb6580ef-c15e-4931-ba95-dee1bb346cdf",
"vms": [
{
"id": "1b3093e9-f670-403c-88f3-060a3d0ebf25",
"name": "vm_lc_0_0",
"parentId": "da163be5-bbe3-4f03-8fa6-35741fd9f831",
"vcId": vm-95083",
"powerState": "poweredOn",
"guestOsFamily": "windowsGuest",
"guestOs": "Microsoft Windows 8 (64-bit)",
"ipAddresses": [
{
"ipV4": "169.254.184.91",
"ipV6": "fe80::1555:82ef:8ac6:b85b"
}
],
"thumbnail": "http://localhost:8080/rest/vm/1b3093e9-f670-403c-88f3-060a3d0ebf25/screen?width=200height=150"
},
{
"id": class="string">"a8527c4a-b3aa-4185-bb2b-41fc23c8bc0e",
"name": "vm_lc_0_10",
"parentId": "da163be5-bbe3-4f03-8fa6-35741fd9f831",
"vcId": "vm-95100",
"powerState": "poweredOff",
"ipAddresses":[]
},
...
]
}
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Wrong credentials |
403 | Forbidden | Wrong service key |
404 | Not found | Possibly wrong project id |
Sample request
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Get Virtual Machine Definitions
get
http://vlm.crp.cybexer.com/rest/project/{projectId}/vmdefinitions
Get project's virtual machine definitions.
Requirements
- valid service_key header
- valid authentication_token header
- project ID as path parameter
Response
Returns list of virtual machine definitions with their corresponding data, which belong to chosen project
Element | Description | Usage |
---|---|---|
projectId | Id of the project |
Response example
{
"projectId": "6f0a48b5-b49f-432c-8197-e49d6eb98fe3",
"vmDefinitions": [
{
"projectId": "cb6580ef-c15e-4931-ba95-dee1bb346cdf",
"id": "8cae7a4e-fcab-4005-9b70-5c528d3c3085",
"name": "dm_vm_20160314_1-clone"
},
{
"projectId": "cb6580ef-c15e-4931-ba95-dee1bb346cdf",
"id": "23f702ee-a315-4cea-b5a2-5a7df3819d62",
"name": "vm_20160314_1"
}
]
}
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Missing or bad authentication |
403 | Forbidden | Invalid service_key |
404 | Not found | Possibly wrong project id |
Sample request
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Team operations
Detailed descriptions of each API operation including outputs.
Prerequisites
service_key parameter should be set in header in order for all operations to work.
Get Team Virtual Machines
get
http://vlm.crp.cybexer.com/rest/team/{teamId}/vm
Returns team virtual machines.
Requirements
- valid service_key header
- valid authentication_token header
- team ID as path parameter
Response
Returns list of virtual machines with their corresponding data, which belong to chosen project.
Response example
{
"offset": 0,
"count": 10,
"totalCount": 25,
"projectId": "cb6580ef-c15e-4931-ba95-dee1bb346cdf",
"vms": [
{
"id": "1b3093e9-f670-403c-88f3-060a3d0ebf25",
"name": "vm_lc_0_0"
"parentId": "da163be5-bbe3-4f03-8fa6-35741fd9f831",
"vcId": vm-95083"
"powerState": "poweredOn",
"guestOsFamily": "windowsGuest",
"guestOs": "Microsoft Windows 8 (64-bit)",
"ipAddresses": [
{
"ipV4": "169.254.184.91",
"ipV6": "fe80::1555:82ef:8ac6:b85b",
}
],
"thumbnail": "http://localhost:8080/rest/vm/1b3093e9-f670-403c-88f3-060a3d0ebf25/screen?width=200height=150"
},
{
"id": class="string">"a8527c4a-b3aa-4185-bb2b-41fc23c8bc0e",
"name": "vm_lc_0_10",
"parentId": "da163be5-bbe3-4f03-8fa6-35741fd9f831",
"vcId": "vm-95100",
"powerState": "poweredOff",
"ipAddresses":[]
},
...
]
}
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Wrong credentials |
403 | Forbidden | Wrong service key |
Sample request
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Get Virtual Machines In Folder
get
http://vlm.crp.cybexer.com/rest/team/{teamId}/folder/{inventoryLocationSpecId}/vm
Returns team virtual machines in given folder.
Requirements
- valid service_key header
- valid authentication_token header
- team ID as path parameter
- inventry location spec ID as path parameter
Response
Returns list of virtual machines with their corresponding data, which belong to chosen project.
Response example
{
"offset": 0,
"count": 10,
"totalCount": 25,
"projectId": "cb6580ef-c15e-4931-ba95-dee1bb346cdf",
"vms": [
{
"id": "1b3093e9-f670-403c-88f3-060a3d0ebf25",
"name": "dm_vm_lc_0_0",
"parentId": "da163be5-bbe3-4f03-8fa6-35741fd9f831",
"vcId": vm-95083",
"powerState": "poweredOn",
"guestOsFamily": "windowsGuest",
"guestOs": "Microsoft Windows 8 (64-bit)",
"ipAddresses": [
{
"ipV4": "169.254.184.91",
"ipV6": "fe80::1555:82ef:8ac6:b85b"
}
],
"thumbnail": "http://localhost:8080/rest/vm/1b3093e9-f670-403c-88f3-060a3d0ebf25/screen?width=200height=150",
},
{
"id": class="string">"a8527c4a-b3aa-4185-bb2b-41fc23c8bc0e",
"name": "vm_lc_0_10",
"parentId": "da163be5-bbe3-4f03-8fa6-35741fd9f831",
"vcId": "vm-95100",
"powerState": "poweredOff",
"ipAddresses":[]
},
...
]
}
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Wrong credentials |
403 | Forbidden | Wrong service key |
404 | Not found | Possibly wrong team id |
Sample request
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Virtual Machine operations
Detailed descriptions of each API operation including outputs.
Prerequisites
service_key parameter should be set in header in order for all operations to work.
Get Virtual Machine screen
get
http://vlm.crp.cybexer.com/rest/vm/{vmId}/screen
Get screenshot of virtual machine's console.
Requirements
- valid service_key header
- valid authentication_token header
- virtual machine ID as path parameter
Response
Returns screenshot of virtual machine's console.
Element | Description | Usage |
---|---|---|
auth_token | authentication token for current user | necessary for further interactions with API |
Response example
will return PNG image
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Wrong credentials |
403 | Forbidden | Wrong service key |
Sample request
Accept: application/png
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Get Virtual Machine Info
get
http://vlm.crp.cybexer.com/rest/vm/{vmId}
DescriptionReturns virtual machines info.
Requirements
- valid service_key header
- valid authentication_token header
- virtual machine ID as path parameter
Response
Returns list of virtual machines with their corresponding data, which belong to chosen project.
Response example
{
"id": "6f0a48b5-b49f-432c-8197-e49d6eb98fe3",
"name": "vm_name",
"parentId": "da163be5-bbe3-4f03-8fa6-35741fd9f831",
"vcId": "vm-94991",
"powerState": "poweredOn",
"guestOsFamily": "windowsGuest",
"guestOs": "Microsoft Windows 8 (64-bit)",
"hostname": "TemplateVM",
"ipAddresses": [
{
"ipV4": "10.113.115.2",
"ipV6": "fe80::5086:a829:338a:a5f6",
}
],
"thumbnail": "http://localhost:8080/rest/vm/429b69e4-7679-4eb6-bd02-ea6100ac43c3/screen?width=1024#38height=768",
}
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Wrong credentials |
403 | Forbidden | Wrong service key |
Sample request
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Power off Virtual Machine
patch
http://vlm.crp.cybexer.com/rest/vm/{vmId}/powerOff
Returns powers off virtual machine.
Requirements
- valid service_key header
- valid authentication_token header
- virtual machine ID as path parameter
Response
Returns list of virtual machines with their corresponding data, which belong to chosen project.
Element | Description | Usage |
---|---|---|
auth_token | authentication token for current user | necessary for further interactions with API |
Response example
{
"id": "6f0a48b5-b49f-432c-8197-e49d6eb98fe3",
"name": "vm_name",
"parentId": "da163be5-bbe3-4f03-8fa6-35741fd9f831",
"vcId": "vm-94991",
"powerState": "poweredOn",
"guestOsFamily": "windowsGuest",
"guestOs": "Microsoft Windows 8 (64-bit)",
"hostname": "TemplateVM",
"ipAddresses": [
{
"ipV4": "10.113.115.2",
"ipV6": "fe80::5086:a829:338a:a5f6",
}
],
"thumbnail": "http://localhost:8080/rest/vm/429b69e4-7679-4eb6-bd02-ea6100ac43c3/screen?width=1024#38height=768"
}
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Wrong credentials |
403 | Forbidden | Wrong service key |
404 | Not found | Possibly wrong virtual machine id |
Sample request
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Power on Virtual Machine
patch
http://vlm.crp.cybexer.com/rest/vm/{vmId}/powerOn
Returns powers on virtual machine.
Requirements
- valid service_key header
- valid authentication_token header
- virtual machine ID as path parameter
Response
Returns list of virtual machines with their corresponding data, which belong to chosen project.
Response example
{
"id": "6f0a48b5-b49f-432c-8197-e49d6eb98fe3",
"name": "vm_name",
"parentId": "da163be5-bbe3-4f03-8fa6-35741fd9f831",
"vcId": "vm-94991",
"powerState": "poweredOn",
"guestOsFamily": "windowsGuest",
"guestOs": "Microsoft Windows 8 (64-bit)",
"hostname": "TemplateVM",
"ipAddresses": [
{
"ipV4": "10.113.115.2",
"ipV6": "fe80::5086:a829:338a:a5f6",
}
],
"thumbnail": "http://localhost:8080/rest/vm/429b69e4-7679-4eb6-bd02-ea6100ac43c3/screen?width=1024#38height=768"
}
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Wrong credentials |
403 | Forbidden | Wrong service key |
404 | Not found | Possibly wrong virtual machine id |
Sample request
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Reset Virtual Machine
patch
http://vlm.crp.cybexer.com/rest/vm/{vmId}/reset
Resets virtual machine.
Requirements
- valid service_key header
- valid authentication_token header
- virtual machine ID as path parameter
Response
Returns list of virtual machines with their corresponding data, which belong to chosen project.
Response example
{
"id": "6f0a48b5-b49f-432c-8197-e49d6eb98fe3",
"name": "vm_name",
"parentId": "da163be5-bbe3-4f03-8fa6-35741fd9f831",
"vcId": "vm-94991",
"powerState": "poweredOn",
"guestOsFamily": "windowsGuest",
"guestOs": "Microsoft Windows 8 (64-bit)",
"hostname": "TemplateVM",
"ipAddresses": [
{
"ipV4": "10.113.115.2",
"ipV6": "fe80::5086:a829:338a:a5f6",
}
],
"thumbnail": "http://localhost:8080/rest/vm/429b69e4-7679-4eb6-bd02-ea6100ac43c3/screen?width=1024#38height=768"
}
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Wrong credentials |
403 | Forbidden | Wrong service key |
404 | Not found | Possibly wrong virtual machine id |
Sample request
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Shut down Virtual Machine
patch
http://vlm.crp.cybexer.com/rest/vm/{vmId}/shutdown
Shuts down the specified virtual machine.
Requirements
- valid service_key header
- valid authentication_token header
- virtual machine ID as path parameter
Response
Returns info about given virtual machine, including power state.
Response example
{
"id": "6f0a48b5-b49f-432c-8197-e49d6eb98fe3",
"name": "vm_name",
"parentId": "da163be5-bbe3-4f03-8fa6-35741fd9f831",
"vcId": "vm-94991",
"powerState": "poweredOn",
"guestOsFamily": "windowsGuest",
"guestOs": "Microsoft Windows 8 (64-bit)",
"hostname": "TemplateVM",
"ipAddresses": [
{
"ipV4": "10.113.115.2",
"ipV6": "fe80::5086:a829:338a:a5f6",
}
],
"thumbnail": "http://localhost:8080/rest/vm/429b69e4-7679-4eb6-bd02-ea6100ac43c3/screen?width=1024#38height=768"
}
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Missing or bad authentication |
403 | Forbidden | Invalid service_key |
404 | Not found | Possibly wrong virtual machine id |
Sample request
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Restart Virtual Machine
patch
http://vlm.crp.cybexer.com/rest/vm/{vmId}/restart
Restarts virtual machine.
Requirements
- valid service_key header
- valid authentication_token header
- virtual machine ID as path parameter
Response
Returns list of virtual machines with their corresponding data, which belong to chosen project.
Response example
{
"id": "6f0a48b5-b49f-432c-8197-e49d6eb98fe3",
"name": "vm_name",
"parentId": "da163be5-bbe3-4f03-8fa6-35741fd9f831",
"vcId": "vm-94991",
"powerState": "poweredOn",
"guestOsFamily": "windowsGuest",
"guestOs": "Microsoft Windows 8 (64-bit)",
"hostname": "TemplateVM",
"ipAddresses": [
{
"ipV4": "10.113.115.2",
"ipV6": "fe80::5086:a829:338a:a5f6",
}
],
"thumbnail": "http://localhost:8080/rest/vm/429b69e4-7679-4eb6-bd02-ea6100ac43c3/screen?width=1024#38height=768"
}
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Missing or bad authentication |
403 | Forbidden | Invalid service_key |
404 | Not found | Possibly wrong virtual machine id |
Sample request
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Console Virtual Machine
get
http://vlm.crp.cybexer.com/rest/vm/{vmId}/console
Get specified virtual machine's web console URL.
Requirements
- valid service_key header
- valid authentication_token header
- virtual machine ID as path parameter
Response
Returns chosen virtual machine's web console URL.
Response example
{ "url": "ws://localhost:8080/webconsole/vm-94991" }
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Missing or bad authentication |
403 | Forbidden | Invalid service_key |
404 | Not found | Possibly wrong virtual machine id |
Sample request
Accept: application/png
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Get Deployment Preparative Info
get
http://vlm.crp.cybexer.com/rest/deployment/deployment_teams/{vm_definition_id}
Get deployment preparative info.
Requirements
- valid service_key header
- valid authentication_token header
- list of virtual machine definition IDs as path parameter
Response
Returns teams, VM definitions information which should be used to start a deployment.
Response example
"teams":
[
{
"id": "441fe8ba-830c-45f6-a846-a3fa88ec8db2",
"name": "team-001-pr",
"status": "VM_CONFLICT",
"vms": [
{
"vmName": "vm_name_1",
"userName": "username_1",
"date": 11458554970179,
},
{
"vmName": "vm_name_2",
"userName": "username_2",
"date": 11458554970179,
},
....
]
},
{
"id": "441fe8ba-830c-45f6-a846-a3fa88ec8db2",
"name": "team-001-pr",
"status": "TEAM_IN_USE",
"vms": [
{
"vmName": "vm_name_1",
"userName": "username_1",
"date": 11458554970179,
}
]
},
],
"vmDefinitions":
[
"priority": 1,
"status": "CANCELLED"
},
{
"id": "9d66ce21-447f-46be-9aa5-1f67c4f48344",
"vmNamePattern": "vm_name_{%}_{$}",
"numberOfVms": "20",
"priority": 1,
}
...
]
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Missing or bad authentication |
403 | Forbidden | Invalid service_key |
404 | Not found | Possibly wrong project id |
Sample request
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Get Deployment Info
get
http://vlm.crp.cybexer.com/rest/deployment/{id}
Get information about deployment.
Requirements
- valid service_key header
- valid authentication_token header
- deployment ID as path parameter
Response
Returns information regarding existing deployment.
Response example
{
"id": "9fcc97b2-0670-4e3e-a5c8-b6dea2d1c203",
"action": "DEPLOY",
"type": "VM",
"status": "CANCELLED",
"loginName": "tester",
"startTime": 1463864400000,
"projectId": "cb6580ef-c15e-4931-ba95-dee1bb346cdf",
"projectName": "project_name",
"usePortsPrecheck": false,
"vms":
[
{
"id": "7298396f-4dbc-4ed6-b410-6345cab8a6a2",
"vmName": "vm_lc_1_4",
"vmDefinitionName": "vm_20160314_1-clone",
"teamName": "team-002-pr",
"priority": 1,
"status": "CANCELLED"
},
{
"id": "9d66ce21-447f-46be-9aa5-1f67c4f48344",
"vmNamePattern": "vm_name_{%}_{$}",
"numberOfVms": "20",
"priority": 1,
}
...
]
}
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Missing or bad authentication |
403 | Forbidden | Invalid service_key |
404 | Not found | Possibly wrong project id |
Sample request
Content-Length: 31
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
Start Deployment
patch
http://vlm.crp.cybexer.com/rest/deployment/start
Starts deployment by given deployment specification.
Requirements
- valid service_key header
- valid authentication_token header
- body content with deployment specification
Response
Returns started deployment's ID.
Element | Description | Usage |
---|---|---|
deployment id | started deployment's ID | necessary for further interactions with started deployment |
Response example
"6f0a48b5-b49f-432c-8197-e49d6eb98fe3"
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
401 | Unauthorized | Missing or bad authentication |
403 | Forbidden | Invalid service_key |
404 | Not found | possibly wrong deployment id |
Sample request
Content-Length: 31
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Content-Type: application/x-www-form-urlencoded
service_key: 899761897980392491406020450169825653298
---
{
"usePortsPrecheck": false,
"scheduledStartTime": 1463864400000,
"teamUuids": [
"441fe8ba-830c-45f6-a846-a3fa88ec8db2"
],
"vmDefinitionUuids": [
"8cae7a4e-fcab-4005-9b70-5c528d3c3085"
],
"vmCountLimits": [
{
"vmDefinitionId": "8cae7a4e-fcab-4005-9b70-5c528d3c3085",
"lower": 1,
"upper": 1
}
]
}
Cancel deployment
patch
http://vlm.crp.cybexer.com/rest/deployment/{deploymentId}/cancel
Marks the specified deployment for cancellation.
Requirements
- valid service_key header
- valid authentication_token header
- deployment ID as path parameter
Response
No value
Response messages
HTTP Status code | Reason | Additional info |
---|---|---|
202 | Accepted | the request has been accepted for processing |
401 | Unauthorized | Missing or bad authentication |
403 | Forbidden | Invalid service_key |
404 | Not found | possibly wrong deployment id |
Sample request
Accept: application/json
A Accept-Encoding: gzip, deflate, sdch
A Accept-Language: en-US,en;q=0.8
auth_token: 064ce9a2-d448-4483-9af3-350debc11a9b
service_key: 899761897980392491406020450169825653298
Errors
If any error should occur APIException with detailed message
Sample error message
{
"errors": [
"VM definition 'dm_vm_20160314_1-clone' is being modified by another user ('tester')"
]
}