curl command-line tool, and an understanding of JSON — the format the API uses for both requests and responses. Environment variables and HTTP status codes are also covered below.
Choosing a tool
Different tools suit different workflows. All of them call the same Gcore API endpoints — the choice is about comfort and use case:
For those new to APIs: Postman removes the need to learn terminal syntax — the GUI has fields for everything. For those already comfortable in a terminal: curl is pre-installed on most systems and needs no setup.
Full setup instructions for each tool are in Tools.
These guides use curl in all code examples because it runs on every operating system without additional installation.
Tools needed
A terminal and curl are required to follow the curl examples. Python is needed only for SDK examples.Terminal
A terminal is a text-based interface where commands are typed and executed. It’s where all curl commands in these guides are run.
Once a terminal is open, commands are typed at the prompt (usually a
$ or > symbol) and run by pressing Enter.
curl
curl is a command-line tool for making HTTP requests. It comes pre-installed on macOS and most Linux distributions. On Windows, it has been pre-installed since Windows 10 version 1803.
To check if curl is available, open a terminal and run:
curl 7.x.x or curl 8.x.x, it is installed. If the command is not found:
- On Windows: download the installer from curl.se/windows, or install via winget:
winget install curl - On macOS: install Homebrew, then run
brew install curl - On Linux (Debian/Ubuntu): run
sudo apt-get install curl
Python (optional)
Python is needed only for the Python SDK examples. All guides showcurl and Python SDK tabs — curl works without any additional installation.
To check if Python is installed:
Python 3.8 or higher. To install Python, download it from python.org or use a package manager.
Install the Gcore SDK with:
curl command structure
Everycurl command in these guides follows the same pattern:
For a
GET request (reading data), -X GET, -H "Content-Type: ...", and -d are not needed:
-X GET is the default, so it can be omitted.
JSON responses
The Gcore API responds in JSON — a text format that represents structured data. Every response is either a single object ({...}) or a list of objects ([...]).
Example response from listing projects:
"count": 1— there is 1 project total"results": [...]— an array containing the projects"id": 1234567— the project’s numeric ID"name": "Default"— the project’s display name
id from the response”, it means: find the id field in the terminal output and use that number in the next command.