Naijacloud
Docs

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

NameTypeRequiredNotes
limitintegernoRows per page. Ignored when a cursor is given.
cursorstringnoThe nextCursor of the previous page, unchanged.

Returns

  • 200 with a page: { data: V1Workspace[], nextCursor }, where each item is V1Workspace.
bash
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

NameTypeRequiredNotes
workspaceIdstringyesThe workspace's id.

Returns

bash
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

NameTypeRequiredNotes
workspaceIdstringyesThe workspace's id.

Query parameters

NameTypeRequiredNotes
limitintegernoRows per page. Ignored when a cursor is given.
cursorstringnoThe nextCursor of the previous page, unchanged.

Returns

  • 200 with a page: { data: V1ApiToken[], nextCursor }, where each item is V1ApiToken.
bash
curl "https://api.naijacloud.com/v1/workspaces/$WORKSPACE_ID/api-keys" \ -H "Authorization: Bearer $NC_API_KEY"

GET /v1/workspaces/{workspaceId}/invites

Key scopes: READ and PLATFORM_API.

Path parameters

NameTypeRequiredNotes
workspaceIdstringyesThe workspace's id.

Query parameters

NameTypeRequiredNotes
limitintegernoRows per page. Ignored when a cursor is given.
cursorstringnoThe nextCursor of the previous page, unchanged.

Returns

  • 200 with a page: { data: V1Invite[], nextCursor }, where each item is V1Invite.
bash
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

NameTypeRequiredNotes
workspaceIdstringyesThe workspace's id.

Query parameters

NameTypeRequiredNotes
limitintegernoRows per page. Ignored when a cursor is given.
cursorstringnoThe nextCursor of the previous page, unchanged.

Returns

  • 200 with a page: { data: V1Member[], nextCursor }, where each item is V1Member.
bash
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

NameTypeRequiredNotes
workspaceIdstringyesThe workspace's id.

Returns

  • 200 with a page: { data: V1TeamRoleRow[], nextCursor }, where each item is V1TeamRoleRow.
bash
curl "https://api.naijacloud.com/v1/workspaces/$WORKSPACE_ID/roles" \ -H "Authorization: Bearer $NC_API_KEY"

Types

V1ApiToken

FieldTypeNotes
createdAtstring (date-time)
expiresAtstring (date-time), or null
idstring
lastUsedAtstring (date-time), or null
namestring
revokedAtstring (date-time), or null
scopesarray of DATABASES, DEPLOYS, EMAIL_SEND, PLATFORM_API, READ, WRITE
teamIdstring, or null
tokenHintstringThe head of the key including its prefix, to identify it in a list.
tokenTailstring, or nullLast 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.
updatedAtstring (date-time)

V1Invite

FieldTypeNotes
acceptedAtstring (date-time), or null
createdAtstring (date-time)
emailstring
expiredbooleanTrue once the link has lapsed; it can still be resent.
expiresAtstring (date-time)
idstring
invitedByNamestring, or nullWho sent (or last resent) the invite, by name or email. Null once that person has left the workspace.
projectIdsarray of string, or null
roleADMIN, MEMBER, OWNER
roleNamestring, or nullThe named workspace role the invite grants, or null when it grants only its rank.
teamIdstring
teamRoleIdstring, or null
updatedAtstring (date-time)

V1Member

FieldTypeNotes
idstring (uuid)
userV1MemberUser
roleOWNER, ADMIN, MEMBER
teamRoleIdstring, or nullThe named workspace role, when one is set.
projectIdsarray of string, or nullThe projects a project-scoped member may reach.
createdAtstring (date-time)

V1MemberUser

FieldTypeNotes
idstring (uuid)
emailstring (email)
firstNamestring, or null
lastNamestring, or null

V1TeamRole

FieldTypeNotes
allProjectsboolean
builtinboolean
createdAtstring (date-time)
descriptionstring
editableboolean
idstring
namestring
permissionsarray of BILLING, DATABASES, DEPLOYS, EMAIL, STORAGE, TEAM
projectIdsarray of string
readOnlyboolean
teamIdstring
updatedAtstring (date-time)

V1TeamRoleRow

FieldTypeNotes
memberCountinteger
roleV1TeamRole
scopedProjectIdsarray of string

V1Workspace

FieldTypeNotes
idstring (uuid)
namestring
defaultRegionstring, or nullRegion new projects are placed in, e.g. "eu-west".
roleOWNER, ADMIN, MEMBER, or nullThe caller's role in this workspace.
createdAtstring (date-time)
updatedAtstring (date-time)