Skip to main content
Question

API: Permissions needed for POSTing computergroups


Forum|alt.badge.img+12

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

5 replies

Mauricio11
Forum|alt.badge.img+11
  • Valued Contributor
  • 173 replies
  • June 18, 2021

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,


Forum|alt.badge.img+12
  • Author
  • Valued Contributor
  • 359 replies
  • June 18, 2021

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!


Mauricio11
Forum|alt.badge.img+11
  • Valued Contributor
  • 173 replies
  • June 18, 2021

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,


Forum|alt.badge.img+12
  • Author
  • Valued Contributor
  • 359 replies
  • June 18, 2021

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 :(


Mauricio11
Forum|alt.badge.img+11
  • Valued Contributor
  • 173 replies
  • June 18, 2021

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings