Teams and projects API
Teams own projects, and projects own apps. See Teams, projects and apps for the model and roles.
| Method | Path | Permission | Body | Returns |
|---|---|---|---|---|
GET |
/teams/ |
Authenticated | {results}: teams you belong to, each with myRole (owner for superusers) |
|
POST |
/teams/ |
Authenticated | {name, slug?} (name ≤ 80, slug ≤ 60) |
The team. You become its owner. |
GET |
/teams/{id} |
Member | The team | |
DELETE |
/teams/{id} |
Owner (or superuser) | {detail: "Team removal requested."} |
|
GET |
/teams/{id}/members |
Member | {results}: memberships with user_id, role, invited_at, accepted_at |
|
POST |
/teams/{id}/invitations |
Admin | {email, role?}. role is owner, admin, developer (default) or viewer. |
The membership |
GET |
/teams/{id}/quota |
Member | {maxApps, maxMemoryMb, maxCpuPercent, usage: {apps, memoryMb, cpuPercent}} |
|
PUT |
/teams/{id}/quota |
Superuser | {maxApps?, maxMemoryMb?, maxCpuPercent?} |
The quota. A missing or null field means no limit. |
When to use:
DELETE /teams/{id}marks every app in the team asdeletingand queues a teardown that removes each app’s host resources (units, vhosts, users, files) before the rows are dropped. It can’t be undone.- Invitations add an existing account immediately. An unknown email
returns
404, and an existing member returns409. - Quotas protect the host from a team, so only superusers can set them.
Projects
Section titled “Projects”| Method | Path | Permission | Body / query | Returns |
|---|---|---|---|---|
GET |
/projects/ |
Authenticated | Query teamId? |
{results}: projects across your teams, or one team’s |
POST |
/projects/ |
Developer on teamId |
{teamId, name, description?} (name ≤ 80) |
The project |
GET |
/projects/{id} |
Member | The project | |
PATCH |
/projects/{id} |
Developer | {name?, description?} |
The project |
DELETE |
/projects/{id} |
Admin | {detail}. Every app in the project is torn down too. |
When to use: a project is a grouping inside a team. To move an app
between projects, PATCH /apps/{id} with a new projectId. Within a team
that needs Developer. Across teams it needs Admin on both.
Example
curl -sX POST https://panel.example.com/projects/ \ -H 'Authorization: Bearer gsl_xxxxxxxxxxxxxxxx' -H 'Content-Type: application/json' \ -d '{"teamId": 7, "name": "Billing", "description": "Billing API and workers"}'