Skip to content
GitHub

Check a token without saving it: the account it belongs to and its scopes.

POST
/api/v1/git/connections/test
curl --request POST \
--url https://example.com/api/v1/git/connections/test \
--header 'Content-Type: application/json' \
--data '{ "provider": "github", "name": "gitlab-acme", "baseUrl": "https://gitlab.com", "token": "example", "defaultBranch": "example" }'
Media typeapplication/json
object
provider
required

github (a personal or fine-grained token; the GitHub App has its installations), gitlab, or gitea (Gitea and Forgejo).

string
Allowed values: github gitlab gitea
name
required

Unique in the organization: lowercase letters, digits and -.

string
Example
gitlab-acme
baseUrl

The provider’s URL; the provider’s public service when empty (https://api.github.com, https://gitlab.com). Required for Gitea.

string
Example
https://gitlab.com
token
required

A personal, project or group access token; write-only.

string
defaultBranch
string | null
Media typeapplication/json

What the provider said about a token.

object
ok
required
boolean
username

The account the token belongs to.

string | null
scopes
required

The token’s scopes, when the provider tells them.

Array<string>
missingScopes
required

Scopes Kuben needs that the token lacks.

Array<string>
error
string | null
checkedAt
required
integer format: int64
Examplegenerated
{
"ok": true,
"username": "example",
"scopes": [
"example"
],
"missingScopes": [
"example"
],
"error": "example",
"checkedAt": 1
}
Media typeapplication/json

Problem Details body.

object
code
required

Stable machine-readable code, e.g. forbidden.

string
title
required

Short human readable title.

string
status
required

HTTP status.

integer format: int32
detail

Details, if safe to expose.

string | null
Example
{
"code": "forbidden"
}
Media typeapplication/json

Problem Details body.

object
code
required

Stable machine-readable code, e.g. forbidden.

string
title
required

Short human readable title.

string
status
required

HTTP status.

integer format: int32
detail

Details, if safe to expose.

string | null
Example
{
"code": "forbidden"
}