API Documentation does not state possible return values
CompletedOnly a brief JSON structure is displayed, it would be nice to know what happens in the cases of error, update, create or delete. Also there is no mention of what the fields in the returned JSON mean.
This applies to (almost?) all POST/PUT requests returning a "msg" key with an array as value but no indicition what the array fields or their order mean.
-
This has been biting me, too: there's only so much you can infer from a single example of what might be returned.
Where the return message might include integers and two or more booleans, it would be very helpful to know what they actually indicate. If we knew that, we could write code that's much smarter about handling them.
0 -
Oops. I found most of that information at the top of the page: http://api.device42.com/#response-amp-status-messages.
For completeness, it'd still be nice to know what the non-zero return codes mean.
0 -
Hi James,
Thanks for finding and clarifying that :). Regarding codes, it is really for troubleshooting for us(Device42 support team). No real meaning for your call.
Regards,
Raj
0 -
...or is that the list of codes at the bottom?
http://api.device42.com/#error-codes looks like it. Perhaps a tweak to the phrasing in the Status Messages section at the top, to make the meaning and connection clearer?
Maybe something along the lines of "Code 0 = success, which equates to 'HTTP/1.1 200 OK'. All other responses..."
0
Please sign in to leave a comment.
Comments
4 comments