Official Arianet SDKs
Four official libraries (SDKs) call the Arianet APIs from your own code. All four are generated from the published OpenAPI documents and cover every API: Cloud, VPS and regional VPS, hosting, dedicated servers, SMS and your account (tokens, SSH keys, firewalls, balance and invoices).
| Language | Package | Source | Guide |
|---|---|---|---|
| Go | github.com/ariaservice/arianet-go | arianet-go | Go |
| Python | arianet | arianet-python | Python |
| PHP | ariaservice/arianet | arianet-php | PHP |
| JavaScript / TypeScript | arianet | arianet-js | JavaScript |
All SDKs are at version 0.1.0 and MIT licensed.
What they share
- One method per API operation, named after its
operationIdin the API reference (for examplelistServers). - Personal API token auth: create a token in the panel
and put it in
ARIANET_TOKEN; the SDK reads it. The scopes each API needs are listed in Authentication. - Automatic retries on
429that honorRetry-After. When the server asks for a longer wait than the configured cap, the error is returned at once. - Safe retries: network errors and
502/503/504are retried only for reads and for requests carrying anIdempotency-Key. Operations that accept one (such as creating a server) get a generated key, so an order is never placed twice. - Typed errors with the stable error
code, always lower-case (for exampleinsufficient_balance), and ready-madeErrorCodeconstants. Branch on the code, not on the message. - Regions: product APIs with regional installs take the
Arianet-Regionheader (withRegion("iran-1")). - Token safety: the base URL must be
httpsand the SDKs never follow redirects, so the token only ever goes to the API host.
Each SDK checks the OpenAPI documents daily and regenerates its code when they change. For
endpoints your SDK version does not have yet, the generic request / Do method uses the same
auth and retries.
Looking for a ready-made tool instead? See the CLI and the Terraform provider.