Quickstart: your first API call
Create a read-only API token, call GET /api/user and list your sites.
On this page
Before you start
- You can sign in to the Control Panel.
- Your account has two-factor authentication on, if your organisation requires it.
Create a token
In the Control Panel, open the menu under your name, choose Profile, then API tokens. Create a token with only Read ticked and 7 days under Expires, then copy it: see API tokens.
export COREFINITY_TOKEN='YOUR_TOKEN'Check who you are
curl https://manage.corefinity.com/api/user \ -H "Authorization: Bearer $COREFINITY_TOKEN" \ -H "Accept: application/json"{ "user": { "id": "1042", "company_id": "77", "name": "Alex Example", "email": "[email protected]" } }List your sites
curl "https://manage.corefinity.com/api/corestack/sites?limit=20" \ -H "Authorization: Bearer $COREFINITY_TOKEN" \ -H "Accept: application/json"The answer holds
sites, one entry per site with itskind,platformandenvironments, andnext_cursorfor the next page.
Next
Was this helpful?