API reference · Account and billing
Projects
1 operation of the Ankra Cloud API: The projects of the account's Ankra platform organisation that the caller reaches (ADR 0022). Servers, DNS zones and tunnels belong to a project; the platform owns the projects themselves.
List the projects you reach in this account#
GET
/v1/projects- Operation
list_projects- Credentials
- API token, Portal session
- Requires
- Permission
read
The default project first. Answers projects_enabled: false and no items while the account's organisation has projects off, or the account has no organisation; everything then works as it always did, and no project filter applies. Lists what the request's project selection resolved to in selected_project_id and all_projects.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_id | query | string | The project to read: a project's UUID, or all for every project the caller reaches. The X-Ankra-Project-Id header says the same; this parameter wins. Without either, an organisation-wide caller reads the default project and a member limited to projects reads their projects. 422 when it is neither, 403 for a project outside a member's reach, 404 for one the organisation does not list. Ignored while the account's organisation has projects off. |
Responses
200The projects the caller reaches.application/json
| Field | Type | Description |
|---|---|---|
itemsrequired | array of object | |
idrequired | string (uuid) | |
namerequired | string | |
slugrequired | string | |
is_defaultrequired | boolean | |
projects_enabledrequired | boolean | Whether the account's organisation scopes by project. |
is_org_widerequired | boolean | False for a member limited to projects. |
all_projectsrequired | boolean | The request reads every project the caller reaches. |
selected_project_idrequired | string | null | The one project the request reads. |
- 401Not signed in, or the credential is invalid or expired.
- 403The role lacks the permission, the token is read-only (a read-only token also gets
reason: read_only_token_cannot_read_credentialson every credential read), the CSRF header is missing, a support session may not do this, or the route needs a verified email address and the caller's is not (reason: email_unverified). - 404No such resource in the caller's account.
- 422The request is invalid;
detailsays why. - 429Rate limited. On a customer operation the credential (the API token, or the signed-in user for a session) is over its requests per minute and the
X-RateLimit-*headers say when the window ends; on a sign-in route the client network is over its attempts or the email is locked out. - defaultAny other error, usually 500.
Example
curl 'https://cloud.ankra.app/v1/projects' \
-H "Authorization: Bearer $ANKRA_CLOUD_TOKEN"