-
Notifications
You must be signed in to change notification settings - Fork 2
API Interface
adrianb82 edited this page Dec 12, 2016
·
2 revisions
To obtain a token for the user, do the following:
curl -u test@weblyzard:demo https://api.weblyzard.com/0.2/token
With that token, the following operations are possible.
ADD OBSERVATION:
curl -H 'Authorization: Bearer <token>' -d @observation.json https://api.weblyzard.com/0.2/observations/weblyzard.com/test/<indicator-id>
RETRIEVE OBSERVATION:
curl -H 'Authorization: Bearer <token>' https://api.weblyzard.com/0.2/observations/weblyzard.com/test/<indicator-id>/<observation-id>
UPDATE OBSERVATION:
curl -H 'Authorization: Bearer <token>' -d @observation.json https://api.weblyzard.com/0.2/observations/weblyzard.com/test/<indicator-id>/<observation-id>
DELETE OBSERVATION:
curl -H 'Authorization: Bearer <token>' -XDELETE https://api.weblyzard.com/0.2/observations/weblyzard.com/test/<indicator-id>/<observation-id>
DELETE DATASET:
curl -H 'Authorization: Bearer <token>' -XDELETE https://api.weblyzard.com/0.2/observations/weblyzard.com/test/<indicator-id>
It is not advised to DELETE entire repositories, therefore it is best to simply delete individual observations or datasets.