Skip to main content

Documentation Index

Fetch the complete documentation index at: https://gcore.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Several tools work well for calling the Gcore API. The right choice depends on the workflow: GUI exploration, shell scripting, IDE-based development, or production code.

Postman

Postman is a GUI application for making API requests, well-suited for exploring endpoints visually, testing requests interactively, and sharing collections with a team.

Import the Gcore Cloud spec

The Gcore API ships with an OpenAPI specification file (cloud_api.yaml) that Postman can import to auto-generate a complete request collection — every endpoint, pre-filled with parameters. The spec file is available in the product-documentation repository at:
api-reference/services_documented/cloud_api.yaml
To import:
  1. Open Postman and click Import in the top-left.
  2. Select the File tab.
  3. Drag and drop cloud_api.yaml, or click Upload Files and select it.
  4. Postman generates a collection named Gcore OpenAPI — Cloud API with all endpoints grouped by resource type.

Set the API token in Postman

  1. In the generated collection, click the collection name → Edit.
  2. Open the Variables tab.
  3. Add a variable named GCORE_API_KEY and paste the token as the Current value.
  4. In the Authorization tab, set Type to API Key, Key to Authorization, Value to APIKey {{GCORE_API_KEY}}, and Add to to Header.
  5. Save.
All requests in the collection now automatically include the token.
Gcore tokens contain a $ character. Postman does not use shell variable expansion, so paste the token value as-is — no backslash escaping needed.

Send a request

  1. In the collection, navigate to IAM → Account → Get account details.
  2. Click Send.
  3. The response panel on the right shows the JSON response and status code.

HTTPie

HTTPie (http command) is a curl alternative with a more readable syntax. It color-formats responses, handles JSON automatically, and is well-suited for quick terminal work.

Install

Install using the package manager for the operating system in use:
OSCommand
macOSbrew install httpie
Linux (Debian/Ubuntu)sudo apt install httpie
Windowswinget install httpie or pip install httpie
Anypip install httpie
Verify: http --version

Syntax

An HTTPie request is shorter and more readable than the equivalent curl command:
# curl
curl "https://api.gcore.com/iam/clients/me" \
  -H "Authorization: APIKey $GCORE_API_KEY"

# HTTPie equivalent
http GET https://api.gcore.com/iam/clients/me \
  "Authorization:APIKey $GCORE_API_KEY"
Key differences from curl:
  • No quotes around the URL (unless it contains special characters)
  • Headers are written as Key:Value without the -H flag
  • GET is the default and can be omitted
  • JSON responses are automatically formatted and color-coded
A POST request with a JSON body:
# curl
curl -X POST "https://api.gcore.com/cloud/v1/networks/$PROJECT_ID/$REGION_ID" \
  -H "Authorization: APIKey $GCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-network"}'

# HTTPie equivalent
http POST https://api.gcore.com/cloud/v1/networks/$PROJECT_ID/$REGION_ID \
  "Authorization:APIKey $GCORE_API_KEY" \
  name="my-network"
HTTPie serializes key=value arguments as JSON automatically and sets Content-Type: application/json.
The $ in Gcore tokens requires the same escaping rules as with curl. Set the token as an environment variable and reference it as $GCORE_API_KEY to avoid shell expansion issues. See API basics for details.

VS Code REST Client

The REST Client extension for Visual Studio Code sends HTTP requests directly from a .http file in the editor, so requests live alongside the code that uses them and can be committed to version control.

Install

  1. Open VS Code.
  2. Press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (macOS) to open Extensions.
  3. Search for REST Client (author: Huachao Mao) and click Install.

Create a request file

Create a file named gcore.http anywhere in the project:
@baseUrl = https://api.gcore.com
@projectId = 1234567
@regionId = 76

### Verify token
GET {{baseUrl}}/iam/clients/me
Authorization: APIKey {{$dotenv GCORE_API_KEY}}

### List projects
GET {{baseUrl}}/cloud/v1/projects
Authorization: APIKey {{$dotenv GCORE_API_KEY}}

### List instances
GET {{baseUrl}}/cloud/v1/instances/{{projectId}}/{{regionId}}
Authorization: APIKey {{$dotenv GCORE_API_KEY}}
Click Send Request above any request to run it. The response opens in a side panel. {{$dotenv GCORE_API_KEY}} reads the token from a .env file in the workspace root. Create .env:
GCORE_API_KEY=29841$c767b250...
In the .env file, the $ in the token does not need escaping — there is no shell variable expansion. Paste the token value exactly as copied from the portal.
Add .env to .gitignore to avoid committing the token.

Bruno and Insomnia

Bruno and Insomnia are open-source alternatives to Postman with similar GUI-based workflows. Both support OpenAPI import. Bruno stores collections as plain text files in the filesystem (no cloud sync required), making it a good choice for teams that want collections committed to version control alongside code. Both tools accept the same cloud_api.yaml import file described in the Postman section above.