Category Filter
Create Policy
Create a new policy.
Arguments | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
name | String | Name of the policy | ||||||
description | String | Description of the policy | ||||||
ios | Dictionary | Optional. If provided this dictionary, provide the following keys: password, restrictions, advanced_restrictions, web_content_filter, wifi, email, activesync, ldap, caldav, subscribe_calendar, carddav, webclip, access_point, applock, wallpaper, globalproxy, lock_screen_msg. It can be set to null if nothing is configured |
||||||
android | Dictionary | Optional. If provided this dictionary, provide the following keys: password, restrictions, wifi, email, activesync, applock and wallpaper. It can also be set to null if nothing configured |
||||||
app_management | Dictionary | Optional. If provided, this dictionary supports the following keys: whitelist_apps, blacklist_apps, mandatory_apps and catalogs. whitelist_apps, blacklist_apps and mandatory_apps are themselves also dictionary which contain app and group keys whose values are a list of corresponding app and app group IDs. |
||||||
general_settings | Dictionary | Optional. Dictionary for general_settings currently contains only a location_settings key. Its value is a dictionary that contains keys trackingdisabled and interval_minutes.
|
||||||
policy_targets | Dictionary | Optional. Policy targets support users, devices, usergroups and devicegroups and values are list of their respective IDs. |
curl
HTTP Request:
Shell Command:
1 |
POST https://<portal>.hexnodemdm.com/api/v1/policy/ |
Shell Command:
1 2 3 4 5 6 7 |
curl -H "Authorization: <your API key>" -H "Content-Type: application/json" -d '{ "name": "Sales Team Policy","description": "","ios": { "password": { "allow_simple": true,"require_alphanumeric": false, "max_failed_attempts": 4,"max_grace_period": 5, "max_inactivity": 2,"max_pinage_in_days": 4,"min_complex_chars": 1,"min_length": 1,"pin_history": 4 }} }' https://<portal>.hexnodemdm.com/api/v1/policy/ -X POST |