API tools
Several tools work well for calling the CDB 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 CDB Cloud spec
The CDB 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_docs_mintlify/cloud_api.yaml
To import:
- Open Postman and click Import in the top-left.
- Select the File tab.
- Drag and drop
cloud_api.yaml, or click Upload Files and select it. - Postman generates a collection named CDB OpenAPI — Cloud API with all endpoints grouped by resource type.
Set the API token in Postman
- In the generated collection, click the collection name → Edit.
- Open the Variables tab.
- Add a variable named
GCORE_API_KEYand paste the token as the Current value. - In the Authorization tab, set Type to
API Key, Key toAuthorization, Value toAPIKey {{GCORE_API_KEY}}, and Add to toHeader. - Save.
All requests in the collection now automatically include the token.
Send a request
- In the collection, navigate to IAM → Account → Get account details.
- Click Send.
- 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:
| OS | Command |
|---|---|
| macOS | brew install httpie |
| Linux (Debian/Ubuntu) | sudo apt install httpie |
| Windows | winget install httpie or pip install httpie |
| Any | pip install httpie |
Verify: http --version
Syntax
An HTTPie request is shorter and more readable than the equivalent curl command:
# curl
curl "https://api.cdb-staging.cdn.orange.com/iam/clients/me" \
-H "Authorization: APIKey $GCORE_API_KEY"
# HTTPie equivalent
http GET https://api.cdb-staging.cdn.orange.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:Valuewithout the-Hflag GETis 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.cdb-staging.cdn.orange.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.cdb-staging.cdn.orange.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.
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
- Open VS Code.
- Press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (macOS) to open Extensions.
- 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.cdb-staging.cdn.orange.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...
Paste the token value exactly as copied from the portal — no escaping needed.
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.