Skip to main content
Postman provides a graphical interface for sending Gcore API requests and inspecting responses. Import the OpenAPI file for an API, authorize the collection with an API token, and reuse a value from one response in the next request.
1

Import the specification

Click Use resources or import, then select the Import tab. Paste the URL of the API:
Use resources or import control in the Postman toolbar
Import tab with the OpenAPI file ready to import
Select OpenAPI 3.1 Specification with a Postman Collection, then Import. The collection appears in the left sidebar and contains a request for every operation in that file.
2

Store the token

Click Create new, then Environment. Name the environment Gcore API. Add a variable named token, set the value to the API token, and click Secure next to token.
Gcore API environment with the token variable
Select Gcore API in Environment.
Environment menu listing Gcore API
3

Authorize the collection

Open the imported collection. On its Authorization tab:
  1. Set Auth type to API Key.
  2. Set Key to Authorization.
  3. Set Value to apikey {{token}}.
  4. Set Add to to Header.
Collection authorization set to API Key
Requests in the collection use this header when their authorization is inherited. The imported specification names the header and does not insert the token.
4

Read the templates

This example uses the DDoS Protection collection from the table above.
Access to the DDoS Protection API is an Enterprise feature.
Open List protection templates. On the Authorization tab, the collection authorization is shown as Inherited.The method is GET and the URL is https://api.gcore.com/security/sifter/v3/templates. The operation is List protection templates.Select Send.HTTP 200 means the request succeeded.
List templates request returning HTTP 200
Find the template named Basic in the response. In the Gcore API environment, create a variable named template_id and set its value to the template’s id.
5

Read one template

Open Get protection template in the same collection. On the Authorization tab, the collection authorization is shown as Inherited.On the Params tab, set protection_template_id to {{template_id}}. The operation is Get protection template.Select Send.An HTTP 200 response confirms that the request succeeded. The response body contains the selected template.