Git accounts and registries API
Connect Git provider accounts and Docker registry logins, list repositories and branches, and test credentials through the OSS Panel API.
Two kinds of stored credential live under Integrations: Git accounts (GitHub, GitLab, Bitbucket) that applications deploy from, and Docker registry logins that container applications pull private images with. Both are "credentials held somewhere else" that the panel uses on your behalf, and neither ever returns the secret after you save it.
All paths are relative to https://<your-panel-host>/api. Read
Authentication first. The examples use:
PANEL=https://panel.example.com
TOKEN='1|xcMq8K3vZ2pL…'Permissions
| Key | Title in Roles | Used for |
|---|---|---|
git | Git | Git accounts, repositories and branches. |
registry | Docker Registries | Registry logins. Only available where the server runs containers. |
Reading needs view; every endpoint marked manage needs manage,
which implies view. The registry routes answer 409 ("not a Docker server")
on a server that does not host containers: the screens are hidden there too.
Endpoint index
| Method | Path | Permission | Limit per minute | Purpose |
|---|---|---|---|---|
GET | /integrations/git/providers | git | shared | The providers you can connect. |
GET | /integrations/git/accounts | git | shared | List accounts. |
GET | /integrations/git/accounts/status | git | 30 | Live status of every account. |
POST | /integrations/git/accounts | git manage | 20 | Connect an account. |
PUT | /integrations/git/accounts/{account} | git manage | 20 | Change an account. |
POST | /integrations/git/accounts/{account}/test | git manage | 20 | Check the token still works. |
DELETE | /integrations/git/accounts/{account} | git manage | shared | Disconnect. |
GET | /integrations/git/accounts/{account}/repositories | git | 60 | Repositories the account can see. |
GET | /integrations/git/accounts/{account}/branches | git | 60 | Branches of one repository. |
GET | /integrations/registries | registry | 60 | List logins. |
POST | /integrations/registries | registry manage | 20 | Add a login. |
GET | /integrations/registries/{registry} | registry | 60 | One login. |
PATCH | /integrations/registries/{registry} | registry manage | 20 | Change a login. |
DELETE | /integrations/registries/{registry} | registry manage | 20 | Remove a login. |
POST | /integrations/registries/{registry}/test | registry manage | 10 | Test the login against the registry. |
The per-minute limits sit on top of the shared budget (see Rate limits) and count that endpoint only, per user.
Git accounts
GET /integrations/git/providers
Returns {"providers": [ … ]}: the providers the panel can connect (github,
gitlab, bitbucket) and the fields each needs.
GET /integrations/git/accounts
curl "$PANEL/api/integrations/git/accounts" \
-H "Authorization: Bearer $TOKEN" -H 'Accept: application/json'{
"git_accounts": [
{
"id": 3,
"provider": "github",
"provider_title": "GitHub",
"label": "Company GitHub",
"identifier": "acme-bot",
"scopes": ["repo"],
"last_verified_at": "02-11-2026 09:14:03",
"last_verified_at_human": "3 days ago"
}
]
}The token is never returned. host is set for self-hosted GitLab and
workspace for Bitbucket.
GET /integrations/git/accounts/status returns {"statuses": { … }}, a live
check of every account, for a status badge.
POST /integrations/git/accounts
| Field | Rules |
|---|---|
provider | Required: github, gitlab or bitbucket. |
label | Required, up to 100 characters, unique among accounts. |
token | Required, up to 500 characters: the provider's access token. |
host | GitLab only. Optional, up to 255 characters: the address of a self-hosted GitLab. The panel refuses unsafe hosts. |
workspace | Bitbucket only. Required, up to 100 characters: letters, digits, ., _, -. |
Answers 201 with
{"git_account": { … }, "existing": false}. If the same account is already
connected you get 200 with "existing": true and a message, and nothing is
added.
PUT /integrations/git/accounts/{account}
Any of label (unique, up to 100), token (up to 500), host (GitLab) and
workspace (Bitbucket). Returns {"git_account": { … }}.
POST /integrations/git/accounts/{account}/test
Checks the token with the provider and returns the account with its updated
last_verified_at. Returns {"git_account": { … }}.
DELETE /integrations/git/accounts/{account}
Returns {"deleted": true}. Disconnecting is allowed while applications use
the account; those applications lose their account link and can no longer
deploy until you point them at another one with
PUT /applications/{application}/git-account.
GET /integrations/git/accounts/{account}/repositories
| Query | Rules |
|---|---|
search | Up to 100 characters. |
page | 1 to 100. |
Returns {"repositories": [ … ], "meta": {"page", "has_more"}}. Keep asking
for the next page while has_more is true.
GET /integrations/git/accounts/{account}/branches
Query repository (required): owner/name, up to 255 characters, letters,
digits, ., _, - in each part, no . or .. segment. Returns
{"branches": [ … ]}.
Docker registries
A registry login is a name, a registry address, and a username and token the panel stores for pulling private images.
Create and change also need Docker manage
Besides manage on Docker Registries, the create and change requests also
check manage on Docker. A role that holds only one of them is refused
with 403.
GET /integrations/registries and GET /integrations/registries/{registry}
Return {"registries": [ … ]} and {"registry": { … }}. A registry has id,
name, registry (the address), auth_key, is_docker_hub, username,
has_credentials, applications_count, last_tested_at, last_test_success,
last_test_error, status, status_title and timestamps. The token is never
returned.
POST /integrations/registries
| Field | Rules |
|---|---|
name | Required, up to 100 characters, one line, unique. |
registry | Required, up to 255 characters, one line: a registry host the panel accepts (for Docker Hub, its usual address). |
username | Required, up to 255 characters, one line. |
token | Required, up to 4096 characters, one line. |
Answers 201 with {"registry": { … }}.
PATCH /integrations/registries/{registry}
Any of the same fields. token may be null or left out to keep the stored
one. Returns {"registry": { … }}.
DELETE /integrations/registries/{registry}
Returns {"message": "…"}.
POST /integrations/registries/{registry}/test
Logs in to the registry with the stored credential and records the result.
Returns {"registry": { … }, "success": true|false}. 500 with a reference
when the stored credential cannot be written for the test.
Common errors
| Status | Message or cause |
|---|---|
403 | Your role does not include management for Git. (or Docker Registries). |
404 | Unknown account or registry. |
409 | A registry route on a server that does not host containers. |
422 | Validation ({"message", "errors": {"field": ["…"]}}), including a token the provider rejects. |
429 | Over a limit; wait for Retry-After. |
500 | {"message", "reference"}: find the reference in the error log. |
Related
- Applications API:
deployment-settings,git-accountandwebhook - Git integration
- Docker registries