Projects
A project groups connections and everything made through them (VMs, apps,
operations). Every workspace has a default project (slug: "default",
name: "Default"), which cannot be deleted. New connections go to the
default project unless project_id is given (or the caller is a project
token, whose project is used).
Project tokens (API tokens) are limited to one project; see Project tokens.
GET /v1/projects
Section titled “GET /v1/projects”List projects, oldest first.
Auth: scope read. A project token sees only its own project.
Response 200:
{"items": [ {"id": "0c9d8e7f-1a2b-4c3d-8e5f-6a7b8c9d0e1f", "slug": "default", "name": "Default", "created_at": "2026-10-02T07:58:11Z"}, {"id": "e1d2c3b4-a5f6-4e7d-8c9b-0a1f2e3d4c5b", "slug": "staging", "name": "Staging", "created_at": "2026-11-10T12:00:00Z"}]}POST /v1/projects
Section titled “POST /v1/projects”Create a project.
Auth: scope admin; not a project token.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
slug |
string | yes | 2–40 lowercase letters, digits or dashes, not starting or ending with a dash (^[a-z0-9][a-z0-9-]{0,38}[a-z0-9]$; lowercased) |
name |
string | yes | 1–100 characters |
{"slug": "staging", "name": "Staging"}Response 201 (Project):
{"id": "e1d2c3b4-a5f6-4e7d-8c9b-0a1f2e3d4c5b", "slug": "staging", "name": "Staging", "created_at": "2026-11-10T12:00:00Z"}Errors: 400 invalid_input; 409 conflict “a project with this slug
exists”; 403 permission_denied.
Audit: project.create.
curl -s -X POST "$MAYADYN/v1/projects" -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" -d '{"slug":"staging","name":"Staging"}'DELETE /v1/projects/{id}
Section titled “DELETE /v1/projects/{id}”Delete a project.
Auth: scope admin; not a project token.
| Param | In | Description |
|---|---|---|
id |
path | project UUID (slugs are not accepted here) |
Response 204.
Errors: 404 “project not found”; 409 conflict “the default project
cannot be deleted”; 409 conflict “the project still has connections or
resources”, hint “Delete or move them first.”
Notes: API tokens limited to the project are deleted with it. The
delete is refused while any connection, resource or app still references
the project (all reported with the message above). Audit: project.delete.