Workspaces
Every /v1 route for workspaces. This page is generated from the API's OpenAPI contract, so it always matches what the API accepts and returns.
Authentication, pagination, errors and idempotency work the same on every route. They are described once, in the API overview.
List the workspaces you belong to
GET /v1/workspaces
Key scopes: READ and PLATFORM_API.
Query parameters
| Name | Type | Required | Notes |
|---|---|---|---|
limit | integer | no | Rows per page. Ignored when a cursor is given. |
cursor | string | no | The nextCursor of the previous page, unchanged. |
Returns
200with a page:{ data: V1Workspace[], nextCursor }, where each item isV1Workspace.
curl "https://api.naijacloud.com/v1/workspaces" \
-H "Authorization: Bearer $NC_API_KEY"Get a workspace
GET /v1/workspaces/{workspaceId}
Key scopes: READ and PLATFORM_API.
Path parameters
| Name | Type | Required | Notes |
|---|---|---|---|
workspaceId | string | yes | The workspace's id. |
Returns
200withV1Workspace.
curl "https://api.naijacloud.com/v1/workspaces/$WORKSPACE_ID" \
-H "Authorization: Bearer $NC_API_KEY"A workspace's API keys (hints only, never the key)
GET /v1/workspaces/{workspaceId}/api-keys
Key scopes: READ and PLATFORM_API.
Path parameters
| Name | Type | Required | Notes |
|---|---|---|---|
workspaceId | string | yes | The workspace's id. |
Query parameters
| Name | Type | Required | Notes |
|---|---|---|---|
limit | integer | no | Rows per page. Ignored when a cursor is given. |
cursor | string | no | The nextCursor of the previous page, unchanged. |
Returns
200with a page:{ data: V1ApiToken[], nextCursor }, where each item isV1ApiToken.
curl "https://api.naijacloud.com/v1/workspaces/$WORKSPACE_ID/api-keys" \
-H "Authorization: Bearer $NC_API_KEY"Pending invites (without their join links)
GET /v1/workspaces/{workspaceId}/invites
Key scopes: READ and PLATFORM_API.
Path parameters
| Name | Type | Required | Notes |
|---|---|---|---|
workspaceId | string | yes | The workspace's id. |
Query parameters
| Name | Type | Required | Notes |
|---|---|---|---|
limit | integer | no | Rows per page. Ignored when a cursor is given. |
cursor | string | no | The nextCursor of the previous page, unchanged. |
Returns
200with a page:{ data: V1Invite[], nextCursor }, where each item isV1Invite.
curl "https://api.naijacloud.com/v1/workspaces/$WORKSPACE_ID/invites" \
-H "Authorization: Bearer $NC_API_KEY"A workspace's members
GET /v1/workspaces/{workspaceId}/members
Key scopes: READ and PLATFORM_API.
Path parameters
| Name | Type | Required | Notes |
|---|---|---|---|
workspaceId | string | yes | The workspace's id. |
Query parameters
| Name | Type | Required | Notes |
|---|---|---|---|
limit | integer | no | Rows per page. Ignored when a cursor is given. |
cursor | string | no | The nextCursor of the previous page, unchanged. |
Returns
200with a page:{ data: V1Member[], nextCursor }, where each item isV1Member.
curl "https://api.naijacloud.com/v1/workspaces/$WORKSPACE_ID/members" \
-H "Authorization: Bearer $NC_API_KEY"A workspace's named roles
GET /v1/workspaces/{workspaceId}/roles
Key scopes: READ and PLATFORM_API.
Path parameters
| Name | Type | Required | Notes |
|---|---|---|---|
workspaceId | string | yes | The workspace's id. |
Returns
200with a page:{ data: V1TeamRoleRow[], nextCursor }, where each item isV1TeamRoleRow.
curl "https://api.naijacloud.com/v1/workspaces/$WORKSPACE_ID/roles" \
-H "Authorization: Bearer $NC_API_KEY"Types
V1ApiToken
| Field | Type | Notes |
|---|---|---|
createdAt | string (date-time) | |
expiresAt | string (date-time), or null | |
id | string | |
lastUsedAt | string (date-time), or null | |
name | string | |
revokedAt | string (date-time), or null | |
scopes | array of DATABASES, DEPLOYS, EMAIL_SEND, PLATFORM_API, READ, WRITE | |
teamId | string, or null | |
tokenHint | string | The head of the key including its prefix, to identify it in a list. |
tokenTail | string, or null | Last characters of the key, to identify it against a value stored in a .env file or a CI secret. Null for keys issued before this was recorded. |
updatedAt | string (date-time) |
V1Invite
| Field | Type | Notes |
|---|---|---|
acceptedAt | string (date-time), or null | |
createdAt | string (date-time) | |
email | string | |
expired | boolean | True once the link has lapsed; it can still be resent. |
expiresAt | string (date-time) | |
id | string | |
invitedByName | string, or null | Who sent (or last resent) the invite, by name or email. Null once that person has left the workspace. |
projectIds | array of string, or null | |
role | ADMIN, MEMBER, OWNER | |
roleName | string, or null | The named workspace role the invite grants, or null when it grants only its rank. |
teamId | string | |
teamRoleId | string, or null | |
updatedAt | string (date-time) |
V1Member
| Field | Type | Notes |
|---|---|---|
id | string (uuid) | |
user | V1MemberUser | |
role | OWNER, ADMIN, MEMBER | |
teamRoleId | string, or null | The named workspace role, when one is set. |
projectIds | array of string, or null | The projects a project-scoped member may reach. |
createdAt | string (date-time) |
V1MemberUser
| Field | Type | Notes |
|---|---|---|
id | string (uuid) | |
email | string (email) | |
firstName | string, or null | |
lastName | string, or null |
V1TeamRole
| Field | Type | Notes |
|---|---|---|
allProjects | boolean | |
builtin | boolean | |
createdAt | string (date-time) | |
description | string | |
editable | boolean | |
id | string | |
name | string | |
permissions | array of BILLING, DATABASES, DEPLOYS, EMAIL, STORAGE, TEAM | |
projectIds | array of string | |
readOnly | boolean | |
teamId | string | |
updatedAt | string (date-time) |
V1TeamRoleRow
| Field | Type | Notes |
|---|---|---|
memberCount | integer | |
role | V1TeamRole | |
scopedProjectIds | array of string |
V1Workspace
| Field | Type | Notes |
|---|---|---|
id | string (uuid) | |
name | string | |
defaultRegion | string, or null | Region new projects are placed in, e.g. "eu-west". |
role | OWNER, ADMIN, MEMBER, or null | The caller's role in this workspace. |
createdAt | string (date-time) | |
updatedAt | string (date-time) |