Updates a specific policy object for the authenticated user. For more info on filter types and scheduling, see Policy and Device Filters, and Scheduling. See Using Global API Keys for more information on permission and scope requirements.
id | integer <int64> Policy ID | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
organization_id required | integer <int64> Organization ID for the specified policy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name required | string The name of the policy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
policy_type_name required | string The name of the type of policy you are creating. Optional when updating an existing policy. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
required | any The policy configuration. This varies depending on the type of policy being used. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
schedule_days required | integer <int64> Decimal value of binary day schedule. See Policy and Device Filters, and Scheduling - Example Days per Week. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
schedule_weeks_of_month | integer <int64> Decimal value of binary week schedule. See Policy and Device Filters, and Scheduling - Example Weeks per Month. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
schedule_months | integer <int64> Decimal value of binary month schedule. See Policy and Device Filters, and Scheduling - Example Months per Year. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
schedule_time required | string Scheduled time for automatic policy execution. Format: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
scheduled_timezone | string Define the UTC offset for a policy where UTC is used for the scheduled start time. This is required when | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
use_scheduled_timezone required | boolean Determines whether to use UTC or the local time of the device for policy execution. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
server_groups required | Array of integers An array containing a list of the server group IDs to be affected by the policy. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
notes required | string Any notes associated with the policy. |
Update Successful
Invalid Request
Access token is missing or invalid
You do not have permission to perform this action.
Too many requests
Service Unavailable
Invalid Request
{- "name": "Test Patch All Policy",
- "policy_type_name": "patch",
- "organization_id": 9999,
- "schedule_days": 42,
- "schedule_weeks_of_month": 20,
- "schedule_months": 4680,
- "schedule_time": "12:00",
- "use_scheduled_timezone": false,
- "configuration": {
- "auto_patch": true,
- "notify_user": true,
- "auto_reboot": true,
- "patch_rule": "all",
- "filter_type": "null",
- "missed_patch_window": false,
- "device_filters_enabled": true,
- "device_filters": [
- {
- "field": "tag",
- "op": "in",
- "value": [
- "Windows",
- "Win10"
]
}
], - "secrets": {
- "my_secret_name": {
- "id": "705d95c8-659a-4344-8fab-5470cbf077e6"
}
}, - "include_optional": true,
- "notify_reboot_user": true,
- "notify_deferred_reboot_user": true,
- "custom_notification_patch_message": "Important updates are going to be installed!",
- "custom_notification_patch_message_mac": "Important updates are going to be installed!",
- "custom_notification_reboot_message": "Reboot needed to finish installing updates!",
- "custom_notification_reboot_message_mac": "Reboot needed to finish installing updates!",
- "custom_notification_max_delays": 3,
- "custom_notification_deferment_periods": [
- 1,
- 4,
- 8
], - "custom_pending_reboot_notification_message": "Your computer needs to reboot to install updates!",
- "custom_pending_reboot_notification_message_mac": "Your computer needs to reboot to install updates!",
- "custom_pending_reboot_notification_deferment_periods": [
- 1,
- 4,
- 8
], - "notify_user_message_timeout": 15,
- "notify_deferred_reboot_user_message_timeout": 15,
- "notify_user_auto_deferral_enabled": true,
- "notify_deferred_reboot_user_auto_deferral_enabled": true,
- "is_patch_tuesday": false,
- "patch_tuesday_offset": 0
}, - "server_groups": [
- 250624,
- 90125
], - "notes": "Here are some notes"
}
{- "errors": [
- "string"
]
}