Skip to content
NebulaCtrldocs
HTTP APIEndpoints

Git

Git connections to GitHub, Forgejo and GitLab, and the repositories and branches they can see. Each operation lists its method and path, parameters, request body, responses and an example call.

List git connections.

GET/api/v1/git-connections

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Query Parameters

cursor?string

Opaque cursor from a previous response's nextCursor. Omit for the first page.

limit?integer

How many items to return.

Formatint64
Range1 <= value <= 200
Default50

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/git-connections"
{  "$schema": "https://example.com/PageGitConnection.json",  "items": [    {      "$schema": "https://example.com/GitConnection.json",      "accountLogin": "string",      "createdAt": "2019-08-24T14:15:22Z",      "host": "string",      "id": "string",      "installed": true,      "kind": "github_app",      "label": "string",      "lastDeliveryAt": "2019-08-24T14:15:22Z",      "lastDeliveryStatus": "string",      "lastError": "string",      "manageUrl": "string",      "missingPermissions": [        "string"      ],      "organizationId": "string",      "verifiedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}
POST/api/v1/git-connections/forgejo

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/api/v1/git-connections/forgejo" \  -H "Content-Type: application/json" \  -d '{    "host": "string",    "label": "string",    "token": "string"  }'
{  "$schema": "https://example.com/GitConnection.json",  "accountLogin": "string",  "createdAt": "2019-08-24T14:15:22Z",  "host": "string",  "id": "string",  "installed": true,  "kind": "github_app",  "label": "string",  "lastDeliveryAt": "2019-08-24T14:15:22Z",  "lastDeliveryStatus": "string",  "lastError": "string",  "manageUrl": "string",  "missingPermissions": [    "string"  ],  "organizationId": "string",  "verifiedAt": "2019-08-24T14:15:22Z"}
POST/api/v1/git-connections/github-app

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/api/v1/git-connections/github-app" \  -H "Content-Type: application/json" \  -d '{    "label": "string"  }'
{  "$schema": "https://example.com/CreateGitHubAppOutputBody.json",  "connectionId": "string",  "startUrl": "string"}
GET/api/v1/git-connections/github-app/callback

Query Parameters

code?string
state?string

Response Body

application/problem+json

curl -X GET "https://example.com/api/v1/git-connections/github-app/callback"
Empty
GET/api/v1/git-connections/github-app/installed

Query Parameters

state?string
installation_id?integer
Formatint64
setup_action?string

Response Body

application/problem+json

curl -X GET "https://example.com/api/v1/git-connections/github-app/installed"
Empty
GET/api/v1/git-connections/github-app/start

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Query Parameters

state?string

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/git-connections/github-app/start"
"string"
POST/api/v1/git-connections/gitlab

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/api/v1/git-connections/gitlab" \  -H "Content-Type: application/json" \  -d '{    "token": "string"  }'
{  "$schema": "https://example.com/GitConnection.json",  "accountLogin": "string",  "createdAt": "2019-08-24T14:15:22Z",  "host": "string",  "id": "string",  "installed": true,  "kind": "github_app",  "label": "string",  "lastDeliveryAt": "2019-08-24T14:15:22Z",  "lastDeliveryStatus": "string",  "lastError": "string",  "manageUrl": "string",  "missingPermissions": [    "string"  ],  "organizationId": "string",  "verifiedAt": "2019-08-24T14:15:22Z"}

Delete a git connection.

DELETE/api/v1/git-connections/{id}

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Response Body

application/problem+json

curl -X DELETE "https://example.com/api/v1/git-connections/string"
Empty
GET/api/v1/git-connections/{id}/branches

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Query Parameters

repository?string

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/git-connections/string/branches"
{  "$schema": "https://example.com/BranchList.json",  "branches": [    "string"  ],  "defaultBranch": "string"}
POST/api/v1/git-connections/{id}/check

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/api/v1/git-connections/string/check"
{  "$schema": "https://example.com/GitConnection.json",  "accountLogin": "string",  "createdAt": "2019-08-24T14:15:22Z",  "host": "string",  "id": "string",  "installed": true,  "kind": "github_app",  "label": "string",  "lastDeliveryAt": "2019-08-24T14:15:22Z",  "lastDeliveryStatus": "string",  "lastError": "string",  "manageUrl": "string",  "missingPermissions": [    "string"  ],  "organizationId": "string",  "verifiedAt": "2019-08-24T14:15:22Z"}
GET/api/v1/git-connections/{id}/repositories

Authorization

AuthorizationBearer <token>

An API token, sent as Authorization: Bearer <token>. A token belongs to one organization and has the role it was created with, so it needs no X-Nebula-Organization header; if you send one, it must name the token's organization.

In: header

Path Parameters

id*string

Query Parameters

q?string

Case-insensitive substring filter on the repository's full name.

Response Body

application/json

application/problem+json

curl -X GET "https://example.com/api/v1/git-connections/string/repositories"
{  "$schema": "https://example.com/ListRepositoriesOutputBody.json",  "repositories": [    {      "cloneUrl": "string",      "defaultBranch": "string",      "fullName": "string",      "private": true    }  ]}