Skip to content

Set the fine-grained personal access token that reads repos and opens pull requests.

PUT
/admin/github
curl --request PUT \
--url https://example.com/api/v1/admin/github \
--header 'Content-Type: application/json' \
--data '{ "token": "example", "api_url": "example" }'
Media typeapplication/json
object
token
required
string
>= 1 characters
api_url

The GitHub API. The default is https://api.github.com. GitHub Enterprise Server uses https:///api/v3.

string
Examplegenerated
{
"token": "example",
"api_url": "example"
}

The connection, after a check with GitHub.

Media typeapplication/json
object
configured
required
boolean
token_last4
string
api_url
required
string
login

The GitHub account of the token, from the last check.

string
Examplegenerated
{
"configured": true,
"token_last4": "example",
"api_url": "example",
"login": "example"
}

An error.

Media typeapplication/problem+json

RFC 9457 problem details with a stable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
code
required

A stable machine-readable error code.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": "example"
}