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
/api/v1/github/configurations
GET /api/v1/github/configurations HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "configurations": [
    {
      "0": "[",
      "1": "C",
      "2": "i",
      "3": "r",
      "4": "c",
      "5": "u",
      "6": "l",
      "7": "a",
      "8": "r",
      "9": " ",
      "10": "R",
      "11": "e",
      "12": "f",
      "13": "e",
      "14": "r",
      "15": "e",
      "16": "n",
      "17": "c",
      "18": "e",
      "19": "]",
      "alias": "text",
      "host": "text",
      "isDefault": true,
      "type": "text",
      "appUrl": "text",
      "installation": {
        "installationId": 1
      }
    }
  ]
}

Retrieve default configuration

get
Authorizations
Responses
200

Successfully found default configuration

application/json
get
/api/v1/github/default-configuration
GET /api/v1/github/default-configuration HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "0": "[",
  "1": "C",
  "2": "i",
  "3": "r",
  "4": "c",
  "5": "u",
  "6": "l",
  "7": "a",
  "8": "r",
  "9": " ",
  "10": "R",
  "11": "e",
  "12": "f",
  "13": "e",
  "14": "r",
  "15": "e",
  "16": "n",
  "17": "c",
  "18": "e",
  "19": "]",
  "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
Responseall of
get
/api/v1/github/configurations/personal/{alias}
GET /api/v1/github/configurations/personal/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "0": "[",
  "1": "C",
  "2": "i",
  "3": "r",
  "4": "c",
  "5": "u",
  "6": "l",
  "7": "a",
  "8": "r",
  "9": " ",
  "10": "R",
  "11": "e",
  "12": "f",
  "13": "e",
  "14": "r",
  "15": "e",
  "16": "n",
  "17": "c",
  "18": "e",
  "19": "]",
  "alias": "text",
  "host": "text",
  "isDefault": true,
  "type": "text",
  "appUrl": "text",
  "installation": {
    "installationId": 1
  }
}

Retrieve a single app configuration

get
Authorizations
Path parameters
aliasstringRequired
Responses
200

Successfully found configuration

application/json
Responseall of
get
/api/v1/github/configurations/app/{alias}
GET /api/v1/github/configurations/app/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "0": "[",
  "1": "C",
  "2": "i",
  "3": "r",
  "4": "c",
  "5": "u",
  "6": "l",
  "7": "a",
  "8": "r",
  "9": " ",
  "10": "R",
  "11": "e",
  "12": "f",
  "13": "e",
  "14": "r",
  "15": "e",
  "16": "n",
  "17": "c",
  "18": "e",
  "19": "]",
  "alias": "text",
  "host": "text",
  "isDefault": true,
  "type": "text",
  "appUrl": "text",
  "installation": {
    "installationId": 1
  }
}

Validate all configurations

post
Authorizations
Responses
200

Successfully validated all configurations

application/json
post
/api/v1/github/configurations/validate
POST /api/v1/github/configurations/validate HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
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
Responseall of
post
/api/v1/github/configurations/app
POST /api/v1/github/configurations/app HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 149

{
  "alias": "text",
  "apiHost": "text",
  "appUrl": "text",
  "applicationId": "text",
  "clientId": "text",
  "clientSecret": "text",
  "isDefault": true,
  "privateKey": "text"
}
{
  "0": "[",
  "1": "C",
  "2": "i",
  "3": "r",
  "4": "c",
  "5": "u",
  "6": "l",
  "7": "a",
  "8": "r",
  "9": " ",
  "10": "R",
  "11": "e",
  "12": "f",
  "13": "e",
  "14": "r",
  "15": "e",
  "16": "n",
  "17": "c",
  "18": "e",
  "19": "]",
  "alias": "text",
  "host": "text",
  "isDefault": true,
  "type": "text",
  "appUrl": "text",
  "installation": {
    "installationId": 1
  }
}

Validate a configuration

post
Authorizations
Path parameters
aliasstringRequired
Responses
200

Successfully validated configuration

application/json
post
/api/v1/github/configurations/validate/{alias}
POST /api/v1/github/configurations/validate/{alias} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
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
Responseall of
post
/api/v1/github/configurations/personal
POST /api/v1/github/configurations/personal HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "accessToken": "text",
  "alias": "text",
  "apiHost": "text",
  "isDefault": true
}
{
  "0": "[",
  "1": "C",
  "2": "i",
  "3": "r",
  "4": "c",
  "5": "u",
  "6": "l",
  "7": "a",
  "8": "r",
  "9": " ",
  "10": "R",
  "11": "e",
  "12": "f",
  "13": "e",
  "14": "r",
  "15": "e",
  "16": "n",
  "17": "c",
  "18": "e",
  "19": "]",
  "alias": "text",
  "host": "text",
  "isDefault": true,
  "type": "text",
  "appUrl": "text",
  "installation": {
    "installationId": 1
  }
}

Update a single app configuration

put
Authorizations
Path parameters
aliasstringRequired
Body
aliasstringRequired
isDefaultbooleanRequired
Responses
200

Successfully updated configuration

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

{
  "alias": "text",
  "isDefault": true
}
{
  "0": "[",
  "1": "C",
  "2": "i",
  "3": "r",
  "4": "c",
  "5": "u",
  "6": "l",
  "7": "a",
  "8": "r",
  "9": " ",
  "10": "R",
  "11": "e",
  "12": "f",
  "13": "e",
  "14": "r",
  "15": "e",
  "16": "n",
  "17": "c",
  "18": "e",
  "19": "]",
  "alias": "text",
  "host": "text",
  "isDefault": true,
  "type": "text",
  "appUrl": "text",
  "installation": {
    "installationId": 1
  }
}

Delete a personal configuration

delete
Authorizations
Path parameters
aliasstringRequired
Responses
200

Successfully deleted configuration

No content

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

No content

Update a single personal configuration

put
Authorizations
Path parameters
aliasstringRequired
Body
aliasstringRequired
isDefaultbooleanRequired
Responses
200

Successfully updated configuration

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

{
  "alias": "text",
  "isDefault": true
}
{
  "0": "[",
  "1": "C",
  "2": "i",
  "3": "r",
  "4": "c",
  "5": "u",
  "6": "l",
  "7": "a",
  "8": "r",
  "9": " ",
  "10": "R",
  "11": "e",
  "12": "f",
  "13": "e",
  "14": "r",
  "15": "e",
  "16": "n",
  "17": "c",
  "18": "e",
  "19": "]",
  "alias": "text",
  "host": "text",
  "isDefault": true,
  "type": "text",
  "appUrl": "text",
  "installation": {
    "installationId": 1
  }
}

Delete all configurations

delete
Authorizations
Responses
200

Successfully deleted all configurations

No content

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

No content

Delete a single app configuration

delete
Authorizations
Path parameters
aliasstringRequired
Responses
200

Successfully deleted configuration

No content

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

No content

Last updated

Was this helpful?