Skip to content

Get the GitHub team a Chelsea team is linked to

GET
/teams/{id}/github-team
Code sample: Shell / cURL
curl --request GET \
--url https://example.com/api/v1/teams/example/github-team \
--header 'Authorization: Bearer <token>'

Returns the link of a Chelsea team to a GitHub team, or null when it has none, with sync: when a person confirmed that Chelsea decides who is on the GitHub team, when it last ran and what it did (sync is absent on an older server). Read from the database, never GitHub. Requires settings.manage and github.view.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

The link, or null.

Media typeapplication/json
object
data
required
Any of:
object
defaultPermission
required
string
Allowed values: pull triage push maintain admin
githubTeamId
required
string
slug
required
string
sync

Where the membership sync of this link stands. Absent on an older server.

object
confirmedAt
required

When a person confirmed that Chelsea decides who is on the GitHub team; null before.

string | null
lastResult
required
Any of:
object
added
required

GitHub logins added to the team.

Array<string>
message
required

Why a failed run stopped, in a sentence.

string | null
pendingInvitations

Invited to the GitHub team and not yet in it. Information only: a sync never cancels an invitation.

Array<string>
refused
required

People GitHub or Chelsea refused to add or remove, with the reason.

Array<object>
object
login
required
string
reason
required
string
removed
required

GitHub logins taken out of the team; they stay in the organization.

Array<string>
status
required

synced when everything applied, partial when GitHub refused some, failed when none ran.

string
Allowed values: synced partial failed
throughChildTeams

On the team through a child team and not wanted by Chelsea. Information only: they stay, and a sync does not change them.

Array<string>
lastSyncedAt
required

When the last run finished; null before.

string | null
teamId
required
string

Example

{
"data": {
"defaultPermission": "pull",
"sync": {
"lastResult": {
"status": "synced"
}
}
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.