Update API documentation (3/x) authored by ZZZ[GONE] Paul Bouchillou's avatar ZZZ[GONE] Paul Bouchillou
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
[Start Page]( https://operations-portal.egi.eu/api-documentation) - You must authenticate with your EGI account. [Start Page]( https://operations-portal.egi.eu/api-documentation) - You must authenticate with your EGI account.
If you don't have a token yet, click the button "Ask for token". Else, your token is displayed on the page. If you don't have a token yet, click the button ![ask-token](uploads/bcefe2a8b48db9b6ff41fa246cac909c/ask-token.png). Else, your token is displayed on the page.
# How to use the token ? # How to use the token ?
...@@ -18,18 +18,17 @@ The token must be set to the "X-API-Key" parameter in the HTTP header. ...@@ -18,18 +18,17 @@ The token must be set to the "X-API-Key" parameter in the HTTP header.
If you have a valid token, you can request the API from anywhere, including it's [start page]( https://operations-portal.egi.eu/api-documentation), which provides an user interface, and demo features. If you have a valid token, you can request the API from anywhere, including it's [start page]( https://operations-portal.egi.eu/api-documentation), which provides an user interface, and demo features.
To do this, click the "Authorize" button, and set your token value in the prompt. In this way your token will be automatically set in the header (X-API-Key) for all your requests on this page. To do this, click the ![authorize](uploads/7fb174f05f8772668c180eeaf3a8b57f/authorize.png) button, and set your token value in the prompt. In this way your token will be automatically set in the header (X-API-Key) for all your requests on this page.
You can now request every endpoint of the API with a friendly user interface. You can now request every endpoint of the API with a friendly user interface.
The image below shows an example of one endpoint. The image below shows an example of one endpoint.
TODO image ![example-ui](uploads/0fbff7a75c14f61ea43a34c3e7d1be19/example-ui.png)
Send your request by clicking "Try it" on the route you want to request, set the appropriate parameters, and click "Execute". Send your request by clicking "Try it" on the route you want to request, set the appropriate parameters, and click "Execute".
As soon as the response is back, the API user interface will display : As soon as the response is back, the API user interface will display :
- The response's HTTP status and content (in case of error the API usually returns a helper message specifying whether it's a request problem or a server failure). - The response's HTTP status and content (in case of error the API usually returns a helper message specifying whether it's a request problem or a server failure).
- TODO img - TODO img
- The request URL matching your parameters and an re-usable Curl command line to request this URL from anywhere (see below). - The request URL matching your parameters and an re-usable Curl command line to request this URL from anywhere (see below).
- TODO insert image - ![example-response](uploads/877c86c1a66a0d5921ce2c70d44ffabe/example-response.png)
\ No newline at end of file \ No newline at end of file