Skip to main content

Quick start

On this page you create a token, send your first request, and create and delete a cloud server. The examples use the Cloud API; every other product follows the same pattern.

Before you start​

  • An Arianet account with wallet balance (creating a server costs money; reading lists is free)
  • curl, the Arianet CLI, or any language that speaks HTTP

1. Create a token​

  1. Sign in to the panel and open the API tokens page.
  2. Create a token with the cloud:servers:read and cloud:servers:write scopes.
  3. Copy the token; it is shown only once.

Scopes and IP restrictions are covered in Authentication.

2. Put the token in an environment variable​

Do not write the token into your code; keep it in the ARIANET_TOKEN environment variable. The CLI reads the same variable.

export ARIANET_TOKEN="paste-your-token-here"

3. Send your first request​

List the cloud servers of your account (an empty list if you have none):

curl -s https://api.ariaservice.net/cloud/v1/servers \
-H "Authorization: Bearer $ARIANET_TOKEN"

A 401 means the token was not sent correctly; a 403 means it lacks a scope (authentication errors).

4. Create your first server​

Find a datacenter, a plan and an image, then create the server:

BASE=https://api.ariaservice.net/cloud/v1
AUTH="Authorization: Bearer $ARIANET_TOKEN"

curl -s $BASE/datacenters -H "$AUTH" # datacenter codes, e.g. ovh
curl -s "$BASE/plans?datacenter=ovh" -H "$AUTH" # plan ids and prices
curl -s "$BASE/images?type=system" -H "$AUTH" # image names, e.g. ubuntu-24.04

curl -s -X POST $BASE/servers -H "$AUTH" -H "Content-Type: application/json" \
-d '{"name":"web-1","datacenter":"ovh","plan_id":3,"image":"ubuntu-24.04"}'

The create call answers 201 with the server, the action_id of the create action and a root_password. The root password is shown only this once. Creating a server is asynchronous; poll the action until its status is success or error:

curl -s $BASE/actions/812 -H "$AUTH"
# {"data":{"id":812,"command":"create","status":"running","progress":40,...}}

5. Clean up​

Cloud servers are billed by the hour. If you were only trying things out, delete the server:

curl -s -X DELETE $BASE/servers/<id> -H "$AUTH"
# or: arianet cloud servers delete <id>

Next steps​