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 calling the API. Import cloud_api.yaml to generate a Cloud collection, set the collection variable GCORE_API_KEY to the API token, and set the Authorization header to APIKey {{GCORE_API_KEY}}.
Collection authorization and reuse of a response value are in Use Postman.
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.