Skip to main content

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).

LanguagePackageSourceGuide
Gogithub.com/ariaservice/arianet-goarianet-goGo
Pythonarianetarianet-pythonPython
PHPariaservice/arianetarianet-phpPHP
JavaScript / TypeScriptarianetarianet-jsJavaScript

All SDKs are at version 0.1.0 and MIT licensed.

What they share​

  • One method per API operation, named after its operationId in the API reference (for example listServers).
  • 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 429 that honor Retry-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/504 are retried only for reads and for requests carrying an Idempotency-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 example insufficient_balance), and ready-made ErrorCode constants. Branch on the code, not on the message.
  • Regions: product APIs with regional installs take the Arianet-Region header (withRegion("iran-1")).
  • Token safety: the base URL must be https and 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.