Hi,
I once again having issues using the new API / UAPI / Jamf Pro API.
Getting error: "httpStatus" : 405, for which I cannot find description here: https://developer.jamf.com/jamf-pro/docs, anybody knows what it is?
What I am trying to do is simply change computer's Site on JSS via the new API, any input would be appreciated ($id is current computer ID on JSS):
curl -X PATCH "https://jss.MYCOMPANY.com:8443/uapi/v1/computers-inventory/$id" -H "accept: application/json" -H "Authorization: Bearer $token" -H "Content-Type: application/json" -d "{\\"general\\":{\\"site\\":[{\\"id\\":\\"6\\"}]}}"
I have tried it using Site name as well:
curl -X PATCH "https://jss.MYCOMPANY.com:8443/uapi/v1/computers-inventory/$id" -H "accept: application/json" -H "Authorization: Bearer $token" -H "Content-Type: application/json" -d "{\\"general\\":{\\"site\\":[{\\"name\\":\\"EMEA - London\\"}]}}"
same error, the problem I suspect is with this: "{\\"general\\":{\\"site\\":[{\\"name\\":\\"EMEA - London\\"}]}}", for which I can't find anything, I have tried to build it here, but can't find Site for some reason o-O: https://developer.jamf.com/jamf-pro/reference/computer-inventory-1#patch_v1-computers-inventory-detail-id