AnsweredAssumed Answered

API missing param hardware

Question asked by Brian Hill on Feb 7, 2018
Latest reply on Feb 8, 2018 by Yum Darling

When I do this:

curl -H "X-Samanage-Authorization: Bearer MYTOKEN" -d "{"hardware":{"owner":{"email":"etetrault@ccu.edu"}}}" -H "Accept: application/vnd.samanage.v2.1+json" -H "Content-Type:text/json" -X PUT https://api.samanage.com/hardwares/1900161.json

I get: {"error":"param is missing or the value is empty: hardware"}

If I do the same as xml:

curl -H "X-Samanage-Authorization: Bearer MYTOKEN" -d "<hardware><owner><email>etetrault@ccu.edu</email></owner></hardware>" -H "Accept: application/vnd.samanage.v2.1+xml" -H "Content-Type:text/xml" -X PUT https://api.samanage.com/hardwares/1900161.xml

The owner of the hardware is properly updated.

 

What am I missing or doing wrong?

 

I get the same results with VBA as well, cannot do the JSON, but can the xml.

Outcomes