AnkraDocs
Console

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

Parameters
NameInTypeDescription
project_idquerystringThe 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

200 response fields
FieldTypeDescription
itemsrequiredarray of object
idrequiredstring (uuid)
namerequiredstring
slugrequiredstring
is_defaultrequiredboolean
projects_enabledrequiredbooleanWhether the account's organisation scopes by project.
is_org_widerequiredbooleanFalse for a member limited to projects.
all_projectsrequiredbooleanThe request reads every project the caller reaches.
selected_project_idrequiredstring | nullThe 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_credentials on 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; detail says 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

bash
curl 'https://cloud.ankra.app/v1/projects' \
  -H "Authorization: Bearer $ANKRA_CLOUD_TOKEN"