FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

13361 questions

15887 answers

25700 comments

50425 members

0 votes
186 views 4 comments
by
Hi,

I am trying to execute a command for a TRB141, with the instruction below,  but couldn't find the post schema of the API. is there a online document or sample available? Any help would be much appreciated!

 Cheers,

Jason

1 Answer

0 votes
by

Hello,

Not much of an expert with the format you have provided, however, the call /devices/{id} is just to get info about a device with some id, it does not really do anything else.

To execute a command in the device I would recommend using task manager function. The API reference can be found here.

Best answer
by

Thanks a lot Paul! Just tried an API post of task execution, got a 401 unauthorised error like below, the token has full permissions granted, any idea why still get 401 error? 

{

    "success": false,

    "errors": [

        {

            "code": "UNAUTHORIZED",

            "message": "Unauthorized. (XSRF)"

        }

    ]

}

by
Most likely you have entered it in the wrong place or it is incorrect, if the bearer token is entered correctly the response should be ok
by
The bearer is correct, All the GET requests work well. But seems any update to the device via POST doesn't work.
by
Turned out the problem is the restful client I used for testing, something wrong/missing in the post from the client. Tried postman it works. Thanks again PauliusReg for your help!