Workloads

Field Descriptions

Below are some of the most common fields you will find in the request and response bodies while working with these APIs.

Workload Fields

Field
Type
Description

name

String

Name of the workload.

description

String

Description of the workload.

workload_type_id

String

Unique identifier for the selected workload type.

source_platform

String

Specifies the source platform (e.g., openstack).

Instance List

Field
Type
Description

instance-id

String

Unique identifier of the instance to be included in the workload.

Job Schedule

Field
Type
Description

timezone

String

Time zone for the job schedule.

start_date

String

Start date of the schedule (Format: MM/DD/YYYY).

end_date

String

End date of the schedule (Format: MM/DD/YYYY).

start_time

String

Time when the schedule begins (Format: HH:MM AM/PM).

enabled

Boolean

True if scheduling is enabled, False otherwise.

Scheduling Types

Schedule Type
Field
Type
Description
Dependencies

Hourly

interval

Integer

Backup interval in hours (1, 2, 3, 4, 6, 12, 24).

if schedule enabledis set to true, you must provide Hourly field.

retention

Integer

Retention period in backups.

snapshot_type

String

Snapshot type (incremental or full).

Daily

backup_time

List of String

List of specific times (HH:MM, 24-hour format).

Requires hourly

retention

Integer

Retention period in backups.

snapshot_type

String

Snapshot type (incremental or full).

Weekly

backup_day

List of String

Days of the week (mon, tue, wed, thu, fri, sat, sun).

Requires daily

retention

Integer

Retention period in backups.

snapshot_type

String

Only supports full backups.

Monthly

month_backup_day

List of Integer

Days of the month (1-31).

Requires daily

retention

Integer

Retention period in backups.

snapshot_type

String

Only supports full backups.

Yearly

backup_month

List of String

List of months (jan, feb, mar, ... dec).

Requires monthly

retention

Integer

Retention period in backups.

snapshot_type

String

Only supports full backups.

Manual

retention

Integer

Retention period in backups.

retention_days_to_keep

Integer

Number of days to keep backups manually triggered.

Metadata

Field
Type
Description

<key>

String

Custom metadata key-value pairs.

policy_id

String

ID of the backup policy associated with the workload.

Backup Target Types

Field
Type
Description

backup_target_types

String

Backup target type ID specifying where the backups will be stored.

List Workloads

GET https://<wlm_api_endpoint>/workloads

Provides the list of all workloads for the given tenant/project ID

Path Parameters

Parameter Name
Description

wlm_api_endpoint

The endpoint URL of the Workloadmgr service

Query Parameters

Name
Type
Description

nfs_share

string

lists workloads located on a specific nfs-share

all_workloads

boolean

admin role required - True lists workloads of all tenants/projects

Headers

Name
Type
Description

X-Auth-Project-Id

string

project to run the authentication against

X-Auth-Token

string

Authentication token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

Sample Response
HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Thu, 29 Oct 2020 14:55:40 GMT
Content-Type: application/json
Content-Length: 3480
Connection: keep-alive
X-Compute-Request-Id: req-a2e49b7e-ce0f-4dcb-9e61-c5a4756d9948

{
   "workloads":[
      {
         "project_id":"4dfe98a43bfa404785a812020066b4d6",
         "user_id":"adfa32d7746a4341b27377d6f7c61adb",
         "id":"8ee7a61d-a051-44a7-b633-b495e6f8fc1d",
         "name":"worklaod1",
         "snapshots_info":"",
         "description":"no-description",
         "workload_type_id":"f82ce76f-17fe-438b-aa37-7a023058e50d",
         "status":"available",
         "created_at":"2020-10-26T12:07:01.000000",
         "updated_at":"2020-10-29T12:22:26.000000",
         "scheduler_trust":null,
         "links":[
            {
               "rel":"self",
               "href":"http://wlm_backend/v1/4dfe98a43bfa404785a812020066b4d6/workloads/8ee7a61d-a051-44a7-b633-b495e6f8fc1d"
            },
            {
               "rel":"bookmark",
               "href":"http://wlm_backend/4dfe98a43bfa404785a812020066b4d6/workloads/8ee7a61d-a051-44a7-b633-b495e6f8fc1d"
            }
         ]
      },
      {
         "project_id":"4dfe98a43bfa404785a812020066b4d6",
         "user_id":"adfa32d7746a4341b27377d6f7c61adb",
         "id":"a90d002a-85e4-44d1-96ac-7ffc5d0a5a84",
         "name":"workload2",
         "snapshots_info":"",
         "description":"no-description",
         "workload_type_id":"f82ce76f-17fe-438b-aa37-7a023058e50d",
         "status":"available",
         "created_at":"2020-10-20T09:51:15.000000",
         "updated_at":"2020-10-29T10:03:33.000000",
         "scheduler_trust":null,
         "links":[
            {
               "rel":"self",
               "href":"http://wlm_backend/v1/4dfe98a43bfa404785a812020066b4d6/workloads/a90d002a-85e4-44d1-96ac-7ffc5d0a5a84"
            },
            {
               "rel":"bookmark",
               "href":"http://wlm_backend/4dfe98a43bfa404785a812020066b4d6/workloads/a90d002a-85e4-44d1-96ac-7ffc5d0a5a84"
            }
         ]
      }
   ]
}

Create Workload

POST https://<wlm_api_endpoint>/workloads

Creates a workload in the provided Tenant/Project with the given details.

Path Parameters

Parameter Name
Description

wlm_api_endpoint

The endpoint URL of the Workloadmgr service

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to run the authentication against

X-Auth-Token

string

Authentication token to use

Content-Type

string

application/json

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

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.

hourly
daily
weekly
monthly
yearly
{
  "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": {
      "timezone": "<timezone>",
      "start_date": "<Date format: MM/DD/YYYY>",
      "end_date": "<Date format: MM/DD/YYYY>",
      "start_time": "<Time format: HH:MM AM/PM>",
      "enabled": "<True/False>",
      "hourly": {
        "interval": "<1, 2, 3, 4, 6, 12, 24 hours>",
        "retention": "<Integer>",
        "snapshot_type": "incremental/full"
      },
      "daily": {
        "depends_on": "hourly",
        "backup_time": [
          "<HH:MM 24-hour format>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "incremental/full"
      },
      "weekly": {
        "depends_on": "daily",
        "backup_day": [
          "<mon, tue, wed, thu, fri, sat, sun>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "full"
      },
      "monthly": {
        "depends_on": "daily",
        "month_backup_day": [
          "<Integer: day of the month (1-31)>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "full"
      },
      "yearly": {
        "depends_on": "monthly",
        "backup_month": [
          "<jan, feb, mar, ... dec>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "full"
      },
      "manual": {
        "retention": "<Integer>",
        "retention_days_to_keep": "<Integer>"
      }
    },
    "metadata": {
      "<key>": "<value>",
      "policy_id": "<policy_id>"
    },
    "backup_target_types": "<backup_target_type_id>"
  }
}

Sample Request Body
{
  "workload": {
    "name": "workload_cli",
    "description": null,
    "source_platform": null,
    "instances": [
      {
        "instance-id": "14309d25-23dd-47da-bf60-febc8c25b636"
      }
    ],
    "jobschedule": {
      "start_date": "01/28/2025",
      "enabled": true,
      "start_time": "02:15 PM",
      "timezone": "Etc/UTC",
      "hourly": {
        "interval": 1,
        "retention": 2,
        "snapshot_type": "incremental"
      },
      "daily": {
        "depends_on": "hourly",
        "backup_time": [
          "14:15"
        ],
        "retention": 2,
        "snapshot_type": "incremental"
      },
      "weekly": {
        "depends_on": "daily",
        "backup_day": [
          "wed"
        ],
        "retention": 2,
        "snapshot_type": "incremental"
      },
      "monthly": {
        "depends_on": "daily",
        "month_backup_day": [
          20
        ],
        "retention": 2,
        "snapshot_type": "full"
      },
      "yearly": {
        "depends_on": "monthly",
        "backup_month": [
          "mar"
        ],
        "retention": 1,
        "snapshot_type": "full"
      },
      "manual": {
        "retention": 21
      }
    },
    "metadata": {},
    "encryption": false,
    "secret_uuid": null,
    "backup_target_types": "6ba9fd82-151b-4f5a-bdbf-44504c2e210e"
  }
}
Sample Response
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"
         }
      ]
   }
}

Show Workload

GET https://<wlm_api_endpoint>/workloads/<workload_id>

Shows all details of a specified workload

Path Parameters

Parameter Name
Description

wlm_api_endpoint

The endpoint URL of the Workloadmgr service

workload_id

ID of the Workload to show

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to run the authentication against

X-Auth-Token

string

Authentication token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

Sample Response
HTTP/1.1 200 OK
x-compute-request-id: req-3bd5dd1e-3064-4859-a530-7a5bf9f4278f
content-type: application/json
content-length: 1941
date: Wed, 29 Jan 2025 06:28:36 GMT

{
  "workload": {
    "created_at": "2025-01-28T12:23:49.000000",
    "updated_at": "2025-01-28T14:15:06.000000",
    "id": "4ddf0e47-618d-47d1-9f2f-48f342e1d9af",
    "encryption": false,
    "secret_uuid": null,
    "user_id": "6bbb210a29a043af86b7b0c667747187",
    "project_id": "dee550d3df5b497ca2e05044616bc8b1",
    "availability_zone": "nova",
    "workload_type_id": "f82ce76f-17fe-438b-aa37-7a023058e50d",
    "name": "workload_API",
    "description": "no-description",
    "interval": null,
    "storage_usage": {
      "usage": 0,
      "full": {
        "snap_count": 0,
        "usage": 0
      },
      "incremental": {
        "snap_count": 1,
        "usage": 0
      }
    },
    "instances": [
      {
        "id": "14309d25-23dd-47da-bf60-febc8c25b636",
        "name": "PM",
        "metadata": {}
      }
    ],
    "metadata": {
      "hostnames": "[]",
      "preferredgroup": "[]",
      "workload_approx_backup_size": "2.1",
      "backup_media_target": "192.168.1.34:/mnt/tvault/42436",
      "backup_target_types": "nfs_1",
      "backup_target_type": "nfs_1"
    },
    "jobschedule": {
      "start_date": "01/28/2025",
      "enabled": true,
      "start_time": "02:15 PM",
      "hourly": {
        "interval": "1",
        "retention": "2",
        "snapshot_type": "incremental"
      },
      "daily": {
        "backup_time": ["14:15"],
        "retention": "2",
        "snapshot_type": "incremental"
      },
      "weekly": {
        "backup_day": ["wed"],
        "retention": "2",
        "snapshot_type": "incremental"
      },
      "monthly": {
        "month_backup_day": ["20"],
        "retention": "2",
        "snapshot_type": "full"
      },
      "yearly": {
        "backup_month": ["mar"],
        "retention": "1",
        "snapshot_type": "full"
      },
      "manual": {
        "retention": "21",
        "retention_days_to_keep": "5"
      },
      "timezone": "UTC",
      "global_jobscheduler": true,
      "nextrun": 2783.561769
    },
    "status": "locked",
    "error_msg": null,
    "links": [
      {
        "rel": "self",
        "href": "http://kolla-external-wallaby-dev4.triliodata.demo:8781/v1/dee550d3df5b497ca2e05044616bc8b1/workloads/4ddf0e47-618d-47d1-9f2f-48f342e1d9af"
      },
      {
        "rel": "bookmark",
        "href": "http://kolla-external-wallaby-dev4.triliodata.demo:8781/dee550d3df5b497ca2e05044616bc8b1/workloads/4ddf0e47-618d-47d1-9f2f-48f342e1d9af"
      }
    ],
    "scheduler_trust": null,
    "policy_id": null
  }
}

Modify Workload

PUT https://<wlm_api_endpoint>/workloads/<workload_id>

Modifies a workload in the provided Tenant/Project with the given details.

Path Parameters

Parameter Name
Description

wlm_api_endpoint

The endpoint URL of the Workloadmgr service

workload_id

ID of the Workload

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to run the authentication against

X-Auth-Token

string

Authentication token to use

Content-Type

string

application/json

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

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.

hourly
daily
weekly
monthly
yearly
{
  "workload": {
    "name": "<name of the Workload>",
    "description": "<description of workload>",
    "instances": [
      {
        "instance-id": "<Instance ID>"
      },
      {
        "instance-id": "<Instance ID>"
      }
    ],
    "jobschedule": {
      "timezone": "<timezone>",
      "start_date": "<Date format: MM/DD/YYYY>",
      "end_date": "<Date format: MM/DD/YYYY>",
      "start_time": "<Time format: HH:MM AM/PM>",
      "enabled": "<True/False>",
      "hourly": {
        "interval": "<1, 2, 3, 4, 6, 12, 24 hours>",
        "retention": "<Integer>",
        "snapshot_type": "incremental/full"
      },
      "daily": {
        "depends_on": "hourly",
        "backup_time": [
          "<HH:MM 24-hour format>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "incremental/full"
      },
      "weekly": {
        "depends_on": "daily",
        "backup_day": [
          "<mon, tue, wed, thu, fri, sat, sun>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "full"
      },
      "monthly": {
        "depends_on": "daily",
        "month_backup_day": [
          "<Integer: day of the month (1-31)>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "full"
      },
      "yearly": {
        "depends_on": "monthly",
        "backup_month": [
          "<jan, feb, mar, ... dec>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "full"
      },
      "manual": {
        "retention": "<Integer>",
        "retention_days_to_keep": "<Integer>"
      }
    },
    "metadata": {
      "<key>": "<value>",
      "policy_id": "<policy_id>"
    },
    
  }
}

Field Descriptions

Workload Fields

Field
Type
Description

name

String

Name of the workload.

description

String

Description of the workload.

workload_type_id

String

Unique identifier for the selected workload type.

source_platform

String

Specifies the source platform (e.g., openstack).

Instance List

Field
Type
Description

instance-id

String

Unique identifier of the instance to be included in the workload.

Job Schedule

Field
Type
Description

timezone

String

Time zone for the job schedule.

start_date

String

Start date of the schedule (Format: MM/DD/YYYY).

end_date

String

End date of the schedule (Format: MM/DD/YYYY).

start_time

String

Time when the schedule begins (Format: HH:MM AM/PM).

enabled

Boolean

True if scheduling is enabled, False otherwise.

Scheduling Types

Schedule Type
Field
Type
Description
Dependencies

Hourly

interval

Integer

Backup interval in hours (1, 2, 3, 4, 6, 12, 24).

if schedule enabledis set to true, you must provide Hourly field.

retention

Integer

Retention period in backups.

snapshot_type

String

Snapshot type (incremental or full).

Daily

backup_time

List of String

List of specific times (HH:MM, 24-hour format).

Requires hourly

retention

Integer

Retention period in backups.

snapshot_type

String

Snapshot type (incremental or full).

Weekly

backup_day

List of String

Days of the week (mon, tue, wed, thu, fri, sat, sun).

Requires daily

retention

Integer

Retention period in backups.

snapshot_type

String

Only supports full backups.

Monthly

month_backup_day

List of Integer

Days of the month (1-31).

Requires daily

retention

Integer

Retention period in backups.

snapshot_type

String

Only supports full backups.

Yearly

backup_month

List of String

List of months (jan, feb, mar, ... dec).

Requires monthly

retention

Integer

Retention period in backups.

snapshot_type

String

Only supports full backups.

Manual

retention

Integer

Retention period in backups.

retention_days_to_keep

Integer

Number of days to keep backups manually triggered.

Metadata

Field
Type
Description

<key>

String

Custom metadata key-value pairs.

policy_id

String

ID of the backup policy associated with the workload.

Sample Response
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

Delete Workload

DELETE https://<wlm_api_endpoint>/workloads/<workload_id>

Deletes the specified Workload.

Path Parameters

Parameter Name
Description

wlm_api_endpoint

The endpoint URL of the Workloadmgr service

workload_id

ID of the Workload

Query Parameters

Name
Type
Description

database_only

boolean

True leaves the Workload data on the Backup Target

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to run the authentication against

X-Auth-Token

string

Authentication Token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

Sample Response
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://<wlm_api_endpoint>/workloads/<workload_id>/unlock

Unlocks the specified Workload

Path Parameters

Parameter Name
Description

wlm_api_endpoint

The endpoint URL of the Workloadmgr service

workload_id

ID of the Workload

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to run the authentication against

X-Auth-Token

string

Authentication Token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

Sample Response
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://<wlm_api_endpoint>/workloads/<workload_id>/reset

Resets the defined workload

Path Parameters

Parameter Name
Description

wlm_api_endpoint

The endpoint URL of the Workloadmgr service

workload_id

ID of the Workload

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to run the authentication against

X-Auth-Token

string

Authentication Token to use

Accept

string

application/json

User-Agent

string

python-workloadmgrclient

Sample Response
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

Last updated

Was this helpful?