Skip to main content
Solved

cURL Issue - Attempting To Retrieve/Update iOS Extension Attributes

  • January 20, 2022
  • 2 replies
  • 37 views

Forum|alt.badge.img+5

Hey Everybody,

I'm having some trouble with my scripting.  I'm attempting to view an iPad's extension attributes, and then update them if needed, but my cURL request always come back with the same error: "The request requires user authentication" -- which I'm using.  Works for everything else, but not for extension attributes.  Maybe my code is wrong?  Here's what I have:

curl -X GET -H "accept: application/xml" -H "authorization: Basic ${jssAuth}" "${jssURL}/JSSResource/mobiledeviceextensionattributes/id/$deviceID"

 

 

Thanks,
-Rob

Best answer by ljcacioppo

Just a note, if you are trying to look up the extension attributes for a specific iPad, that's not the right API endpoint.

The ID number at the end of that api call is for extension attribute ID number, not mobile device ID.

If you were looking for the value in an extension attribute for a specific iPad, you would probably need to use the 

/JSSResource/mobiledevices/id/$deviceID/subset/extension_attributes

to see the EA values for a given iPad

2 replies

ljcacioppo
Forum|alt.badge.img+17
  • Jamf Heroes
  • Answer
  • January 20, 2022

Just a note, if you are trying to look up the extension attributes for a specific iPad, that's not the right API endpoint.

The ID number at the end of that api call is for extension attribute ID number, not mobile device ID.

If you were looking for the value in an extension attribute for a specific iPad, you would probably need to use the 

/JSSResource/mobiledevices/id/$deviceID/subset/extension_attributes

to see the EA values for a given iPad


Forum|alt.badge.img+5
  • Author
  • New Contributor
  • January 20, 2022

Thank you very much.  That was exactly it.