trying to get my scripting correct to be able to update an extension attribute for an ipad using rest api. even through the Try It Out feature on the uapi/docs i receive an error 500 so something isnt correct. All examples are in XML but uapi is in JSON which i prefer (as im using powershell)
as the example in the uapi docs isnt working, i know the request isnt correct.....but what am i missing? is the documentation correct? I noticed in the model schema it mentions
"extensionAttributes": [
{
"id": 0,
"name": "string",
"type": "STRING",
"value": "string"
}
but in the bodies Model Schema it has
"updatedExtensionAttributes": [
{
"id": 0,
"name": "string",
"type": "STRING",
"value": "string"
}
]
here is the generated example which fails with error 500. the attribute exists, correctly as far as i know.
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: jamf-token [insert token]' -d '{
"updatedExtensionAttributes": [
{
"id":1,
"name": "DiscoProfile",
"value": "xxx"
}
],
}' 'https://[server].jamfcloud.com/uapi/inventory/obj/mobileDevice/1/update'