2.7. API
2.7.1. Presentation
Note
The list of endpoints is provided in the Endpoint list paragraph.
These endpoints can be executed:
- Via SWAGGER (Use via the swagger graphical interface):This enables endpoints to be used, its parameters to be understood, its execution to be tested, and its results to be analysed
- Via CURL (Use via CURL) :This enables a Curl request to be executed directly without going through the graphical interface.
2.7.2. Use via the swagger graphical interface
Each endpoint of the API:
Performs a specific operation. Its name and description are indicated in the GUI or in the list Endpoint list
Performs one of four possible methods: GET (Obtain), DELETE (Delete), POST (Publish), PUT (Modify)
Needs authentication rights that are the same as for the graphical interface (Operators or Administrators)
May need operating, input and/or output parameters: for example, in the case of a filter, the value of this filter must be indicated.
This interface enables:
A list of existing endpoints by theme
Details of any parameters for running an endpoint
Information on the expected result, data template, and an example with default values
Running queries
Retrieving the Curl command equivalent to the request via the API
2.7.3. Use via CURL
`Responses`
area.Note
Send a request to list the GBox engines (endpoint api/analysers):
curl -X GET "https://x.x.x.x/api/analysers/" -H "accept: application/json" -H "authorization: Basic dG90bzpTYW5kcmluZSwxMDA=" -H "X-CSRFToken: PsMZMavgOibfe5giFCImu0YYTWqvB2AdhR1y"
where x.x.x.x is the IP address of the Gbox.
2.7.4. Authentication and access to the GBox API
`API`
button.