Author Topic: Rename Device XML vs JSON  (Read 879 times)

Offline DeltaMikeCharlie

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Rename Device XML vs JSON
« on: March 23, 2018, 12:00:40 PM »
When I make the following XML request, it is successful:

Code: [Select]
<device uid="aa:bb:cc:dd:ee:ff" label="NewName" type_id="33" />

However, when I make what appears to be an equivalent JSON request, it returns a http status of 200, but the device is not modified:

Code: [Select]
"devices": [{
"uid": " aa:bb:cc:dd:ee:ff ",
"label": "NewName",
"type_id": "33"

I have tried including the "types" object and/or the id property as per the sample documentation, but that makes no difference.

Even though the documentation says to use a POST, that always returns a "405 - Method not allowed" but a PUT returns a 200.  The XML version also needs a PUT, not a POST.

I was converting my app from XML to JSON, but I guess that I will keep this call using XML.

An Error Has Occurred!

Call to undefined function seo_social_bookmarks()