Policies

A policy defines exactly what an agent can or cannot do. You can:

  • Get information about existing agent policies
  • Get information about Windows and Linux patch tasks
  • Create a new policy
  • Add Windows patch tasks
  • Add Linux patch tasks
  • Delete a policy (you cannot delete a policy that is being used by one or more agents)

Base URL

        https://<consoleFQDN:port>/st/console/api/v1.0/policies

Supported Requests

Method URL Input Return

DELETE

https://<consoleFQDN:port>/st/console/api/v1.0/policies/{policy ID}

 

Success code

https://<consoleFQDN:port>/st/console/api/v1.0/policies/{policy ID}/tasks/{task Id}

 

Success code

GET

https://<consoleFQDN:port>/st/console/api/v1.0/policies

URL Parameters

Policy

https://<consoleFQDN:port>/st/console/api/v1.0/policies/{policy ID}

 

Policy

https://<consoleFQDN:port>/st/console/api/v1.0/policies/{policy ID}/tasks

URL Parameters

WindowsPatchTask

LinuxPatchTask

https://<consoleFQDN:port>/st/console/api/v1.0/policies/{policy ID}/tasks/{task ID}

 

WindowsPatchTask or

LinuxPatchTask

POST

https://<consoleFQDN:port>/st/console/api/v1.0/policies

Policy Request Body

Policy

https://<consoleFQDN:port>/st/console/api/v1.0/policies/{policy ID}/tasks/windowspatch

WindowsPatchTask Request Body

WindowsPatchTask

https://<consoleFQDN:port>/st/console/api/v1.0/policies/{policy ID}/tasks/linuxpatch

LinuxPatchTask Request Body

LinuxPatchTask

Input Models

Example with Sample Response

Find all agent policies

GET Request

https://<consoleFQDN:port>/st/console/api/v1.0/policies

Sample Response

Copy
{
    "count": 1,
    "value": [
        {
            "allowCancelOperations": True,
            "allowCloudTelemetry": True,
            "allowManualOperations": True,
            "checkInDistributionMinutes": 240,
            "checkInOption": "Minutes",
            "displayIconInNotificationArea": True,
            "id": "4997c76c-3e47-4b97-bae5-265d586431e9",
            "links": {
                "self": {
                    "href": "https://device-name.example.com:3121/st/console/api/v1.0/policies/4997c76c-3e47-4b97-bae5-265d586431e9"
                },
                "tasks": {
                    "href": "https://device-name.example.com:3121/st/console/api/v1.0/policies/4997c76c-3e47-4b97-bae5-265d586431e9/tasks"
                }
            },
            "listeningAgentPort": 4155,
            "loggingLevel": "Normal",
            "maximumLogSizeMB": 5,
            "minutesCheckInIntervalMinutes": 480,
            "name": "Sample Agent Policy",
            "synchronizeWithProtectCloud": False
        }
    ]
}

Other Request Examples

Output Models