Hexnode API Post command not working

expand collapsive

Hii, we are facing some problems while testing out the Hexnode APIs. We were able to execute GET APIs successfully but when we try POST it does not execute successfully.
POSt commands tested –
POST https://xyz.hexnodemdm.com/api/v1/actions/associate_policy/
If it helps, we used this as body –

{
"users": [
{
"id": 2,
}
]
"policies": [
{
"id": 20,
}
]
}

All Replies

  • Hi @Birgitta, you can avoid this error by fixing the body content. The ‘policies’ key-value should come before the ‘users’ key-value. This way you’ll be associating the policy to the user which is the proper way to query it. 

    Corrected body – 

     
     
    Cheers! 
    Zach Goodman 
    Hexnode UEM

    • This reply was modified 2 years, 7 months ago by  Zach Goodman.