LogoLogo
T4O-6.x
T4O-6.x
  • About Trilio for Openstack
    • Welcome to Trilio for OpenStack
    • T4O Architecture
    • Release Notes
    • Features
    • Compatibility Matrix
    • Resources
      • 6.1.0
      • 6.0.0
  • Getting Started
    • Requirements
      • Network Considerations
      • Installation Strategy and Preparation
    • Getting started with Trilio on Red-Hat OpenStack Platform (RHOSP)
      • Trilio Installation on RHOCP (with RHOSP17.1)
      • Post Installation Health-Check
      • Trilio Installation on RHOSO18.0
      • Add new backup target on RHOSO18.0
    • Getting started with Trilio on Canonical OpenStack
    • Licensing
    • Installing WorkloadManager CLI client
    • Uninstall Trilio
      • Uninstalling from RHOSP
  • Upgrading to T4O-6.x from older supported versions
    • Supported Trilio Upgrade Path
    • Upgrading on RHOSP
    • Upgrading on RHOSO18.0
  • Advanced Configuration
    • Switching NFS Backing file
    • Multi-IP NFS Backup target mapping file configuration
    • Advanced Ceph configurations
      • Additions for multiple CEPH configurations
    • Multi-Region Deployments
    • Serial Upload per Instance during Snapshot
  • User Guide
    • Workloads
    • Snapshots
    • Restores
    • File Search
    • Snapshot Mount
    • Schedulers
    • E-Mail Notifications
  • Admin Guide
    • Backups-Admin Area
    • Backup Targets
    • Workload Policies
    • Workload Quotas
    • Managing Trusts
    • Workload Import & Migration
    • Disaster Recovery
      • Example runbook for Disaster Recovery using NFS
    • Migrating encrypted Workloads
    • Rebasing existing workloads
  • Troubleshooting
    • Frequently Asked Questions
    • General Troubleshooting Tips
    • Important log files
  • API GUIDE
    • Backup Targets
    • Workloads
    • Snapshots
    • Restores
    • File Search
    • Snapshot Mount
    • Schedulers
    • E-Mail Notification Settings
    • Workload Policies
    • Workload Quotas
    • Managing Trusts
    • Workload Import and Migration
Powered by GitBook
On this page
  • Field Descriptions
  • List Policies
  • Show Policy
  • List Assigned Policies
  • Create Policy
  • Body Format
  • Update Policy
  • Body Format
  • Assign Policy
  • Body Format
  • Delete Policy

Was this helpful?

Export as PDF
  1. API GUIDE

Workload Policies

Field Descriptions

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

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.

List Policies

GET https://<wlm_api_endpoint>/workload_policy/

Requests the list of available Workload Policies

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 authenticate 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-199f171f-b6fe-4172-8408-b069da3cfe19
content-type: application/json
content-length: 7615
date: Wed, 29 Jan 2025 09:39:36 GMT
{
  "policy_list": [
    {
      "id": "d29cb349-1953-405d-8f16-301da9c7bc84",
      "created_at": "2025-01-29T09:45:47.000000",
      "updated_at": "2025-01-29T09:45:47.000000",
      "status": "available",
      "name": "policy_api",
      "description": "",
      "metadata": [
        
      ],
      "field_values": [
        {
          "created_at": "2025-01-29T09:45:47.000000",
          "updated_at": null,
          "deleted_at": null,
          "deleted": false,
          "version": "6.0.20",
          "id": "134a9886-1621-4c51-9951-456b8ed578af",
          "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
          "policy_field_name": "start_time",
          "value": "12:00 AM"
        },
        {
          "created_at": "2025-01-29T09:45:47.000000",
          "updated_at": null,
          "deleted_at": null,
          "deleted": false,
          "version": "6.0.20",
          "id": "3de049cf-cb50-4c7f-82ff-88b5c256251f",
          "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
          "policy_field_name": "daily",
          "value": {
            "backup_time": "['01:00']",
            "retention": 7,
            "snapshot_type": "incremental"
          }
        },
        {
          "created_at": "2025-01-29T09:45:47.000000",
          "updated_at": null,
          "deleted_at": null,
          "deleted": false,
          "version": "6.0.20",
          "id": "5e7146cc-4bdf-4b69-8c0d-77146b9b432c",
          "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
          "policy_field_name": "yearly",
          "value": {
            "backup_month": "['mar']",
            "retention": 1,
            "snapshot_type": "full"
          }
        },
        {
          "created_at": "2025-01-29T09:45:47.000000",
          "updated_at": null,
          "deleted_at": null,
          "deleted": false,
          "version": "6.0.20",
          "id": "6ecaea3d-206d-4083-8d00-8fdea340d198",
          "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
          "policy_field_name": "manual",
          "value": {
            "retention": 30
          }
        },
        {
          "created_at": "2025-01-29T09:45:47.000000",
          "updated_at": null,
          "deleted_at": null,
          "deleted": false,
          "version": "6.0.20",
          "id": "7f85955b-2079-4408-95a4-339e235526a9",
          "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
          "policy_field_name": "retentionmanual",
          "value": {
            "retentionmanual": 30
          }
        },
        {
          "created_at": "2025-01-29T09:45:47.000000",
          "updated_at": null,
          "deleted_at": null,
          "deleted": false,
          "version": "6.0.20",
          "id": "b87eb463-2ed1-4869-92bc-256d09767d4d",
          "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
          "policy_field_name": "monthly",
          "value": {
            "month_backup_day": "['3']",
            "retention": 12,
            "snapshot_type": "full"
          }
        },
        {
          "created_at": "2025-01-29T09:45:47.000000",
          "updated_at": null,
          "deleted_at": null,
          "deleted": false,
          "version": "6.0.20",
          "id": "ce970c60-b38d-4b6a-82d6-a2d1b9948947",
          "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
          "policy_field_name": "hourly",
          "value": {
            "interval": "1",
            "retention": 3,
            "snapshot_type": "incremental"
          }
        },
        {
          "created_at": "2025-01-29T09:45:47.000000",
          "updated_at": null,
          "deleted_at": null,
          "deleted": false,
          "version": "6.0.20",
          "id": "fadef33d-9565-47f2-8180-37fadd967203",
          "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
          "policy_field_name": "weekly",
          "value": {
            "backup_day": "['mon']",
            "retention": 7,
            "snapshot_type": "full"
          }
        }
      ]
    }
  ]
}

Show Policy

GET https://<wlm_api_endpoint>/workload_policy/<policy_id>

Requests the details of a given policy

Path Parameters

Parameter Name
Description

wlm_api_endpoint

The endpoint URL of the Workloadmgr service

policy_id

ID of the Policy

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to authenticate 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-d4ffd8c4-5f20-4b74-bba9-9243964b0a61
content-type: application/json
content-length: 3237
date: Wed, 29 Jan 2025 09:54:09 GMT

{
  "policy": {
    "id": "d29cb349-1953-405d-8f16-301da9c7bc84",
    "created_at": "2025-01-29T09:45:47.000000",
    "updated_at": "2025-01-29T09:45:47.000000",
    "user_id": "6bbb210a29a043af86b7b0c667747187",
    "project_id": "dee550d3df5b497ca2e05044616bc8b1",
    "status": "available",
    "name": "policy_api",
    "description": "",
    "field_values": [
      {
        "created_at": "2025-01-29T09:45:47.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "134a9886-1621-4c51-9951-456b8ed578af",
        "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
        "policy_field_name": "start_time",
        "value": "12:00 AM"
      },
      {
        "created_at": "2025-01-29T09:45:47.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "3de049cf-cb50-4c7f-82ff-88b5c256251f",
        "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
        "policy_field_name": "daily",
        "value": {
          "backup_time": "['01:00']",
          "retention": 7,
          "snapshot_type": "incremental"
        }
      },
      {
        "created_at": "2025-01-29T09:45:47.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "5e7146cc-4bdf-4b69-8c0d-77146b9b432c",
        "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
        "policy_field_name": "yearly",
        "value": {
          "backup_month": "['mar']",
          "retention": 1,
          "snapshot_type": "full"
        }
      },
      {
        "created_at": "2025-01-29T09:45:47.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "6ecaea3d-206d-4083-8d00-8fdea340d198",
        "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
        "policy_field_name": "manual",
        "value": {
          "retention": 30
        }
      },
      {
        "created_at": "2025-01-29T09:45:47.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "7f85955b-2079-4408-95a4-339e235526a9",
        "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
        "policy_field_name": "retentionmanual",
        "value": {
          "retentionmanual": 30
        }
      },
      {
        "created_at": "2025-01-29T09:45:47.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "b87eb463-2ed1-4869-92bc-256d09767d4d",
        "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
        "policy_field_name": "monthly",
        "value": {
          "month_backup_day": "['3']",
          "retention": 12,
          "snapshot_type": "full"
        }
      },
      {
        "created_at": "2025-01-29T09:45:47.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "ce970c60-b38d-4b6a-82d6-a2d1b9948947",
        "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
        "policy_field_name": "hourly",
        "value": {
          "interval": "1",
          "retention": 3,
          "snapshot_type": "incremental"
        }
      },
      {
        "created_at": "2025-01-29T09:45:47.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "fadef33d-9565-47f2-8180-37fadd967203",
        "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
        "policy_field_name": "weekly",
        "value": {
          "backup_day": "['mon']",
          "retention": 7,
          "snapshot_type": "full"
        }
      }
    ],
    "metadata": [
      
    ],
    "policy_assignments": [
      {
        "created_at": "2025-01-29T09:49:41.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "0d3f0678-4cce-4e6c-9b47-9a4a475a9b1d",
        "policy_id": "d29cb349-1953-405d-8f16-301da9c7bc84",
        "project_id": "dee550d3df5b497ca2e05044616bc8b1",
        "policy_name": "policy_api",
        "project_name": "cloudproject"
      }
    ]
  }
}

List Assigned Policies

GET https://<wlm_api_endpoint>/workload_policy/assigned/<project_id>

Requests the lists of Policies assigned to a Project.

Path Parameters

Parameter Name
Description

wlm_api_endpoint

The endpoint URL of the Workloadmgr service

project_id

ID of the Project to fetch assigned policies from

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to authenticate 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: Tue, 17 Nov 2020 09:14:01 GMT
Content-Type: application/json
Content-Length: 338
Connection: keep-alive
X-Compute-Request-Id: req-57175488-d267-4dcb-90b5-f239d8b02fe2

{
   "policies":[
      {
         "created_at":"2020-10-29T15:39:13.000000",
         "updated_at":null,
         "deleted_at":null,
         "deleted":false,
         "version":"4.0.115",
         "id":"8b4a6236-63f1-4e2d-b8d1-23b37f4b4346",
         "policy_id":"b79aa5f3-405b-4da4-96e2-893abf7cb5fd",
         "project_id":"c76b3355a164498aa95ddbc960adc238",
         "policy_name":"Gold",
         "project_name":"robert"
      }
   ]
}

Create Policy

POST https://<wlm_api_endpoint>/workload_policy/

Creates a Policy with the given parameters

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 authenticate 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_policy":{
      "field_values":{
        "start_time": "<Time format: HH:MM AM/PM>",
        "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>",
          "retention_days_to_keep": "<Integer>"
        },
        "retentionmanual": {
          "retentionmanual": null
        }
      },
      "display_name":"<String>",
      "display_description":"<String>",
      "metadata":{
         <key>:<value>
      }
   }
}
Sample Request
{
  "workload_policy": {
    "display_name": "Api_policy_test",
    "display_description": "No description",
    "field_values": {
      "start_time": "10:00 AM",
      "hourly": {
        "interval": "1",
        "retention": "2",
        "snapshot_type": "incremental"
      },
      "daily": {
        "backup_time": [
          "11:40"
        ],
        "retention": "2",
        "snapshot_type": "incremental"
      },
      "weekly": {
        "backup_day": [
          "fri"
        ],
        "retention": "2",
        "snapshot_type": "incremental"
      },
      "monthly": {
        "month_backup_day": [
          "1"
        ],
        "snapshot_type": "full"
      },
      "yearly": {
        "backup_month": [
          "mar"
        ],
        "retention": "1",
        "snapshot_type": "full"
      },
      "manual": "4",
      "retentionmanual": "4"
    },
    "metadata": {
      
    }
  }
}
Sample Response
HTTP/1.1 200 OK
x-compute-request-id: req-538517fb-aca0-4abc-9dc7-ef1ee2af1cd7
content-type: application/json
content-length: 2943
date: Wed, 29 Jan 2025 10:23:38 GMT

{
  "policy": {
    "id": "43885a4d-f9c6-42fd-a8c4-2d1816dbd88d",
    "created_at": "2025-01-29T10:23:38.000000",
    "updated_at": "2025-01-29T10:23:38.000000",
    "status": "available",
    "name": "Api_policy_test",
    "description": "No description",
    "metadata": [
      
    ],
    "field_values": [
      {
        "created_at": "2025-01-29T10:23:38.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "0492f64e-175b-4f8f-91da-e5986d3b9118",
        "policy_id": "43885a4d-f9c6-42fd-a8c4-2d1816dbd88d",
        "policy_field_name": "retentionmanual",
        "value": "V4\np0\n."
      },
      {
        "created_at": "2025-01-29T10:23:38.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "273f07f1-fa68-4883-aec9-8873095d9e0e",
        "policy_id": "43885a4d-f9c6-42fd-a8c4-2d1816dbd88d",
        "policy_field_name": "daily",
        "value": "(dp0\nVbackup_time\np1\n(lp2\nV11:40\np3\nasVretention\np4\nV2\np5\nsVsnapshot_type\np6\nVincremental\np7\ns."
      },
      {
        "created_at": "2025-01-29T10:23:38.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "31432273-d82c-4ea7-802b-353f818b6926",
        "policy_id": "43885a4d-f9c6-42fd-a8c4-2d1816dbd88d",
        "policy_field_name": "yearly",
        "value": "(dp0\nVbackup_month\np1\n(lp2\nVmar\np3\nasVretention\np4\nV1\np5\nsVsnapshot_type\np6\nVfull\np7\ns."
      },
      {
        "created_at": "2025-01-29T10:23:38.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "4ef22bcd-4b7a-4dac-9c02-1b41ec443778",
        "policy_id": "43885a4d-f9c6-42fd-a8c4-2d1816dbd88d",
        "policy_field_name": "start_time",
        "value": "V10:00 AM\np0\n."
      },
      {
        "created_at": "2025-01-29T10:23:38.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "58a13a57-08c3-457a-a912-0217c58ac351",
        "policy_id": "43885a4d-f9c6-42fd-a8c4-2d1816dbd88d",
        "policy_field_name": "hourly",
        "value": "(dp0\nVinterval\np1\nV1\np2\nsVretention\np3\nV2\np4\nsVsnapshot_type\np5\nVincremental\np6\ns."
      },
      {
        "created_at": "2025-01-29T10:23:38.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "979fc748-9434-46a8-8613-24524954ba6e",
        "policy_id": "43885a4d-f9c6-42fd-a8c4-2d1816dbd88d",
        "policy_field_name": "weekly",
        "value": "(dp0\nVbackup_day\np1\n(lp2\nVfri\np3\nasVretention\np4\nV2\np5\nsVsnapshot_type\np6\nVincremental\np7\ns."
      },
      {
        "created_at": "2025-01-29T10:23:38.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "cad874e6-9960-47a8-a904-25161c7704ee",
        "policy_id": "43885a4d-f9c6-42fd-a8c4-2d1816dbd88d",
        "policy_field_name": "monthly",
        "value": "(dp0\nVmonth_backup_day\np1\n(lp2\nV1\np3\nasVsnapshot_type\np4\nVfull\np5\ns."
      },
      {
        "created_at": "2025-01-29T10:23:38.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "f1670b32-0a3b-4876-a51c-14c24f999eab",
        "policy_id": "43885a4d-f9c6-42fd-a8c4-2d1816dbd88d",
        "policy_field_name": "manual",
        "value": "V4\np0\n."
      }
    ]
  }
}

Update Policy

PUT https://<wlm_api_endpoint>/workload_policy/<policy-id>

Updates a Policy with the given information

Path Parameters

Parameter Name
Description

wlm_api_endpoint

The endpoint URL of the Workloadmgr service

policy_id

ID of the Policy

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to authenticate 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

{
   "policy":{
      "field_values":{
        "start_time": "<Time format: HH:MM AM/PM>",
        "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>"
        }
      },
      "display_name":"<String>",
      "display_description":"<String>",
      "metadata":{
         <key>:<value>
      }
   }
}
Sample Response
HTTP/1.1 200 OK
x-compute-request-id: req-9c7473ce-468c-4688-b061-a761258f7c5e
content-type: application/json
content-length: 3013
date: Wed, 29 Jan 2025 10:37:40 GMT

{
  "policy": {
    "id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
    "created_at": "2025-01-29T10:21:11.000000",
    "updated_at": "2025-01-29T10:21:11.000000",
    "status": "available",
    "name": "Api_update_policy",
    "description": "No description",
    "metadata": [
      
    ],
    "field_values": [
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": "2025-01-29T10:36:59.000000",
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "36c76a9b-3599-409c-b226-c59a981d5693",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "hourly",
        "value": "(dp0\nVinterval\np1\nV2\np2\nsVretention\np3\ng2\nsVsnapshot_type\np4\nVincremental\np5\ns."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "44633679-9fdf-4fe0-84e9-0e364cee8d02",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "monthly",
        "value": "(dp0\nVmonth_backup_day\np1\n(lp2\nV1\np3\nasVsnapshot_type\np4\nVfull\np5\ns."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": "2025-01-29T10:36:59.000000",
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "8ddfa5a3-ae39-4430-a474-9074ea3fefbc",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "daily",
        "value": "(dp0\nVbackup_time\np1\n(lp2\nV13:00\np3\nasVretention\np4\nV2\np5\nsVsnapshot_type\np6\nVincremental\np7\ns."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "a0944765-93bd-487a-9dd2-6a756fab1d2f",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "weekly",
        "value": "(dp0\nVbackup_day\np1\n(lp2\nVfri\np3\nasVretention\np4\nV2\np5\nsVsnapshot_type\np6\nVincremental\np7\ns."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": "2025-01-29T10:36:59.000000",
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "ac6267c5-1923-4d24-b911-61427acfdc8b",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "start_time",
        "value": "V11:00 AM\np0\n."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "b945acdd-3780-4494-b63c-42474ea65c24",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "manual",
        "value": "V4\np0\n."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "bad15c15-5eb2-4b4b-8597-639a8c27b947",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "yearly",
        "value": "(dp0\nVbackup_month\np1\n(lp2\nVmar\np3\nasVretention\np4\nV1\np5\nsVsnapshot_type\np6\nVfull\np7\ns."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "cf900224-2b21-4b29-9118-99ec3151d891",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "retentionmanual",
        "value": "V4\np0\n."
      }
    ]
  }
}

Assign Policy

POST https://<wlm_api_endpoint>/workload_policy/<policy-id>

Updates a Policy with the given information

Path Parameters

Parameter Name
Description

wlm_api_endpoint

The endpoint URL of the Workloadmgr service

policy_id

ID of the Policy

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to authenticate 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

{
   "policy":{
      "remove_projects":[
         "<project_id>"
      ],
      "add_projects":[
         "<project_id>",
      ]
   }
}
Sample Response
HTTP/1.1 200 OK
x-compute-request-id: req-a8569cd2-05a2-45ce-bae5-41a214759ff8
content-type: application/json
content-length: 3831
date: Wed, 29 Jan 2025 10:44:56 GMT

{
  "policy": {
    "id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
    "created_at": "2025-01-29T10:21:11.000000",
    "updated_at": "2025-01-29T10:21:11.000000",
    "user_id": "6bbb210a29a043af86b7b0c667747187",
    "project_id": "dee550d3df5b497ca2e05044616bc8b1",
    "status": "available",
    "name": "Api_update_policy",
    "description": "No description",
    "field_values": [
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": "2025-01-29T10:36:59.000000",
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "36c76a9b-3599-409c-b226-c59a981d5693",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "hourly",
        "value": "(dp0\nVinterval\np1\nV2\np2\nsVretention\np3\ng2\nsVsnapshot_type\np4\nVincremental\np5\ns."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "44633679-9fdf-4fe0-84e9-0e364cee8d02",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "monthly",
        "value": "(dp0\nVmonth_backup_day\np1\n(lp2\nV1\np3\nasVsnapshot_type\np4\nVfull\np5\ns."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": "2025-01-29T10:36:59.000000",
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "8ddfa5a3-ae39-4430-a474-9074ea3fefbc",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "daily",
        "value": "(dp0\nVbackup_time\np1\n(lp2\nV13:00\np3\nasVretention\np4\nV2\np5\nsVsnapshot_type\np6\nVincremental\np7\ns."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "a0944765-93bd-487a-9dd2-6a756fab1d2f",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "weekly",
        "value": "(dp0\nVbackup_day\np1\n(lp2\nVfri\np3\nasVretention\np4\nV2\np5\nsVsnapshot_type\np6\nVincremental\np7\ns."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": "2025-01-29T10:36:59.000000",
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "ac6267c5-1923-4d24-b911-61427acfdc8b",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "start_time",
        "value": "V11:00 AM\np0\n."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "b945acdd-3780-4494-b63c-42474ea65c24",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "manual",
        "value": "V4\np0\n."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "bad15c15-5eb2-4b4b-8597-639a8c27b947",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "yearly",
        "value": "(dp0\nVbackup_month\np1\n(lp2\nVmar\np3\nasVretention\np4\nV1\np5\nsVsnapshot_type\np6\nVfull\np7\ns."
      },
      {
        "created_at": "2025-01-29T10:21:11.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "cf900224-2b21-4b29-9118-99ec3151d891",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "policy_field_name": "retentionmanual",
        "value": "V4\np0\n."
      }
    ],
    "metadata": [
      
    ],
    "policy_assignments": [
      {
        "created_at": "2025-01-29T10:44:56.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "2177bf6e-116f-45fc-986b-3d20f7084fc7",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "project_id": "c532c5b669304d20bbe9e2157986757c",
        "policy_name": "Api_update_policy",
        "project_name": "AP_test"
      },
      {
        "created_at": "2025-01-29T10:43:28.000000",
        "updated_at": null,
        "deleted_at": null,
        "deleted": false,
        "version": "6.0.20",
        "id": "5b3b445b-e4dd-4381-84cd-c90bdda0b7e7",
        "policy_id": "d3b638c6-d26e-4949-8493-18a4df3123bf",
        "project_id": "dee550d3df5b497ca2e05044616bc8b1",
        "policy_name": "Api_update_policy",
        "project_name": "cloudproject"
      }
    ]
  },
  "failed_ids": [
    
  ]
}

Delete Policy

DELETE https://<wlm_api_endpoint>/workload_policy/<policy_id>

Deletes a given Policy

Path Parameters

Parameter Name
Description

wlm_api_endpoint

The endpoint URL of the Workloadmgr service

policy_id

ID of the Policy

Headers

Name
Type
Description

X-Auth-Project-Id

string

Project to authenticate 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: Tue, 17 Nov 2020 09:56:03 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive
PreviousE-Mail Notification SettingsNextWorkload Quotas

Last updated 12 days ago

Was this helpful?