Files
as213905-sdk/README.md
T

2.6 KiB

AS213905 SDK

Official API clients and the OpenAPI contract for the AS213905 customer API.

The clients cover organisations, invoices, services, VM metrics and power actions, transit traffic, tunnels, and RFC 8805 geofeeds. API keys are created in Panel → Settings → API keys and are always scoped to one organisation.

Packages

Language Package Install
Go as213905 go get git.datacoria.com/Phylex/as213905-sdk/go
Rust as213905-sdk Git dependency shown in rust/README.md
Python as213905 pip install "as213905 @ git+https://git.datacoria.com/Phylex/as213905-sdk.git#subdirectory=python"
JavaScript @as213905/sdk Git checkout instructions in javascript/README.md

All clients use https://as213905.com by default and accept a different base URL for tests. Never put an API key in a query string or commit it to source.

Quick start

client := as213905.New(os.Getenv("AS213905_API_KEY"))
traffic, err := client.Traffic(ctx, &as213905.TrafficQuery{Days: 7})
let client = as213905_sdk::Client::new(std::env::var("AS213905_API_KEY")?);
let traffic = client.traffic(Some(7), None, None).await?;
client = AS213905(os.environ["AS213905_API_KEY"])
traffic = client.traffic(days=7)
const client = new AS213905({apiKey: process.env.AS213905_API_KEY});
const traffic = await client.traffic({days: 7});

Geofeed methods additionally take the organisation UUID because the geofeed service also supports administrator sessions. An API key can only use its own organisation UUID and needs geofeeds:read or geofeeds:write.

API contract

Development

Each language directory is independently buildable and tested. See its README for language-specific commands. Behaviour shared by every client:

  • bearer authentication in the Authorization header;
  • stable APIError/Error values containing HTTP status, API error code and response message;
  • request timeouts;
  • no automatic retries for mutation requests;
  • typed request and response models for the documented operations.

License

MIT. See LICENSE.