9.6.2. Using an API endpoint
9.6.2.1. Introduction
This procedure explains how to:
run an endpoint locally
retrieve the response
obtain the corresponding .json file
identify the response template and obtain an example of it
By clicking on the `Try it out` button, it is possible to test the selected query. The tool will also generate queries for you to use with curl.
9.6.2.2. Prerequisites
User: member of Administrators Group
9.6.2.3. Preliminary operations
Connect to the GBox via a browser (see Connection to the web interface via a browser).
9.6.2.4. Procedure for accessing the GBox API
9.6.2.5. Procedure to execute an endpoint
To illustrate this example, the API chosen is that which enables analysis templates to be listed.
Select the
`templates`theme from the list of existing themes (5).- Click on the API
`GET/templates/ (Operators, Administrators) List and filter the templates`.The window below is displayed. 
Note
For the example, the`/templates`endpoint was chosen.Reminder: the purpose is to list and filter existing templates.Astuce
Some endpoints require parameters to be entered before they can be run.
- Click on button (2)
`Try it out`.The window is modified ... - Click on the button (1)
`Execute`.The query is launched and the following window is displayed.This window has several sections:The
`Curl`display area (1) for the Curl queryThe
`URL`display area (2) for the URL requestThe
`Server response`zone (3):- The return
`Code`(4):If the value of the code is
`200then the execution was successful.If the message
`code 400 Undocumented Error Bad Request`is displayed, check whether the mandatory parameters were entered correctly.
 - The body of the response (5): please refer to the presentation of the Overview of the API GBOX interface
 - The area describing the response header(6)
 - The request duration value in ms (7)
 - The
`Download`button (8) to download the corresponding .json file 
- Zone (9)
`Responses`.This zone displays different information depending on whether the`Model`or`Example Value`link (10) is used. 
Either the output template (
`Model`) in field (11): see Overview of the API GBOX interface- Or an example of the expected response in field (11) with example values (
`Example Value`): see Overview of the API GBOX interface presentationThe values are:For type integer (value 0)
For type string (value = string)
For type boolean (value = true)
 
Note
The screenshot shows an example.