List connections
const url = 'https://example.com/v1/connections?owner=me&ownerKind=member&state=working&includeRemoved=false&limit=25';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/connections?owner=me&ownerKind=member&state=working&includeRemoved=false&limit=25' \ --header 'Authorization: Bearer <token>'A member sees their own; a tenant admin sees every one, unless owner=me. Removed connections are listed only with state=removed, or with the others under includeRemoved=true.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Only those whose registration allows this project.
Only this app’s (its entry id).
me: only the caller’s own, even for a tenant admin.
Only those a member owns, or only the company’s.
working: runs can use it. needs-reconnecting: the app no longer accepts it; connect again. removing: a disconnect is under way. removed: gone.
Only those in this state.
true lists removed connections too.
1..100. Default 25.
Where the previous page ended: its nextCursor, as it came. A runtime that seals cursors takes one only for the same list, filters and caller, within a day; otherwise 400 bad-input, and the list starts again without it. Absent → first page.
Responses
Section titled “Responses”Page of connections.
object
One owner’s account at an app, through a registration, in one env. Never its token.
object
The registration it goes through.
The app’s entry id.
Who owns a connection: one member (kind: member, with their userId), or the company (kind: company, the workspace’s own account).
object
The member. Present when kind is member.
Whose account a connection is at the app.
object
The account’s stable id at the app.
What people see: an email address, a login.
The name people know it by: the one asked for at the connect, else the account’s label. Absent on a connection made before connections had names; show account.label then.
Only ever true: the person’s main connection through its registration in its env, the one their agents use when no choice names another. A person’s first connection has none; their second connection makes the first their main. The company’s has none.
The entry’s permission keys the app granted.
working: runs can use it. needs-reconnecting: the app no longer accepts it; connect again. removing: a disconnect is under way. removed: gone.
Why it’s in its state: invalid-grant (the app withdrew the grant), no-refresh-token (the app gave no way to renew it), token-missing (its stored token is gone), store-write-failed (its token couldn’t be stored at the connect), installation-missing (the GitHub App was uninstalled from the account), installation-permissions (an owner took permissions from the installation), suspended (the installation was suspended), sessions-revoked (Google revoked the person’s sessions), access-expired (the app gave no refresh token, and its access token ends within a minute, or has ended). Other values may be added; state says what to do.
A GitHub App’s installation.
When its access token ends, for a connection the app gave no refresh token. From one minute before then, it needs reconnecting (access-expired), and reads say so too. Absent for one that renews.
When its current grant was stored: the connect, or the last reconnect.
When a run last used it, to the hour.
What a removal did at the app. at-app: access was withdrawn there. app-failed: the app refused the revoke; the token is gone here all the same. kept-for-other-connection: another live connection uses the same grant. not-supported: the app has no revoke that would touch only this connection.
Example
{ "data": [ { "owner": { "kind": "member" }, "state": "working", "removedReason": "disconnected", "withdrawn": "at-app" } ]}An unknown app, owner, ownerKind or state, or an includeRemoved other than true or false (bad-input).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}The database was too busy to answer in time (database-busy); Retry-After (whole seconds) says when to try again.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}