Workloads List Workloads
GET
https://$(tvm_address):8780/v1/$(tenant_id)/workloads
Provides the list of all workloads for the given tenant/project id
Path Parameters
Query Parameters
200 This response shows workloads existing in the admin project including important information like status, name, description, or workload type.
Create Workload
POST
https://$(tvm_address):8780/v1/$(tenant_id)/workloads
Creates a workload in the provided Tenant/Project with the given details.
Path Parameters
202 Response upon successfully starting the workload creation process.
Copy HTTP/1.1 202 Accepted
Server: nginx/1.16.1
Date: Thu, 29 Oct 2020 15:42:02 GMT
Content-Type: application/json
Content-Length: 703
Connection: keep-alive
X-Compute-Request-Id: req-443b9dea-36e6-4721-a11b-4dce3c651ede
{
"workload":{
"project_id":"c76b3355a164498aa95ddbc960adc238",
"user_id":"ccddc7e7a015487fa02920f4d4979779",
"id":"c4e3aeeb-7d87-4c49-99ed-677e51ba715e",
"name":"API created",
"snapshots_info":"",
"description":"API description",
"workload_type_id":"f82ce76f-17fe-438b-aa37-7a023058e50d",
"status":"creating",
"created_at":"2020-10-29T15:42:01.000000",
"updated_at":"2020-10-29T15:42:01.000000",
"scheduler_trust":null,
"links":[
{
"rel":"self",
"href":"http://wlm_backend/v1/c76b3355a164498aa95ddbc960adc238/workloads/c4e3aeeb-7d87-4c49-99ed-677e51ba715e"
},
{
"rel":"bookmark",
"href":"http://wlm_backend/c76b3355a164498aa95ddbc960adc238/workloads/c4e3aeeb-7d87-4c49-99ed-677e51ba715e"
}
]
}
}
Body format
Workload create requires a Body in json format, to provide the requested information.
Using a policy-id will pull the following information from the policy. Values provided in the Body will be overwritten with the values from the Policy.
Copy retention_policy_type
retention_policy_value
interval
Copy {
"workload":{
"name":"<name of the Workload>",
"description":"<description of workload>",
"workload_type_id":"<ID of the chosen Workload Type",
"source_platform":"openstack",
"instances":[
{
"instance-id":"<Instance ID>"
},
{
"instance-id":"<Instance ID>"
}
],
"jobschedule":{
"retention_policy_type":"<'Number of Snapshots to Keep'/'Number of days to retain Snapshots'>",
"retention_policy_value":"<Integer>"
"timezone":"<timezone>",
"start_date":"<Date format: MM/DD/YYYY>"
"end_date":"<Date format MM/DD/YYYY>",
"start_time":"<Time format: HH:MM AM/PM>",
"interval":"<Format: Integer hr",
"enabled":"<True/False>"
},
"metadata":{
<key>:<value>,
"policy_id":"<policy_id>"
}
}
}
Show Workload
GET
https://$(tvm_address):8780/v1/$(tenant_id)/workloads/<workload_id>
Shows all details of a specified workload
Path Parameters
200
Copy HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Mon, 02 Nov 2020 12:08:42 GMT
Content-Type: application/json
Content-Length: 1536
Connection: keep-alive
X-Compute-Request-Id: req-afb76abb-aa33-427e-8219-04fc2b91bce0
{
"workload":{
"created_at":"2020-10-29T15:42:01.000000",
"updated_at":"2020-10-29T15:42:18.000000",
"id":"c4e3aeeb-7d87-4c49-99ed-677e51ba715e",
"user_id":"ccddc7e7a015487fa02920f4d4979779",
"project_id":"c76b3355a164498aa95ddbc960adc238",
"availability_zone":"nova",
"workload_type_id":"f82ce76f-17fe-438b-aa37-7a023058e50d",
"name":"API created",
"description":"API description",
"interval":null,
"storage_usage":{
"usage":0,
"full":{
"snap_count":0,
"usage":0
},
"incremental":{
"snap_count":0,
"usage":0
}
},
"instances":[
{
"id":"08dab61c-6efd-44d3-a9ed-8e789d338c1b",
"name":"cirros-4",
"metadata":{
}
},
{
"id":"7c1bb5d2-aa5a-44f7-abcd-2d76b819b4c8",
"name":"cirros-3",
"metadata":{
}
}
],
"metadata":{
"hostnames":"[]",
"meta":"data",
"policy_id":"b79aa5f3-405b-4da4-96e2-893abf7cb5fd",
"preferredgroup":"[]",
"workload_approx_backup_size":"6"
},
"jobschedule":{
"retention_policy_type":"Number of Snapshots to Keep",
"end_date":"15/27/2020",
"start_time":"3:00 PM",
"interval":"5",
"enabled":false,
"retention_policy_value":"10",
"timezone":"UTC+2",
"start_date":"10/27/2020",
"fullbackup_interval":"-1",
"appliance_timezone":"UTC",
"global_jobscheduler":true
},
"status":"available",
"error_msg":null,
"links":[
{
"rel":"self",
"href":"http://wlm_backend/v1/c76b3355a164498aa95ddbc960adc238/workloads/c4e3aeeb-7d87-4c49-99ed-677e51ba715e"
},
{
"rel":"bookmark",
"href":"http://wlm_backend/c76b3355a164498aa95ddbc960adc238/workloads/c4e3aeeb-7d87-4c49-99ed-677e51ba715e"
}
],
"scheduler_trust":null
}
}
Modify Workload
PUT
https://$(tvm_address):8780/v1/$(tenant_id)/workloads/<workload_id>
Modifies a workload in the provided Tenant/Project with the given details.
Path Parameters
202 Workload modify request has been received and accepted by the API
Copy HTTP/1.1 202 Accepted
Server: nginx/1.16.1
Date: Mon, 02 Nov 2020 12:31:42 GMT
Content-Type: application/json
Content-Length: 0
Connection: keep-alive
X-Compute-Request-Id: req-674a5d71-4aeb-4f99-90ce-7e8d3158d137
Body format
Workload modify requires a Body in json format, to provide the information about the values to modify.
All values in the body are optional.
Using a policy-id will pull the following information from the policy. Values provided in the Body will be overwritten with the values from the Policy.
Copy retention_policy_type
retention_policy_value
interval
Copy {
"workload":{
"name":"<name>",
"description":"<description>"
"instances":[
{
"instance-id":"<instance_id>"
},
{
"instance-id":"<instance_id>"
}
],
"jobschedule":{
"retention_policy_type":"<'Number of Snapshots to Keep'/'Number of days to retain Snapshots'>",
"retention_policy_value":"<Integer>",
"timezone":"<timezone>",
"start_time":"<HH:MM AM/PM>",
"end_date":"<MM/DD/YYYY>",
"interval":"<Integer hr>",
"enabled":"<True/False>"
},
"metadata":{
"meta":"data",
"policy_id":"<policy_id>"
},
}
}
Delete Workload
DELETE
https://$(tvm_address):8780/v1/$(tenant_id)/workloads/<workload_id>
Deletes the specified Workload.
Path Parameters
Query Parameters
202 Workload delete has been received and accepted.
Copy HTTP/1.1 202 Accepted
Server: nginx/1.16.1
Date: Mon, 02 Nov 2020 13:31:00 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive
Unlock Workload
POST
https://$(tvm_address):8780/v1/$(tenant_id)/workloads/<workload_id>/unlock
Unlocks the specified Workload
Path Parameters
202 Request to unlock the Workload has been received and accepted
Copy HTTP/1.1 202 Accepted
Server: nginx/1.16.1
Date: Mon, 02 Nov 2020 13:41:55 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive
Reset Workload
POST
https://$(tvm_address):8780/v1/$(tenant_id)/workloads/<workload_id>/reset
Resets the defined workload
Path Parameters
202 Reset request has been received and accepted
Copy HTTP/1.1 202 Accepted
Server: nginx/1.16.1
Date: Mon, 02 Nov 2020 13:52:30 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive