# 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** <a href="#workload-fields" id="workload-fields"></a>

| 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** <a href="#instance-list" id="instance-list"></a>

| Field         | Type   | Description                                                       |
| ------------- | ------ | ----------------------------------------------------------------- |
| `instance-id` | String | Unique identifier of the instance to be included in the workload. |

#### **Job Schedule** <a href="#job-schedule" id="job-schedule"></a>

| 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

<table><thead><tr><th width="168">Schedule Type</th><th>Field</th><th>Type</th><th>Description</th><th>Dependencies</th></tr></thead><tbody><tr><td><strong>Hourly</strong></td><td><code>interval</code></td><td>Integer</td><td>Backup interval in hours (<code>1, 2, 3, 4, 6, 12, 24</code>).</td><td>if schedule <code>enabled</code>is set to true, you must provide Hourly field.</td></tr><tr><td></td><td><code>retention</code></td><td>Integer</td><td>Retention period in backups.</td><td></td></tr><tr><td></td><td><code>snapshot_type</code></td><td>String</td><td>Snapshot type (<code>incremental</code> or <code>full</code>).</td><td></td></tr><tr><td><strong>Daily</strong></td><td><code>backup_time</code></td><td>List of String</td><td>List of specific times (<code>HH:MM</code>, 24-hour format).</td><td>Requires <code>hourly</code></td></tr><tr><td></td><td><code>retention</code></td><td>Integer</td><td>Retention period in backups.</td><td></td></tr><tr><td></td><td><code>snapshot_type</code></td><td>String</td><td>Snapshot type (<code>incremental</code> or <code>full</code>).</td><td></td></tr><tr><td><strong>Weekly</strong></td><td><code>backup_day</code></td><td>List of String</td><td>Days of the week (<code>mon, tue, wed, thu, fri, sat, sun</code>).</td><td>Requires <code>daily</code></td></tr><tr><td></td><td><code>retention</code></td><td>Integer</td><td>Retention period in backups.</td><td></td></tr><tr><td></td><td><code>snapshot_type</code></td><td>String</td><td>Only supports <code>full</code> backups.</td><td></td></tr><tr><td><strong>Monthly</strong></td><td><code>month_backup_day</code></td><td>List of Integer</td><td>Days of the month (<code>1-31</code>).</td><td>Requires <code>daily</code></td></tr><tr><td></td><td><code>retention</code></td><td>Integer</td><td>Retention period in backups.</td><td></td></tr><tr><td></td><td><code>snapshot_type</code></td><td>String</td><td>Only supports <code>full</code> backups.</td><td></td></tr><tr><td><strong>Yearly</strong></td><td><code>backup_month</code></td><td>List of String</td><td>List of months (<code>jan, feb, mar, ... dec</code>).</td><td>Requires <code>monthly</code></td></tr><tr><td></td><td><code>retention</code></td><td>Integer</td><td>Retention period in backups.</td><td></td></tr><tr><td></td><td><code>snapshot_type</code></td><td>String</td><td>Only supports <code>full</code> backups.</td><td></td></tr><tr><td><strong>Manual</strong></td><td><code>retention</code></td><td>Integer</td><td>Retention period in backups.</td><td></td></tr><tr><td>retentionmanual</td><td><code>retentionmanual</code></td><td>Integer</td><td>Number of days to keep backups manually triggered.</td><td></td></tr></tbody></table>

#### **Metadata** <a href="#metadata" id="metadata"></a>

| 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** <a href="#backup-target-types" id="backup-target-types"></a>

| Field                 | Type   | Description                                                        |
| --------------------- | ------ | ------------------------------------------------------------------ |
| `backup_target_types` | String | Backup target type ID specifying where the backups will be stored. |

## List Workloads

<mark style="color:green;">`GET`</mark> `https://<wlm_api_endpoint>/workloads`

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

#### Path Parameters

<table><thead><tr><th width="219">Parameter Name</th><th>Description</th></tr></thead><tbody><tr><td>wlm_api_endpoint</td><td>The endpoint URL of the <code>Workloadmgr</code> service</td></tr></tbody></table>

#### 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                  |

<details>

<summary>Sample Response</summary>

```json5
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"
            }
         ]
      }
   ]
}
```

</details>

## Create Workload

<mark style="color:orange;">`POST`</mark> `https://<wlm_api_endpoint>/workloads`

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

#### Path Parameters

<table><thead><tr><th width="219">Parameter Name</th><th>Description</th></tr></thead><tbody><tr><td>wlm_api_endpoint</td><td>The endpoint URL of the <code>Workloadmgr</code> service</td></tr></tbody></table>

#### 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.

{% hint style="warning" %}
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
```

{% endhint %}

```json
{
  "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": {
        "backup_time": [
          "<HH:MM 24-hour format>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "incremental/full"
      },
      "weekly": {
        "backup_day": [
          "<mon, tue, wed, thu, fri, sat, sun>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "full"
      },
      "monthly": {
        "month_backup_day": [
          "<Integer: day of the month (1-31)>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "full"
      },
      "yearly": {
        "backup_month": [
          "<jan, feb, mar, ... dec>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "full"
      },
      "manual": {
          "retention": "<Integer>"
        },
      "retentionmanual": {
          "retentionmanual": "<Integer>"
        },
    },
    "metadata": {
      "<key>": "<value>",
      "policy_id": "<policy_id>"
    },
    "backup_target_types": "<backup_target_type_id>"
  }
}


```

<details>

<summary>Sample Request Body</summary>

```json5
{
  "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": {
        "backup_time": [
          "14:15"
        ],
        "retention": 2,
        "snapshot_type": "incremental"
      },
      "weekly": {
        "backup_day": [
          "wed"
        ],
        "retention": 2,
        "snapshot_type": "full"
      },
      "monthly": {
        "month_backup_day": [
          20
        ],
        "retention": 2,
        "snapshot_type": "full"
      },
      "yearly": {
        "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"
  }
}

```

</details>

<details>

<summary>Sample Response</summary>

```json5
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"
         }
      ]
   }
}
```

</details>

## Show Workload

<mark style="color:green;">`GET`</mark> `https://<wlm_api_endpoint>/workloads/<workload_id>`

Shows all details of a specified workload

#### Path Parameters

<table><thead><tr><th width="219">Parameter Name</th><th>Description</th></tr></thead><tbody><tr><td>wlm_api_endpoint</td><td>The endpoint URL of the <code>Workloadmgr</code> service</td></tr><tr><td>workload_id</td><td>ID of the Workload to show</td></tr></tbody></table>

#### 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                  |

<details>

<summary>Sample Response</summary>

```json5
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": "full"
      },
      "monthly": {
        "month_backup_day": ["20"],
        "retention": "2",
        "snapshot_type": "full"
      },
      "yearly": {
        "backup_month": ["mar"],
        "retention": "1",
        "snapshot_type": "full"
      },
      "manual": {
          "retention": "21"
        },
      "retentionmanual": {
          "retentionmanual": "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
  }
}


```

</details>

## Modify Workload

<mark style="color:blue;">`PUT`</mark> `https://<wlm_api_endpoint>/workloads/<workload_id>`

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

#### Path Parameters

<table><thead><tr><th width="219">Parameter Name</th><th>Description</th></tr></thead><tbody><tr><td>wlm_api_endpoint</td><td>The endpoint URL of the <code>Workloadmgr</code> service</td></tr><tr><td>workload_id</td><td>ID of the Workload</td></tr></tbody></table>

#### 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.

{% hint style="info" %}
All values in the body are optional.
{% endhint %}

{% hint style="warning" %}
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
```

{% endhint %}

```json5
{
  "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": {
        "backup_time": [
          "<HH:MM 24-hour format>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "incremental/full"
      },
      "weekly": {
        "backup_day": [
          "<mon, tue, wed, thu, fri, sat, sun>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "full"
      },
      "monthly": {
        "month_backup_day": [
          "<Integer: day of the month (1-31)>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "full"
      },
      "yearly": {
        "backup_month": [
          "<jan, feb, mar, ... dec>"
        ],
        "retention": "<Integer>",
        "snapshot_type": "full"
      },
      "manual": {
          "retention": "<Integer>"
        },
      "retentionmanual": {
          "retentionmanual": "<Integer>"
        },
    },
    "metadata": {
      "<key>": "<value>",
      "policy_id": "<policy_id>"
    },
    
  }
}
```

### **Field Descriptions** <a href="#field-descriptions" id="field-descriptions"></a>

#### **Workload Fields** <a href="#workload-fields" id="workload-fields"></a>

| 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** <a href="#instance-list" id="instance-list"></a>

| Field         | Type   | Description                                                       |
| ------------- | ------ | ----------------------------------------------------------------- |
| `instance-id` | String | Unique identifier of the instance to be included in the workload. |

#### **Job Schedule** <a href="#job-schedule" id="job-schedule"></a>

| 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

<table><thead><tr><th width="168">Schedule Type</th><th>Field</th><th>Type</th><th>Description</th><th>Dependencies</th></tr></thead><tbody><tr><td><strong>Hourly</strong></td><td><code>interval</code></td><td>Integer</td><td>Backup interval in hours (<code>1, 2, 3, 4, 6, 12, 24</code>).</td><td>if schedule <code>enabled</code>is set to true, you must provide Hourly field.</td></tr><tr><td></td><td><code>retention</code></td><td>Integer</td><td>Retention period in backups.</td><td></td></tr><tr><td></td><td><code>snapshot_type</code></td><td>String</td><td>Snapshot type (<code>incremental</code> or <code>full</code>).</td><td></td></tr><tr><td><strong>Daily</strong></td><td><code>backup_time</code></td><td>List of String</td><td>List of specific times (<code>HH:MM</code>, 24-hour format).</td><td>Requires <code>hourly</code></td></tr><tr><td></td><td><code>retention</code></td><td>Integer</td><td>Retention period in backups.</td><td></td></tr><tr><td></td><td><code>snapshot_type</code></td><td>String</td><td>Snapshot type (<code>incremental</code> or <code>full</code>).</td><td></td></tr><tr><td><strong>Weekly</strong></td><td><code>backup_day</code></td><td>List of String</td><td>Days of the week (<code>mon, tue, wed, thu, fri, sat, sun</code>).</td><td>Requires <code>daily</code></td></tr><tr><td></td><td><code>retention</code></td><td>Integer</td><td>Retention period in backups.</td><td></td></tr><tr><td></td><td><code>snapshot_type</code></td><td>String</td><td>Only supports <code>full</code> backups.</td><td></td></tr><tr><td><strong>Monthly</strong></td><td><code>month_backup_day</code></td><td>List of Integer</td><td>Days of the month (<code>1-31</code>).</td><td>Requires <code>daily</code></td></tr><tr><td></td><td><code>retention</code></td><td>Integer</td><td>Retention period in backups.</td><td></td></tr><tr><td></td><td><code>snapshot_type</code></td><td>String</td><td>Only supports <code>full</code> backups.</td><td></td></tr><tr><td><strong>Yearly</strong></td><td><code>backup_month</code></td><td>List of String</td><td>List of months (<code>jan, feb, mar, ... dec</code>).</td><td>Requires <code>monthly</code></td></tr><tr><td></td><td><code>retention</code></td><td>Integer</td><td>Retention period in backups.</td><td></td></tr><tr><td></td><td><code>snapshot_type</code></td><td>String</td><td>Only supports <code>full</code> backups.</td><td></td></tr><tr><td><strong>Manual</strong></td><td><code>retention</code></td><td>Integer</td><td>Retention period in backups.</td><td></td></tr><tr><td>retentionmanual</td><td><code>retentionmanual</code></td><td>Integer</td><td>Number of days to keep backups manually triggered.</td><td></td></tr></tbody></table>

#### **Metadata** <a href="#metadata" id="metadata"></a>

| Field       | Type   | Description                                           |
| ----------- | ------ | ----------------------------------------------------- |
| `<key>`     | String | Custom metadata key-value pairs.                      |
| `policy_id` | String | ID of the backup policy associated with the workload. |

<details>

<summary>Sample Response</summary>

```json5
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
```

</details>

## Delete Workload

<mark style="color:red;">`DELETE`</mark> `https://<wlm_api_endpoint>/workloads/<workload_id>`

Deletes the specified Workload.

#### Path Parameters

<table><thead><tr><th width="219">Parameter Name</th><th>Description</th></tr></thead><tbody><tr><td>wlm_api_endpoint</td><td>The endpoint URL of the <code>Workloadmgr</code> service</td></tr><tr><td>workload_id</td><td>ID of the Workload</td></tr></tbody></table>

#### 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                  |

<details>

<summary>Sample Response</summary>

```json5
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
```

</details>

## Unlock Workload

<mark style="color:orange;">`POST`</mark> `https://<wlm_api_endpoint>/workloads/<workload_id>/unlock`

Unlocks the specified Workload

#### Path Parameters

<table><thead><tr><th width="219">Parameter Name</th><th>Description</th></tr></thead><tbody><tr><td>wlm_api_endpoint</td><td>The endpoint URL of the <code>Workloadmgr</code> service</td></tr><tr><td>workload_id</td><td>ID of the Workload</td></tr></tbody></table>

#### 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                  |

<details>

<summary>Sample Response</summary>

```json5
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
```

</details>

## Reset Workload

<mark style="color:orange;">`POST`</mark> `https://<wlm_api_endpoint>/workloads/<workload_id>/reset`

Resets the defined workload

#### Path Parameters

<table><thead><tr><th width="219">Parameter Name</th><th>Description</th></tr></thead><tbody><tr><td>wlm_api_endpoint</td><td>The endpoint URL of the <code>Workloadmgr</code> service</td></tr><tr><td>workload_id</td><td>ID of the Workload</td></tr></tbody></table>

#### 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                  |

<details>

<summary>Sample Response</summary>

```json5
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
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.trilio.io/openstack/api-guide/workloads.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
