Public and account endpoints
The open endpoints (health, basic info, branding), your own account (profile, password, sign out, permissions, activity log), time zones, and the deploy webhook, through the OSS Panel API.
The endpoints that sit outside the server and administration areas: the few that need no credential, the ones about the account you are signed in as, and the deploy webhook that Git providers call.
All paths are relative to https://<your-panel-host>/api. Sign-in, GET /auth/me,
the first-account registration and the cookie-session flow are explained in
Authentication; this page does not repeat
them. The examples use:
PANEL=https://panel.example.com
TOKEN='1|xcMq8K3vZ2pL…'Endpoint index
| Method | Path | Credential | Limit per minute | Purpose |
|---|---|---|---|---|
GET | /health | none | 60 | Is the panel answering, and which version. |
GET | /basic-info | none | guest budget | What a client needs before signing in. |
GET | /branding | none | guest budget | Name, logos and colour. |
POST | /auth/login | none | login limits | Exchange a username and password for a token. |
POST | /auth/register | none | login limits | Create the first administrator. |
POST | /auth/logout | yes | shared | End the session or revoke the token. |
GET | /auth/me | yes | shared | The signed-in user. |
PUT | /auth/profile | yes | shared | Change your name and username. |
PUT | /auth/password | yes | shared | Change your password. |
POST | /auth/stop-impersonating | yes (session) | shared | Return to your own account. |
GET | /permissions | yes | shared | What you may do. |
GET | /permissions/check | yes | shared | Your grants for one level. |
GET | /timezones | yes | shared | Time zones, grouped by region. |
GET | /activity-log | yes | shared | Your own activity. |
GET | /activity-log/filters | yes | shared | Values for those filters. |
POST | /webhooks/deploy/{identifier} | signature | 60 per webhook | Deploy on push. |
"Guest budget" is the limit for requests without a credential (see
Rate limits). GET /health
answers {"health": {"status": "ok", "version": "…"}} and nothing else.
Branding
GET /branding
{
"branding": {
"name": "ServerAvatar",
"logo": "/brand/serveravatar-horizontal-light.svg",
"logo_dark": "/brand/serveravatar-horizontal-dark.svg",
"icon": "/brand/serveravatar-mark-light.svg",
"icon_dark": "/brand/serveravatar-mark-dark.svg",
"favicon": "/brand/serveravatar-favicon.svg",
"primary_color": "#35B87A",
"tag_line": null,
"links": null,
"display_message": null,
"source": "panel"
}
}source is panel for the panel's own settings, or central when the panel is
connected to Central and Central supplies the name, logo, icon, favicon and
colour. tag_line, links and display_message are set only by Central. See
Branding.
Your account
POST /auth/logout
Answers 204. A bearer token is deleted; a cookie session is ended. After this
call that token no longer works.
PUT /auth/profile
| Field | Rules |
|---|---|
name | Required, up to 255 characters. |
username | Required, up to 255 characters: ASCII letters, digits, - and _. Unique. |
Returns {"user": { … }}.
PUT /auth/password
curl -X PUT "$PANEL/api/auth/password" \
-H "Authorization: Bearer $TOKEN" -H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"current_password": "old-password", "password": "New-Password-9", "password_confirmation": "New-Password-9"}'| Field | Rules |
|---|---|
current_password | Required: must be your current password. |
password | Required, different from the current one. At least 10 characters, with upper and lower case letters and a number. |
password_confirmation | Required: must match password. |
Returns {"token": "…"}. Changing the password revokes every token you had,
including the one you used to make this call, so the answer carries a new token:
keep it and drop the old one. GET /basic-info reports the current
password_policy.
POST /auth/stop-impersonating
Ends an impersonation and signs
you back in as the administrator who started it. Answers 204. It uses the
cookie session, so it is for the panel's own screens. Outside an impersonation
you get 422 (You are not currently impersonating a user.).
GET /permissions
Returns {"permissions": [ … ]}: the permissions your roles grant, in menu order.
| Query | Rules |
|---|---|
level | Optional: server, application or another level from the catalogue. |
application_id | Optional, an existing application id. For application level, only the permissions that application's type supports. |
Each entry:
{
"level": "server",
"sub_level": "…",
"sub_level_title": "…",
"name": "firewall",
"title": "Firewall",
"icon": "shield",
"url": "/firewall",
"permissions": {"view": true, "manage": false}
}Permissions you hold neither view nor manage on are left out. Server
permissions for features the server does not offer (PHP, Node.js, databases,
Docker, registries on a server that lacks them) are left out too. A role that
holds only manage on app_environment or app_magic_login reads as view
as well, because those two have no separate view.
GET /permissions/check
The same as GET /permissions, but level is required (up to 255 characters)
and there is no application_id.
GET /timezones
Returns {"timezones": [ … ]}: groups by region, each with zones. A zone has
value (the identifier, for example Europe/Berlin), label, offset
(+01:00) and offset_minutes. Add ?for=php to list only the zones PHP also
knows. The value is what you send as timezone in
PUT /settings/general.
GET /activity-log and GET /activity-log/filters
Your own actions only. GET /activity-log:
| Query | Rules |
|---|---|
search | Up to 255 characters. |
filter[scope] | A scope from the filters endpoint. |
filter[type], filter[action] | Up to 255 characters each. |
filter[kind] | created, changed, removed or failed. |
filter[security] | Boolean. |
per_page | 10, 20, 50 or 100. Default 10. |
page | Page number. |
Returns {"activity_log": [ … ], "meta": {"current_page", "per_page", "total", "last_page"}},
newest first, with entries in the shape described under
Server operations.
GET /activity-log/filters returns types, actions, scopes and kinds
limited to what your own log contains. Server-wide and panel-wide logs are
GET /server/activity-log and GET /admin/activity-log.
Deploy webhook
POST /webhooks/deploy/{identifier}
Git providers call this URL when someone pushes. {identifier} is the
application's webhook identifier, set when you turn on deploy on push (see
PUT /applications/{application}/webhook). It
needs no token. The credential is a signature over the raw request body, made
with the application's webhook secret:
| Provider | What the panel checks |
|---|---|
| GitHub | X-Hub-Signature-256: sha256=<hex>, an HMAC-SHA256 of the body. Event X-GitHub-Event: push. |
| GitLab | X-Gitlab-Token equal to the secret, or a signed webhook-id, webhook-timestamp and webhook-signature set. Event X-Gitlab-Event: Push Hook. |
| Bitbucket | X-Hub-Signature: sha256=<hex>, an HMAC-SHA256 of the body. Event X-Event-Key: repo:push. |
The answer is JSON {"deployed": true|false, "reason": "…"}:
| Status | reason | Means |
|---|---|---|
202 | queued | A deployment was queued (deployed is true). |
202 | not_a_push | The event was not a push (a ping, for example). |
202 | other_branch | The push was to a branch other than the application's. |
202 | duplicate_delivery | The same delivery arrived again within an hour. |
202 | not_a_git_application | The application is not a Git application. |
202 | git_account_missing | The application has no connected Git account to deploy with. |
401 | invalid_signature | The signature is missing or wrong. Nothing runs. |
404 | Unknown identifier. Also for a disabled webhook whose signature is wrong. | |
410 | webhook_disabled | Deploy on push is turned off for this application. |
Each webhook is limited to 60 deliveries a minute, counted on the identifier and not on the sender's address, because providers deliver from shared addresses.
Common errors
| Status | Message or cause |
|---|---|
401 | No credential, or it is wrong, revoked or expired. |
403 | Your role does not include …. |
404 | Unknown webhook identifier. |
422 | Validation ({"message", "errors": {"field": ["…"]}}); a wrong current password. |
429 | Over a limit; wait for Retry-After. |
500 | {"message", "reference"}: find the reference in the error log. |
Related
- Authentication
- Git deployment
- Account: the same account features in the panel
- Roles