Naijacloud
Docs

GitHub

Every /v1 route for github. 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.

A repository's branch names

GET /v1/workspaces/{workspaceId}/github/branches

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.
searchstringnoOnly rows whose name contains this. Send the same value with every page of one walk.
repostringyesowner/name

Returns

  • 200 with a page: { data: V1Branch[], nextCursor }, where each item is V1Branch.
bash
curl "https://api.naijacloud.com/v1/workspaces/$WORKSPACE_ID/github/branches?repo=%E2%80%A6" \ -H "Authorization: Bearer $NC_API_KEY"

GET /v1/workspaces/{workspaceId}/github/install-url

Key scopes: READ and PLATFORM_API.

Path parameters

NameTypeRequiredNotes
workspaceIdstringyesThe workspace's id.

Returns

bash
curl "https://api.naijacloud.com/v1/workspaces/$WORKSPACE_ID/github/install-url" \ -H "Authorization: Bearer $NC_API_KEY"

Repositories the workspace's GitHub App installations can see

GET /v1/workspaces/{workspaceId}/github/repositories

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.
searchstringnoOnly rows whose name contains this. Send the same value with every page of one walk.

Returns

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

Types

V1Branch

FieldTypeNotes
namestring

V1GithubInstallUrl

FieldTypeNotes
urlstringOpen in a browser to install the Naijacloud GitHub App for this workspace.

V1Repository

FieldTypeNotes
fullNamestringowner/name
privateboolean
defaultBranchstring
installationIdstringPass with repoFullName when creating a service.