API Tokens for the Cloud Portal
Generate an API token in the cloud portal, call the SolusVM 2 REST API from scripts to list servers or take snapshots, and keep tokens safe.
Everything you can click in the cloud portal is also available over its REST API, so you can script snapshots before deployments, pull usage into your own dashboards, or wire power actions into your tooling. Access is granted with an API token tied to your account.
Anyone holding a token can do to your servers whatever your account can do, including reinstalling them. Store tokens in a secrets manager or environment variable, never in a repository, and revoke any you stop using.
Create a token#
- Open Account (your profile in the top-right corner of cloud.nobullnetworks.com) and go to the API tokens tab.
- Click Generate (or Create) and give the token a name that says what will use it: "deploy pipeline", "grafana collector".
- Copy the token now. It is shown once. If you lose it, delete it and generate another.
Make a request#
Send the token as a bearer token. The API lives under /api/v1/ on the portal hostname:
export SOLUS_TOKEN='paste-your-token-here'
# list your servers
curl -s -H "Authorization: Bearer $SOLUS_TOKEN" \
-H "Accept: application/json" \
https://cloud.nobullnetworks.com/api/v1/servers | jq '.data[] | {id, name, status}'
# take a snapshot of server 123 before a deploy
curl -s -X POST -H "Authorization: Bearer $SOLUS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"pre-deploy"}' \
https://cloud.nobullnetworks.com/api/v1/servers/123/snapshots
Endpoint names, parameters, and response shapes are documented in the SolusVM 2 API reference. Your token only reaches the servers and actions your account already has permission for.
Good habits#
- One token per integration. Revoking a leaked token then breaks one thing, not everything.
- Rotate on staff changes. If someone who had the token leaves, generate a new one and delete the old.
- Watch the activity log. API actions appear there with the token's account; see Usage Graphs and the Activity Log.
- Handle rate limits politely. Back off on 429 responses rather than retrying in a tight loop.
Revoke a token#
Back on the API tokens tab, delete the token. Revocation is immediate; anything still using it fails on its next request.
Game servers#
The game panel has its own account API keys, separate from the cloud portal. See Game Panel Account: 2FA, API and SSH Keys.
