Git providers and registries

Connect GitHub, GitLab, Gitea and Bitbucket, list repositories and branches, and add container registries.

A git provider connection lets Cloudgate read your repositories and deploy on push. A registry is where Cloudgate pulls private Docker images from, or pushes the images it builds.

Every request goes to https://cloudgate.octabyte.app/backend on the Hosted instance, or to your console address followed by /backend when you self-host. Send a Personal key in x-api-key and the Organization in x-organization-id; Authentication shows how to make the key, and Errors explains every refusal. The examples setCLOUDGATE_KEY and CLOUDGATE_ORG_ID in the shell first. To do the same in the console, read Applications in the user guide.

Git providers

List git providers

GET/git-providers

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl https://cloudgate.octabyte.app/backend/git-providers \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Create a git provider

POST/git-providers

Who can call it: Owner or Admin. Needs gitProviders: create, which a custom role can also grant.

Request body

FieldTypeNotes
namerequiredstringNot empty.
providerTypestringOne of github, gitlab, bitbucket, gitea. Default "github".

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/git-providers \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "storefront"
  }'

Get a git provider

GET/git-providers/{id}

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe git provider's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/git-providers/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update a git provider

PATCH/git-providers/{id}

Who can call it: Owner or Admin. Needs gitProviders: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe git provider's id.

Request body

FieldTypeNotes
namestringNot empty.
providerTypestringOne of github, gitlab, bitbucket, gitea. Default "github".

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/git-providers/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "storefront",
    "providerType": "github"
  }'

Delete a git provider

DELETE/git-providers/{id}

Who can call it: Owner or Admin. Needs gitProviders: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe git provider's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X DELETE https://cloudgate.octabyte.app/backend/git-providers/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

GitHub

List GitHub connections

GET/github

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl https://cloudgate.octabyte.app/backend/github \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Create a GitHub connection

POST/github

Who can call it: Owner or Admin. Needs gitProviders: create, which a custom role can also grant.

Request body

FieldTypeNotes
namerequiredstringNot empty.
appNamestring
appIdintegerAt least -9007199254740991.
clientIdstring
clientSecretstring
installationIdstring
privateKeystring
webhookSecretstring

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/github \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "storefront"
  }'

List repositories of a GitHub connection

GET/github/{id}/repositories

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe GitHub connection's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/github/RAU6yAYUXFRdXdPLyLoPC/repositories \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

List branches of a GitHub connection

GET/github/{id}/branches

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe GitHub connection's id.
ownerrequiredquerystringNot empty.
reporequiredquerystringNot empty.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl "https://cloudgate.octabyte.app/backend/github/RAU6yAYUXFRdXdPLyLoPC/branches?owner=example&repo=example" \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Get a GitHub connection

GET/github/{id}

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe GitHub connection's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/github/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update a GitHub connection

PATCH/github/{id}

Who can call it: Owner or Admin. Needs gitProviders: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe GitHub connection's id.

Request body

FieldTypeNotes
namestringNot empty.
appNamestring
appIdintegerAt least -9007199254740991.
clientIdstring
clientSecretstring
installationIdstring
privateKeystring
webhookSecretstring

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/github/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "storefront",
    "appName": "storefront",
    "appId": -9007199254740991
  }'

GitLab

List GitLab connections

GET/gitlab

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl https://cloudgate.octabyte.app/backend/gitlab \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Create a GitLab connection

POST/gitlab

Who can call it: Owner or Admin. Needs gitProviders: create, which a custom role can also grant.

Request body

FieldTypeNotes
namerequiredstringNot empty.
gitlabUrlstringNot empty.
gitlabInternalUrlstring or null
applicationIdstring
redirectUristring
secretstring
accessTokenstring
refreshTokenstring
groupNamestring
expiresAtintegerAt least -9007199254740991.

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/gitlab \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "storefront"
  }'

List repositories of a GitLab connection

GET/gitlab/{id}/repositories

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe GitLab connection's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/gitlab/RAU6yAYUXFRdXdPLyLoPC/repositories \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

List branches of a GitLab connection

GET/gitlab/{id}/branches

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe GitLab connection's id.
projectIdrequiredqueryintegerAt least 0. More than true.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl "https://cloudgate.octabyte.app/backend/gitlab/RAU6yAYUXFRdXdPLyLoPC/branches?projectId=VxDmR4XpiQmCSASM7JYyc" \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Get a GitLab connection

GET/gitlab/{id}

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe GitLab connection's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/gitlab/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update a GitLab connection

PATCH/gitlab/{id}

Who can call it: Owner or Admin. Needs gitProviders: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe GitLab connection's id.

Request body

FieldTypeNotes
namestringNot empty.
gitlabUrlstringNot empty.
gitlabInternalUrlstring or null
applicationIdstring
redirectUristring
secretstring
accessTokenstring
refreshTokenstring
groupNamestring
expiresAtintegerAt least -9007199254740991.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/gitlab/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "storefront",
    "gitlabUrl": "https://github.com/northwind-labs/storefront",
    "gitlabInternalUrl": "https://github.com/northwind-labs/storefront"
  }'

Gitea

List Gitea connections

GET/gitea

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl https://cloudgate.octabyte.app/backend/gitea \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Create a Gitea connection

POST/gitea

Who can call it: Owner or Admin. Needs gitProviders: create, which a custom role can also grant.

Request body

FieldTypeNotes
namerequiredstringNot empty.
giteaUrlstringNot empty.
giteaInternalUrlstring or null
redirectUristring
clientIdstring
clientSecretstring
accessTokenstring
refreshTokenstring
expiresAtintegerAt least -9007199254740991.
scopesstring
lastAuthenticatedAtintegerAt least -9007199254740991.

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/gitea \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "storefront"
  }'

List repositories of a Gitea connection

GET/gitea/{id}/repositories

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Gitea connection's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/gitea/RAU6yAYUXFRdXdPLyLoPC/repositories \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

List branches of a Gitea connection

GET/gitea/{id}/branches

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Gitea connection's id.
ownerrequiredquerystringNot empty.
reporequiredquerystringNot empty.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl "https://cloudgate.octabyte.app/backend/gitea/RAU6yAYUXFRdXdPLyLoPC/branches?owner=example&repo=example" \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Get a Gitea connection

GET/gitea/{id}

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Gitea connection's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/gitea/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update a Gitea connection

PATCH/gitea/{id}

Who can call it: Owner or Admin. Needs gitProviders: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Gitea connection's id.

Request body

FieldTypeNotes
namestringNot empty.
giteaUrlstringNot empty.
giteaInternalUrlstring or null
redirectUristring
clientIdstring
clientSecretstring
accessTokenstring
refreshTokenstring
expiresAtintegerAt least -9007199254740991.
scopesstring
lastAuthenticatedAtintegerAt least -9007199254740991.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/gitea/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "storefront",
    "giteaUrl": "https://github.com/northwind-labs/storefront",
    "giteaInternalUrl": "https://github.com/northwind-labs/storefront"
  }'

Bitbucket

List Bitbucket connections

GET/bitbucket

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl https://cloudgate.octabyte.app/backend/bitbucket \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Create a Bitbucket connection

POST/bitbucket

Who can call it: Owner or Admin. Needs gitProviders: create, which a custom role can also grant.

Request body

FieldTypeNotes
namerequiredstringNot empty.
bitbucketUsernamestring
bitbucketEmailstring
appPasswordstring
apiTokenstring
bitbucketWorkspaceNamestring

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/bitbucket \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "storefront"
  }'

List repositories of a Bitbucket connection

GET/bitbucket/{id}/repositories

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Bitbucket connection's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/bitbucket/RAU6yAYUXFRdXdPLyLoPC/repositories \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

List branches of a Bitbucket connection

GET/bitbucket/{id}/branches

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Bitbucket connection's id.
ownerrequiredquerystringNot empty.
reporequiredquerystringNot empty.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl "https://cloudgate.octabyte.app/backend/bitbucket/RAU6yAYUXFRdXdPLyLoPC/branches?owner=example&repo=example" \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Get a Bitbucket connection

GET/bitbucket/{id}

Who can call it: Owner or Admin. Needs gitProviders: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Bitbucket connection's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/bitbucket/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update a Bitbucket connection

PATCH/bitbucket/{id}

Who can call it: Owner or Admin. Needs gitProviders: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe Bitbucket connection's id.

Request body

FieldTypeNotes
namestringNot empty.
bitbucketUsernamestring
bitbucketEmailstring
appPasswordstring
apiTokenstring
bitbucketWorkspaceNamestring

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/bitbucket/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "storefront",
    "bitbucketUsername": "example",
    "bitbucketEmail": "ada@northwind.dev"
  }'

Connect with OAuth

Start GitHub manifest

POST/git-providers/oauth/github/manifest

The GitHub App setup page, as data: the manifest document plus the github.com form to POST it to. The POST has to come from the browser — GitHub answers it with a redirect carrying a one-time code.

Who can call it: Owner or Admin. Needs gitProviders: create, which a custom role can also grant.

Request body

FieldTypeNotes
namerequiredstringNot empty.
appNamestringNot empty.
organizationNamestringNot empty.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/git-providers/oauth/github/manifest \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "storefront"
  }'

Start GitLab authorization

POST/git-providers/oauth/gitlab/{id}/authorize

Where to send the browser to authorize a GitLab OAuth application.

Who can call it: Owner or Admin. Needs gitProviders: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/git-providers/oauth/gitlab/RAU6yAYUXFRdXdPLyLoPC/authorize \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Start Gitea authorization

POST/git-providers/oauth/gitea/{id}/authorize

Where to send the browser to authorize a Gitea OAuth application.

Who can call it: Owner or Admin. Needs gitProviders: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/git-providers/oauth/gitea/RAU6yAYUXFRdXdPLyLoPC/authorize \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Registries

List registries

GET/registries

Who can call it: Owner or Admin. Needs registry: read, which a custom role can also grant.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl https://cloudgate.octabyte.app/backend/registries \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Create a registry

POST/registries

Who can call it: Owner or Admin. Needs registry: create, which a custom role can also grant.

Request body

FieldTypeNotes
namerequiredstringNot empty.
usernamerequiredstringNot empty.
passwordrequiredstringNot empty.
urlstringDefault "".
registryTypestringOne of selfHosted, cloud. Default "cloud".
imagePrefixstring or nullUp to 255 characters. Matches ^(?:[a-zA-Z0-9]+(?:(?:[._]|__|[-]+)[a-zA-Z0-9]+)*(?:\/[a-zA-Z0-9]+(?:(?:[._]|__|[-]+)[a-zA-Z0-9]+)*)*)?$.

Responses

201 Created
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/registries \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "northwind-registry",
    "username": "deploy",
    "password": "<secret>"
  }'

Test a connection to a registry

POST/registries/test-connection

Does the registry accept this login? 204 when it does, a 400 carrying the registry's own refusal when it does not — and nothing else either way, so no answer can carry the password back out.

Who can call it: Owner or Admin. Needs registry: create, which a custom role can also grant.

Request body

FieldTypeNotes
urlstringDefault "".
usernamerequiredstringNot empty.
passwordrequiredstringNot empty.
serverIdstring or null

Responses

204 No content
Done. The answer has no body.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/registries/test-connection \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "username": "deploy",
    "password": "<secret>"
  }'

Test a saved registry

POST/registries/{id}/test-connection

The same question for a saved registry, with the stored password — which the console cannot send, because no read ever returns it.

Who can call it: Owner or Admin. Needs registry: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe registry's id.

Request body

FieldTypeNotes
serverIdstring or null

Responses

204 No content
Done. The answer has no body.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X POST https://cloudgate.octabyte.app/backend/registries/RAU6yAYUXFRdXdPLyLoPC/test-connection \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "serverId": "Ni7mAbWKjbWy4KErPjtrY"
  }'

Get a registry

GET/registries/{id}

Who can call it: Owner or Admin. Needs registry: read, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe registry's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl https://cloudgate.octabyte.app/backend/registries/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Update a registry

PATCH/registries/{id}

Who can call it: Owner or Admin. Needs registry: create, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe registry's id.

Request body

FieldTypeNotes
namestringNot empty.
usernamestringNot empty.
passwordstringNot empty.
urlstringDefault "".
registryTypestringOne of selfHosted, cloud. Default "cloud".
imagePrefixstring or nullUp to 255 characters. Matches ^(?:[a-zA-Z0-9]+(?:(?:[._]|__|[-]+)[a-zA-Z0-9]+)*(?:\/[a-zA-Z0-9]+(?:(?:[._]|__|[-]+)[a-zA-Z0-9]+)*)*)?$.

Responses

200 OK
The result, as JSON.
Refusals
400 Validation failed; details names each field; 401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X PATCH https://cloudgate.octabyte.app/backend/registries/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID" \
  -H "content-type: application/json" \
  -d '{
    "name": "northwind-registry",
    "username": "deploy",
    "password": "<secret>"
  }'

Delete a registry

DELETE/registries/{id}

Who can call it: Owner or Admin. Needs registry: delete, which a custom role can also grant.

Parameters

NameInTypeNotes
idrequiredpathstringThe registry's id.

Responses

200 OK
The result, as JSON.
Refusals
401 No key, or the key is not valid; 403 Your role does not allow it, or you were not granted what it touches; 404 Nothing with that id in this Organization. The error body.
curl -X DELETE https://cloudgate.octabyte.app/backend/registries/RAU6yAYUXFRdXdPLyLoPC \
  -H "x-api-key: $CLOUDGATE_KEY" \
  -H "x-organization-id: $CLOUDGATE_ORG_ID"

Something missing or wrong on this page? Email support@octabyte.io, or start a free trial and try it in the console.