Complete GitHub connection
Connects an installation of kosem's GitHub App that the caller installed, once GitHub sent them back with a code. The code shows which installations the person who authorized the app reaches, and only those connect: an installationId that names another is refused. An installation is one organization's or project's; completing again for the one that connected it returns its connection.
Connects an installation of kosem's GitHub App that the caller installed, once GitHub sent them back with a code.
The code shows which installations the person who authorized the app reaches, and only those connect: an installationId that names another is refused. An installation is one organization's or project's; completing again for the one that connected it returns its connection.
bearerAuthorizationBearer <token>An access token, or an API key.
organization*stringThe organization's ID.
^org_[0-7][0-9a-hjkmnp-tv-z]{25}$application/json- body
code*stringThe code GitHub gave as the person authorized kosem's GitHub App, which shows which installations they may reach. It works once, for ten minutes.
1 <= length <= 512displayName?stringName shown in user interfaces. Defaults to GitHub and the account's name.
length <= 100installationId?integerThe installation GitHub named, as installation_id. Unset, the person's only installation of the app that no organization connected.
int640 <= valuestate*stringThe state that StartGitHubConnection gave, for this organization and this person.
1 <= length <= 512Created
application/json- response
availability*For an organization's connection: the projects it is shared with. Choosing it for an access profile still takes connections.connections.use. A project's own connection serves that project alone, and is shared with none.
config*Settings, as the type's configFields describe them.
createTime?stringWhen the connection was created; unset on one that was only validated.
date-timedisplayName*stringName shown in user interfaces. Defaults to the type's name.
name*stringResource name, organizations/{organization_id}/connections/{connection_id}, or projects/{project_id}/connections/{connection_id} for a project's own.
roles?array<>For AWS, once set up: the IAM roles the connection assumes, its default one first. Each trusts the connection's identity subject.
serviceAccounts?array<>For Google Cloud, once set up: the service accounts the connection acts as, its default one first. Each trusts the connection's identity, and its roles bound what its tokens can do.
state*stringWhether the service lets kosem act in the account: ACTIVE, it did when it was last verified; NEEDS_ATTENTION, it refused, or the connection isn't set up yet, and stateReason says why.
"ACTIVE""NEEDS_ATTENTION"stateReason*stringWhy the connection needs attention.
trust?What the service trusts of kosem for this connection, for a type connected by WORKLOAD_IDENTITY.
type*stringThe connection's type, such as connectionTypes/github. It never changes.
updateTime?stringWhen the connection was last updated; unset on one that was only validated.
date-timeverifyTime*stringWhen the service last let kosem act in the account, or refused.
date-timecurl -X POST 'https://api.kosem.ai/v1/organizations/string/connections/github/complete' \
-H 'Content-Type: application/json' \
-d '{
"code": "string",
"state": "string"
}'{
"availability": {
"allProjects": true,
"projects": [
"string"
]
},
"config": {
"property1": "string",
"property2": "string"
},
"createTime": "2019-08-24T14:15:22Z",
"displayName": "string",
"name": "string",
"roles": [
{
"arn": "string",
"createTime": "2019-08-24T14:15:22Z",
"default": true,
"displayName": "string",
"name": "string",
"state": "ACTIVE",
"stateReason": "string",
"verifyTime": "2019-08-24T14:15:22Z"
}
],
"serviceAccounts": [
{
"createTime": "2019-08-24T14:15:22Z",
"default": true,
"displayName": "string",
"email": "string",
"state": "ACTIVE",
"stateReason": "string",
"verifyTime": "2019-08-24T14:15:22Z"
}
],
"state": "ACTIVE",
"stateReason": "string",
"trust": {
"attributeCondition": "string",
"audience": "string",
"issuer": "string",
"subject": "string"
},
"type": "string",
"updateTime": "2019-08-24T14:15:22Z",
"verifyTime": "2019-08-24T14:15:22Z"
}