NOTE Following API's require authentication token to work.
Find Resources. Data schema available here
-
URL
/api/v0/resources
-
Method
GET
-
Success Response:
Code: 200
Content:
[{ "_id" : "5a89c4121a6d6e068a08c60e", "cre" : { "date" : "2018-02-18T18:21:06.865Z" }, ... }]
-
Error Response:
-
Code: 401 UNAUTHORIZED
Content:
{ "message": "No authorization token was found" }
-
-
Sample Call:
curl -H "Authorization: Bearer mytoken123" http://localhost:3000/api/v0/resources
Notes: You can use filter results by using url parameters. E.g. /resources?hw.sn=abc`
Returns single Resource.
-
URL
/api/v0/resources/:resource
hw.sn
can be also used for resource identification -
Method:
GET
-
Success Response:
-
Code: 200
Content:
{ "_id" : "5a89c4121a6d6e068a08c60e", "cre" : { "date" : "2018-02-18T18:21:06.865Z" }, ... }
-
-
Error Response:
-
Code: 401 UNAUTHORIZED Content:
{ "message": "No authorization token was found" }
-
Code: 404 NOT FOUND Content:
{"error": "No resources found by id"}
-
see documentation from here