Check a saved connection's token again and record the outcome.
POST
/api/v1/git/connections/{connection}/test
const url = 'https://example.com/api/v1/git/connections/example/test';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/git/connections/example/testParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”connection
required
string
Connection id
Responses
Section titled “Responses”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"}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"}