Posted on 06-17-2021 07:35 AM
Dear experts,
I'm struggling again with the permissions needed for an account that can use the API - seems the documentation in that area is somewhat incomplete. The account shall be able to create or upload computergroups. I have already tried plenty of options, but I still always get a '404', so some obscure permissions are still lacking. Can somebody tell what are the minimum permissions an account needs to be able to create or modify a computergroup via the API? Getting a computergroup via the API works already nicely.
The account also does not get the option to 'try' the POST or PUT on the webinterface, I assume that is also related to the permissions.
Thanks in advance for your help,
Matthias
Posted on 06-17-2021 11:12 PM
If you are getting 404 it is not an API permissions.
Based on the link below:
404 (Not Found): 'The server can not find the requested resource.'
401 (Unauthorized): 'Indicates that the request requires user authentication information. The client MAY repeat the request with a suitable Authorization header field'
https://restfulapi.net/http-status-codes/
To test your API calls I would recommend Postman
For the "lack" of support on the PUT, POST calls in the webinterface look at the Jamf dev you can run examples there too.
The Classic API Reference
Regards,
Posted on 06-18-2021 12:24 AM
Hi @Mauricio how could I confuse the 404 with a permission issue - I should have known better. OK, I must look elsewhere...Thanks for the heads up!
Posted on 06-18-2021 12:55 AM
Hello @mschroder , they are all from the 400 family very confusing :-)
If you would like further help, just post what you are trying to do and we can have a look.
Regards,
Posted on 06-18-2021 01:20 AM
Hi @Mauricio, thanks for your kind offer. I think I just had my facepalm moment: I finally saw that I was trying 'POST /JSSResource/computergroups/Name' and 'POST /JSSResource/computergroups/ID', but of course it needs to be 'name' and 'id'. And how often have I starred (sp?) at these lines :(
Posted on 06-18-2021 03:32 AM
It has been a long week, these things happens.
Well, they do to me on Mondays, so I have no excuses!
Glad it is sorted.
Best