Creates a new policy for a specified organization. For more info on filter types and scheduling, see Policy and Device Filters, and Scheduling.
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. |
Created
Invalid Request
Access token is missing or invalid
You do not have permission to perform this action.
Entity not found
Too many requests
Service Unavailable
Invalid Request
{- "id": 0,
- "organization_id": 0,
- "name": "string",
- "policy_type_name": "patch",
- "configuration": {
- "auto_patch": true,
- "auto_reboot": true,
- "notify_user": true,
- "missed_patch_window": true,
- "patch_rule": "all",
- "device_filters_enabled": true,
- "device_filters": [
- {
- "field": "tag",
- "op": "in",
- "value": [
- "Windows",
- "Win10"
]
}
], - "include_optional": true,
- "notify_reboot_user": true,
- "notify_deferred_reboot_user": true,
- "custom_notification_patch_message": "Necessary Windows updates are about to be installed!",
- "custom_notification_patch_message_mac": "Necessary Mac updates are about to be installed!",
- "custom_notification_reboot_message": "Necessary Windows updates are about to be installed! Reboot Needed!",
- "custom_notification_reboot_message_mac": "Necessary Mac updates are about to be installed! Reboot Needed!",
- "custom_notification_max_delays": 0,
- "custom_notification_deferment_periods": [
- 1,
- 4,
- 8
], - "custom_pending_reboot_notification_message": "Your computer needs to restart to finish installing updates!",
- "custom_pending_reboot_notification_message_mac": "Your Mac needs to restart to finish installing updates!",
- "custom_pending_reboot_notification_max_delays": 0,
- "custom_pending_reboot_notification_deferment_periods": [
- 2,
- 4,
- 6
], - "notify_user_message_timeout": 15,
- "notify_deferred_reboot_user_timeout": 15,
- "notify_user_auto_deferral_enabled": false,
- "notify_deferred_reboot_user_auto_deferral_enabled": false
}, - "schedule_days": 0,
- "schedule_weeks_of_month": 0,
- "schedule_months": 0,
- "schedule_time": "string",
- "scheduled_timezone": "string",
- "use_scheduled_timezone": true,
- "server_groups": [
- 0
], - "notes": "string"
}
{- "errors": [
- "string"
]
}