Skip to content
Atlas Hoster
Developers

Run your hosting from code

Whatever you do in the client area, your scripts can do: read your services' state, reboot a VM, follow your invoices, receive your alerts.

Your scripts, on your services
Your scriptsScoped tokenREST APIYour servicesMetricsSigned webhooks

A REST API in JSON

Your services, their state, your invoices, your VMs, your backups, your DNS: plain HTTP calls, JSON answers.

Scoped tokens

Each token only gets the scopes you tick (read, billing, VMs, DNS, firewall…) and never exceeds its creator's rights. One click revokes it.

An OpenAPI description

The full list of calls is in the client area, with each one's curl command and the OpenAPI file to import into Postman or a client generator.

Signed webhooks

Your alerts reach your address as JSON, with an X-Signature header (HMAC-SHA256 of the body) so you can check they really come from us.

Prometheus metrics

A Prometheus-format endpoint, with a token of its own, to follow your services in your Grafana.

Clear limits

120 requests a minute per token; beyond that the API answers 429. Your company's allowed addresses apply to tokens too.

A few examples

The API's exact address is shown in your client area, on the API page. Some calls depend on what is open for your account.

List your services and their state
curl -H "Authorization: Bearer mmcp_…" \
  "https://portal.atlashoster.com/api/portal/v1/services"
Reboot a VM
curl -X POST -H "Authorization: Bearer mmcp_…" \
  -H "Content-Type: application/json" -d '{"action":"reboot"}' \
  "https://portal.atlashoster.com/api/portal/v1/services/vm:101/power"
Reinstall a VPS with a startup script
curl -X POST -H "Authorization: Bearer mmcp_…" \
  -H "Content-Type: application/json" \
  -d '{"template":9000,"confirm":"vps-101","startupScriptId":"…"}' \
  "https://portal.atlashoster.com/api/portal/v1/services/vm:101/vps/reinstall"
Put a server on a private network
curl -X POST -H "Authorization: Bearer mmcp_…" \
  -H "Content-Type: application/json" -d '{"ref":"vm:101"}' \
  "https://portal.atlashoster.com/api/portal/v1/private-networks/<id>/members"
From an Ansible playbook
- name: Reboot a VM through the client API
  ansible.builtin.uri:
    url: "https://portal.atlashoster.com/api/portal/v1/services/vm:101/power"
    method: POST
    headers:
      Authorization: "Bearer {{ atlashoster_token }}"
    body_format: json
    body: { action: reboot }
    status_code: [200, 201, 202]
Check a webhook's signature (Python)
import hmac, hashlib
expected = "sha256=" + hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
assert hmac.compare_digest(expected, request.headers["X-Signature"])

Get started

  1. 1

    Create a token

    In the client area, on the API page: name it, tick its scopes, copy it. It is shown only once.

  2. 2

    Make a first call

    Pass the token in the Authorization: Bearer header and read your services.

  3. 3

    Automate

    Mark your deployments on a service's timeline, reboot a VM from your CI, plug your alerts into your on-call tool.

Frequently asked questions

Who can create a token?
Can a token sign in to the client area?
What if I call another company's resource?
Where is the full documentation?

Ready to automate?

Create your first token from the client area.