Closed nkjindal111 closed 10 years ago
We updated our security permissions this weekend and haven't updated the docs. Try:
curl -X PUT -d "des=new+description" http://localhost:3000/devices/e5d63c01-d768-11e3-ae29-0793735fa4f9?token=123
Thanks for your reply... Now its working.
Hi, I have tried to update the value of "online=true" as curl -X PUT -d "online=true" http://localhost:3000/devices/e5d63c01-d768-11e3-ae29-0793735fa4f9?token=123 it got updated but if I again want to set the "online value to false" it gives me the same error saying unauthorized why it is giving this error?.....help please
And also I am trying to delete the device after update ....first it shows that device unregistered but when i query again to show all devices it still shows the device in the list
We really need to make these APIs RESTful again :(
Here's how you currently need to do it:
curl -X PUT -d "online=true&uuid=e5d63c01-d768-11e3-ae29-0793735fa4f9" http://localhost:3000/devices/e5d63c01-d768-11e3-ae29-0793735fa4f9?token=123
and
curl -X DELETE -d "uuid=e5d63c01-d768-11e3-ae29-0793735fa4f9" http://localhost:3000/devices/e5d63c01-d768-11e3-ae29-0793735fa4f9?token=123
Thanks for reply but sorry to say still its not working. one time I am able to update but if I want to update again then it gives me same error as "unauthorized" And also with delete if I update the device once then I am not able to delete the device....on console it shows device unregistered but when I query again for all devices then the device still remains. Without updating the device I am able to delete the device.
@nkjindal111 I'm currently updating the api and docs now to explain the security mechanisms. Should have something soon.
@nkjindal111 The docs on the skynet.im are updated. You don't need to pass a token as part of the query string, but it does need to be a header now.
I am trying to update the values as curl -X PUT -d "token=123&des=new+description" http://localhost:3000/devices/e5d63c01-d768-11e3-ae29-0793735fa4f9 But it gives me error saying unauthorized. Please help me.