Browse the documentation

Permissions (scopes)

A key does only what you ticked. Permissions are named resource:access and grouped as in the dashboard: what every service can do under services.*, what only one type of service has under games.*, vps.* or web.*. A call outside its permissions answers 403 API_SCOPE_MISSING:<scope>, and the suffix names the permission to add.

The catalogue

Account

PermissionRoutes it opens
account:readGET /me
account.notifications:readGET /account/notifications
account.access:readGET /account/access
account.ssh_keys:readGET /ssh-keys, GET /ssh-keys/{id}
account.ssh_keys:writePOST /ssh-keys, DELETE /ssh-keys/{id}

Common to all services

PermissionRoutes it opens
services:readGET /services, GET /services/{code}, GET /services/{code}/games/features, GET /services/{code}/web, .../web/runtimes, .../web/apps-catalog, .../web/events; actions features, web_overview
services:writePATCH /services/{code}; POST /services/{code}/renew together with billing.invoices:pay
services.metrics:readGET /services/{code}/status, GET /services/{code}/metrics/history
services.addons:readGET /services/{code}/addons
services.power:writePOST /services/{code}/power, POST /services/{code}/web/sites/{siteId}/power (with web.sites:write); actions power, start_vps, stop_vps, force_stop_vps, reboot_vps
services.console:writePOST /services/{code}/console/command; on web hosting, on top of web.sites:write or web.cron:write, a site's commands and its scheduled tasks; action send_console_command

Game servers

PermissionRoutes it opens
games.files:readreading files and worlds under /services/{code}/games/files and /games/world
games.files:writewriting, moving, archiving, deleting files; exporting, resetting, switching, renaming, deleting, importing worlds
games.sftp:readGET /services/{code}/games/sftp
games.databases:readGET /services/{code}/games/databases (no passwords)
games.databases:writecreating and deleting a database, resetting its password
games.schedules:readGET /services/{code}/games/schedules
games.schedules:writecreating, changing, arming, running, deleting a scheduled task; a command step also needs services.console:write, a restart or stop step services.power:write
games.startup:readGET /services/{code}/games/startup
games.startup:writechanging a startup variable, the runtime image
games.versions:readthe server software catalogue, the installed version, following an install
games.versions:writePOST /services/{code}/games/versions/installs
games.content:readsearching mods, plugins and modpacks, listing what is installed, following an install
games.content:writeinstalling, cancelling, enabling, disabling, removing a mod, a plugin or a modpack
games.settings:readGET /services/{code}/games/settings
games.settings:writePATCH /services/{code}/games/settings; online-mode also needs services.console:write
games.reinstall:writePOST /services/{code}/reinstall on a game server

VPS

PermissionRoutes it opens
vps.backups:readGET /services/{code}/backups; action backup_list
vps.backups:writePOST /services/{code}/backups, DELETE /services/{code}/backups/{backupId}, POST /services/{code}/backups/restore; actions backup_create, backup_delete, backup_restore
vps.firewall:readaction firewall_list
vps.firewall:writeactions firewall_create, firewall_update, firewall_move, firewall_delete
vps.rdns:writeaction rdns, including op: "get"
vps.reinstall:writePOST /services/{code}/reinstall on a VPS

Web hosting

PermissionRoutes it opens
web.sites:readthe reads of sites, staging copies, domains and ownership proofs, HTTPS, PHP and access settings, applications, logs, traffic, diagnosis, operations and security report under /services/{code}/web
web.sites:writecreating, copying, changing and deleting a site, its domains, its HTTPS, its settings, its staging copies, its applications. An install, build or start command also needs services.console:write; POST /services/{code}/web/sites/{siteId}/power also needs services.power:write
web.env:readGET /services/{code}/web/sites/{siteId}/env (secret values masked)
web.env:writePUT /services/{code}/web/sites/{siteId}/env, DELETE /services/{code}/web/sites/{siteId}/env/{name}
web.deploy:readGET /services/{code}/web/sites/{siteId}/git, GET .../deployments, GET .../deployments/{deploymentId}, GET .../deployments/{deploymentId}/log
web.deploy:writePUT and DELETE /services/{code}/web/sites/{siteId}/git, POST .../git/secret, POST .../deployments, POST .../deployments/{deploymentId}/redeploy
web.files:readGET /services/{code}/web/sites/{siteId}/files, .../files/content, .../files/jobs/{jobId}, .../files/usage
web.files:writewriting, creating a directory, moving, changing modes, deleting, extracting, compressing, copying under /services/{code}/web/sites/{siteId}/files
web.databases:readGET /services/{code}/web/databases, GET /services/{code}/web/databases/{databaseId}
web.databases:writecreating, attaching, deleting a database, resetting its password, opening it to the Internet
web.sftp:readGET /services/{code}/web/sftp-accounts
web.sftp:writecreating, changing, deleting an SFTP account, resetting its password
web.cron:readGET /services/{code}/web/sites/{siteId}/cron, GET .../cron/{cronId}/runs
web.cron:writeDELETE .../cron/{cronId}; creating, changing or running a task with services.console:write
web.backups:readGET /services/{code}/web/sites/{siteId}/backups and .../restores/{restoreId}
web.backups:writecreating, deleting, restoring a site backup under /services/{code}/web/sites/{siteId}/backups; action web_backups

Billing

PermissionRoutes it opens
billing.invoices:readGET /invoices, GET /invoices/{code}, GET /invoices/{code}/pdf
billing.credit_notes:readGET /credit-notes, GET /credit-notes/{code}/pdf
billing.balance:readGET /balance, GET /balance/transactions
billing.payment_methods:readGET /payment-methods
billing.invoices:payPOST /invoices/{code}/pay, POST /orders/{orderNumber}/pay, POST /services/{code}/renew; POST /orders when it pays
billing.saved_methods:chargethe four routes above when the funding is saved_method, and POST /services/{code}/renew with account_default when the account's rule charges a stored method. Never used alone

Orders and catalogue

PermissionRoutes it opens
catalog:readGET /catalog/products, GET /catalog/products/{shortname}
orders:readGET /orders, GET /orders/{orderNumber}
orders:writePOST /orders

Support tickets

PermissionRoutes it opens
tickets:readGET /tickets, GET /tickets/{ticketNumber}
tickets:writePOST /tickets, POST /tickets/{ticketNumber}/messages, POST /tickets/{ticketNumber}/close

Two routes fall outside the table: GET /me/key needs no permission, and GET /v1/openapi.json needs no key.

POST /services/{code}/reinstall asks for the permission of the service's type: vps.reinstall:write on a VPS, games.reinstall:write on a game server. A key holding neither is refused before anything is read with 403 API_SCOPE_MISSING:vps.reinstall:write|games.reinstall:write.

POST /services/{code}/actions/{action} has no fixed permission. It depends on the action sent: see the "actions" entries above and the full table in Managing services.

How a :write implies a :read

A :write implies the :read of the exact same name, and nothing else.

You holdYou also get
services:writeservices:read
vps.backups:writevps.backups:read
vps.firewall:writevps.firewall:read
account.ssh_keys:writeaccount.ssh_keys:read
orders:writeorders:read
tickets:writetickets:read
web.sites:write, web.env:write, web.deploy:write, web.files:write, web.databases:write, web.sftp:write, web.cron:write, web.backups:writethe :read of the same name
games.files:write, games.databases:write, games.schedules:write, games.startup:write, games.versions:write, games.content:write, games.settings:writethe :read of the same name

What does not carry over, despite the shared prefix:

  • services:write gives neither services.metrics:read nor services.addons:read.
  • vps.backups:write does not give web.backups:read, nor the other way round: each type of service has its own permissions.
  • billing.invoices:pay does not give billing.invoices:read: paying an invoice and reading it are two permissions.
  • vps.rdns:write, vps.reinstall:write and games.reinstall:write have no matching :read.

Former names

The permissions specific to one type of service were renamed. A key created with a former name keeps it and loses no right: each former name stands for every permission it covered.

Former nameStands for
services.backups:readvps.backups:read, web.backups:read
services.backups:writevps.backups:write, web.backups:write
services.firewall:readvps.firewall:read
services.firewall:writevps.firewall:write
services.rdns:writevps.rdns:write
services.reinstall:writevps.reinstall:write, games.reinstall:write
  • GET /me/key returns the permissions under their current names in scopes, and the former names the key still holds in legacyScopes.
  • A refusal always names the current permission, for example 403 API_SCOPE_MISSING:vps.firewall:write.
  • Editing the key from the dashboard saves it under the current names, without an identity confirmation, since its rights do not change. legacyScopes is then empty.
  • A former name sent when creating a key is accepted and saved under the current names.

What a permission alone does not buy

Effective rights are the intersection of the permission, the key's service restriction, and the state of the service.

CaseAnswer
Service outside the key's restriction404 SERVICE_NOT_FOUND
Site, database or SFTP account of a web hosting service outside the key's site restriction404 (NOT_FOUND or a marker ending in _NOT_FOUND, as for an unknown id)
Action on the whole web hosting service with a key restricted to some sites403 SITE_SCOPE_RESTRICTED
Suspended or cancelled service, on /power, /console/command, /actions/{action}409 SERVICE_NOT_ACTIVE
Suspended or cancelled service, on POST /backups, DELETE /backups/{backupId}, /backups/restore, /reinstall400 SERVICE_NOT_ACTIVE. GET /backups still answers
Service in dunning, on POST /backups, /backups/restore, /reinstall400 SERVICE_IN_DUNNING
Service with no provisioned instance409 INSTANCE_NOT_PROVISIONED on /status, /metrics/history, /power, /console/command, /actions/{action}, /web/..., /games/...; 400 INSTANCE_NOT_PROVISIONED on /backups, /backups/restore, /reinstall
Action the platform does not classify, or one with no public permission403 API_ACTION_NOT_ALLOWED:<action>

Restricting a key to some sites

On a web hosting service, a key can reach some sites only. It is set when the key is created or edited, service by service; GET /me/key returns it in siteRestrictions.

A key restricted to some sites
readsthe offer (quotas, usage), these sites and their staging copies, the databases tied to these sites, the SFTP accounts limited to these sites, their backups
does not seethe other sites, the databases tied to no site or to another site, the SFTP accounts over the whole hosting: 404
refusescreating, copying or deleting a site, backing up the whole hosting, creating a database or an SFTP account without tying it to one of its sites: 403 SITE_SCOPE_RESTRICTED

The lists (sites, databases, SFTP accounts, backups, activity feed) return what the key reaches only. Adding a site to the restriction or lifting it widens the key and asks for an identity confirmation.

On an account shared with you

A key created on an account shared with you (see Authentication and API keys) only holds services.*, games.*, vps.*, web.*, and tickets:* when the access opens the tickets to you. Any other permission is refused at creation: 400 API_SCOPE_NOT_DELEGABLE:<scope>.

Every call is judged twice: by the key's permission, then by what the access grants you on the service (403 ACCOUNT_ACCESS_DENIED). The site restrictions of the key and of the access add up.

Key permissionWhat the access must grant you on the service
web.sites:*, web.env:*, web.deploy:readSites
web.deploy:writeSites and console
web.files:*Files
web.databases:*Databases
web.sftp:*SFTP
web.cron:read; web.cron:writeScheduled tasks; and console to create, change or run one
games.files:*Files
games.sftp:readSFTP
games.databases:*Databases
games.schedules:read; games.schedules:writeScheduled tasks; and console or power depending on the steps
games.startup:*Startup
games.versions:*Versions
games.content:*Content
games.settings:*Game settings; and console for online-mode
vps.backups:*, web.backups:*Backups
services.power:write, services.console:write, vps.reinstall:write, games.reinstall:write, vps.firewall:*, vps.rdns:writePower, console, reinstall, firewall, reverse DNS
services:read, services.metrics:read, services.addons:readsharing the service is enough

Choosing permissions

  • Start from what the integration does today. Widening a key asks for an identity confirmation, not a new key.
  • Monitoring or an accounting export needs :read permissions only.
  • billing.saved_methods:charge goes only on the key that has to charge, with a cap sized to the job. It is the only permission that forces a cap.
  • vps.reinstall:write and games.reinstall:write destroy the service's data. Keep them on the key that reinstalls.