GitHub API

Use these operations to interact with the GitHub integration in Cortex.

Required permissions

Your API key must have the Configure integrations permission.

Operations

Retrieve configurations

get
Authorizations
Responses
200

Successfully found configurations

application/json
get
GET /api/v1/github/configurations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "configurations": [
    {
      "alias": "text",
      "appUrl": "text",
      "host": "text",
      "installation": {
        "installationId": 1
      },
      "isDefault": true,
      "type": "text"
    }
  ]
}

Retrieve default configuration

get
Authorizations
Responses
200

Successfully found default configuration

application/json
get
GET /api/v1/github/default-configuration HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "alias": "text",
  "host": "text",
  "isDefault": true,
  "type": "text",
  "appUrl": "text",
  "installation": {
    "installationId": 1
  }
}

Retrieve a single personal configuration

get
Authorizations
Path parameters
aliasstringRequired
Responses
200

Successfully found configuration

application/json
get
GET /api/v1/github/configurations/personal/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "alias": "text",
  "host": "text",
  "isDefault": true,
  "type": "text"
}

Retrieve a single app configuration

get
Authorizations
Path parameters
aliasstringRequired
Responses
200

Successfully found configuration

application/json
get
GET /api/v1/github/configurations/app/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "alias": "text",
  "appUrl": "text",
  "host": "text",
  "installation": {
    "installationId": 1
  },
  "isDefault": true,
  "type": "text"
}

Validate all configurations

post
Authorizations
Responses
200

Successfully validated all configurations

application/json
post
POST /api/v1/github/configurations/validate HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "configurations": [
    {
      "alias": "text",
      "isValid": true,
      "message": "text"
    }
  ]
}

Add a single app configuration

post
Authorizations
Body
aliasstringRequired
apiHoststringOptional
appUrlstringRequired
applicationIdstringRequired
clientIdstringRequired
clientSecretstringRequired
isDefaultbooleanRequired
privateKeystringRequired
Responses
200

Successfully added configuration

application/json
post
POST /api/v1/github/configurations/app HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 149

{
  "alias": "text",
  "apiHost": "text",
  "appUrl": "text",
  "applicationId": "text",
  "clientId": "text",
  "clientSecret": "text",
  "isDefault": true,
  "privateKey": "text"
}
{
  "alias": "text",
  "appUrl": "text",
  "host": "text",
  "installation": {
    "installationId": 1
  },
  "isDefault": true,
  "type": "text"
}

Validate a configuration

post
Authorizations
Path parameters
aliasstringRequired
Responses
200

Successfully validated configuration

application/json
post
POST /api/v1/github/configurations/validate/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
  "alias": "text",
  "isValid": true,
  "message": "text"
}

Add a single personal configuration

post
Authorizations
Body
accessTokenstringRequired
aliasstringRequired
apiHoststringOptional
isDefaultbooleanRequired
Responses
200

Successfully added configuration

application/json
post
POST /api/v1/github/configurations/personal HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "accessToken": "text",
  "alias": "text",
  "apiHost": "text",
  "isDefault": true
}
{
  "alias": "text",
  "host": "text",
  "isDefault": true,
  "type": "text"
}

Update a single app configuration

put
Authorizations
Path parameters
aliasstringRequired
Body
aliasstringRequired
isDefaultbooleanRequired
Responses
200

Successfully updated configuration

application/json
put
PUT /api/v1/github/configurations/app/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "alias": "text",
  "isDefault": true
}
{
  "alias": "text",
  "appUrl": "text",
  "host": "text",
  "installation": {
    "installationId": 1
  },
  "isDefault": true,
  "type": "text"
}

Delete a personal configuration

delete
Authorizations
Path parameters
aliasstringRequired
Responses
200

Successfully deleted configuration

No content

delete
DELETE /api/v1/github/configurations/personal/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*

No content

Update a single personal configuration

put
Authorizations
Path parameters
aliasstringRequired
Body
aliasstringRequired
isDefaultbooleanRequired
Responses
200

Successfully updated configuration

application/json
put
PUT /api/v1/github/configurations/personal/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "alias": "text",
  "isDefault": true
}
{
  "alias": "text",
  "host": "text",
  "isDefault": true,
  "type": "text"
}

Delete all configurations

delete
Authorizations
Responses
200

Successfully deleted all configurations

No content

delete
DELETE /api/v1/github/configurations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*

No content

Delete a single app configuration

delete
Authorizations
Path parameters
aliasstringRequired
Responses
200

Successfully deleted configuration

No content

delete
DELETE /api/v1/github/configurations/app/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*

No content

Last updated

Was this helpful?