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.
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.
curl -H "Authorization: Bearer mmcp_…" \
"https://portal.atlashoster.com/api/portal/v1/services"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"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"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"- 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]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
Create a token
In the client area, on the API page: name it, tick its scopes, copy it. It is shown only once.
- 2
Make a first call
Pass the token in the Authorization: Bearer header and read your services.
- 3
Automate
Mark your deployments on a service's timeline, reboot a VM from your CI, plug your alerts into your on-call tool.