9.9 and the API

tmagdziasz
New Contributor III

In the past I was able to search mobile devices by Asset Tag from the API via JSSResource/mobiledevices/match/"asssettag" This no longer works, it appears to still work for computers. Can anyone confirm this was due to 9.9? If you don't have 9.9 can you paste the XML or JSON output that you get for ../JSSResource/mobiledevices/match/"something that is valid here"

Thanks

3 REPLIES 3

Graeme
Contributor

I found that after upgrading to 9.9 a search for all mobile devices (i.e. the above query with out the /match/...)returned the output in JSON by default rather than XML. Adding the header "Accept:application/xml" worked around the issue. I opened case ref:_00D80cOw4._5001A14zR8u:ref with JAMF for the issue.

Regards
Graeme

tmagdziasz
New Contributor III

There is no longer a way to search for an asset tag on a mobile device via the API....

brad
Contributor

Hey @tmagdziasz ,

I am able to match on Mobile Devices searching either for an exact Asset Tag or a partial Asset Tag followed by an asterisk. I am running 9.91. I do only receive back a subset of data that does not include the asset tag in the results but it does contain the appropriate device. I don't know if that has changed or not. I seem to recall running through a workflow where on each match it would then reach out to the JSS again by its ID or Serial Number to get other information.

I wonder if there's a chance some permissions have changed? Maybe temporarily assign full admin to the api user and run it again. What is the response code from the JSS when you run it?

Here is my redacted sample JSON output:

{"mobile_devices":[{"id":12,"name":"iPad","udid":"654ac64ac65465a4c654ac654a6c54","serial_number":"FFFFFDDDDDDDD","mac_address":"45:45:45:45:45:45","wifi_mac_address":"45:45:45:45:45:46","username":"ME","realname":"Really Me","email":"potato@farm.com","room":"","position":"Farmer ","building_name":"Barn","department_name":""}]}

Hope that helps, let me know if you want me to run any other query.

-Brad