Posted on 12-07-2015 08:52 PM
Hello,
What account role and permissions are required for an account to access the "Computer Inventory Collection" API resource url?
I was provided with an account that has access to many other resource urls already, but not that one.
As an example, I was able to retrieve a response for the GET /computers resource (and many other resource urls worked well). Status code 200 success.
../JSSResource/computers
However, when attempting to retrieve a GET response to /computerinventorycollection the response code is 401 Unauthorized.
../JSSResource/computerinventorycollection
I will need API access to the computer inventory collection resource to pull in asset data into ServiceNow.
As I was able to retrieve a response with the /computers URL using the same credentials so perhaps the issue must be with that account permissions. (I'm not a casper admin so I don't know anything else about the account that was provided to me and will need to contact them directly for more information.)
I was thinking that maybe someone would know the details on what permissions are required in order to submit GET requests to the computer inventory collection.
Solved! Go to Solution.
Posted on 12-08-2015 08:22 AM
BTW, I didn't notice it before, but you shouldn't need access to /computerinventorycollection
. That's an admin level setting that dictates what information the Macs submit back to the JSS. I don't think that's actually what you're looking for. It might be /computerreports
or /advancedcomputersearches
Posted on 12-08-2015 01:23 AM
I did a load of testing with this recently, although it was the PUT command rather than GET.
I had to enable Users for some reason.
Your requirement might be a little different. I ended up doing a split half search, testing the options in batches until I got the right group of checkboxes.
Posted on 12-08-2015 08:16 AM
Thanks david, could you clarify a little bit more about the "right group of checkboxes" is that a setting in the admin panel somewhere? As I mentioned unfortunately I dont have admin access to casper, and the person who does has been sitting on this request for a long time. I've got a deadline that is waiting on this to move along so I'm hoping to provide more details on the settings. Thank you so much!
Posted on 12-08-2015 08:20 AM
If you don't have access to the JSS admin console, you may have trouble here. The account you use for API pulls needs to have the correct Read access to certain objects or items in the JSS. A good test would be, whatever account you planned on using, log into it to the JSS to see if you can access the items you want to pull. If you can, then doing the same in a script using the API probably will work. I say probably because it can be a little odd how the permissions model works.
Posted on 12-08-2015 08:22 AM
BTW, I didn't notice it before, but you shouldn't need access to /computerinventorycollection
. That's an admin level setting that dictates what information the Macs submit back to the JSS. I don't think that's actually what you're looking for. It might be /computerreports
or /advancedcomputersearches
Posted on 12-08-2015 08:23 AM
@cat123 in my case, computers and users was all that I needed so it could be worth trying that. If not, unfortunately it will be trial and error.
If you can't get admin rights directly I would see if you can get some time with the Casper admin. To try and work it out without it would be a much slower process.
Posted on 12-08-2015 08:53 AM
Thanks! I appreciate the help!!!