Projects
Covers the 4 API operations in the projects category.
| Method | Path | Description |
|---|---|---|
| GET | /v1/orgs/{orgSlug}/projects | — |
| POST | /v1/orgs/{orgSlug}/projects | Create a project |
| GET | /v1/orgs/{orgSlug}/projects/{projectName} | — |
| GET | /v1/orgs/{orgSlug}/projects/{projectName}/overview | Project overview (dashboard home screen) |
GET /v1/orgs/{orgSlug}/projects
operationId listProjects
| Status | Description | Response body |
|---|---|---|
| 200 | Projects in an organization | object |
| 403 | — | — |
| 404 | — | — |
POST /v1/orgs/{orgSlug}/projects
Creating a project issues a hostname along with it. The assignment is not created yet — it appears at the first deploy. Assigning a node to a project that has no code would start a process with nothing to serve.
The project-count limit is enforced here (docs/limits.md §2). The org row is locked before counting, so concurrent creates cannot exceed the limit.
operationId createProject
Request body: application/json · object
| Status | Description | Response body |
|---|---|---|
| 201 | The created project | Project |
| 403 | — | — |
| 409 | The name already exists (project_name_taken·hostname_taken), or the plan's project-count limit was exceeded (project_limit). The details of project_limit is {limit, count, plan} — pulling the numbers out of the message with a regex loses them silently the day the wording is polished. It is a 409 because retrying does not change the answer (403 means permission, 429 means waiting will help). | Error |
GET /v1/orgs/{orgSlug}/projects/{projectName}
operationId getProject
| Status | Description | Response body |
|---|---|---|
| 200 | Projects | ProjectDetail |
| 403 | — | — |
| 404 | — | — |
GET /v1/orgs/{orgSlug}/projects/{projectName}/overview
What the home screen receives in one call when you open a project — the deploy serving right now and who pushed it, the last few deploys, the database's most recent backup, whether the resources turned on by declaration have been granted, and this project's recent notifications. It answers "how are things right now", not history — each tab gives you all of it.
Usage is not here. It is a value cp-core computes over a window, so getUsage is called alongside it — bundling it into one response would make the whole home screen as late as cp-core is on a slow day. Requires viewer or above.
operationId getProjectOverview
| Status | Description | Response body |
|---|---|---|
| 200 | Overview | ProjectOverview |
| 403 | — | — |
| 404 | — | — |