New policy with Hexnode APISolved

Participant
Discussion
6 years ago

Hi! When I try to use Hexnode MDM API to POST a new policy, the response is that the app_managemet and policy_targets arguments cannot be null. They are optional fields, so I’m confused as to why the web server is returning this?
I’m trying to post a policy name, description and allowwifi = false under Android restrictions.

Replies (1)

Marked SolutionPending Review
Hexnode Expert
6 years ago
Marked SolutionPending Review

Hi Henry!
The two arguments, “app_management” and “policy_targets”, are indeed optional, which implies that the keys need not be used. Try removing them and executing the command in the following sample data format:

{“name”: “your policy name”,”description”:”test”, “android”:{“restrictions”:{“allow_wifi”:false}}}

Refer the Hexnode MDM API Documentation for more details.

Cheers!
Amy Watson
Hexnode MDM