Skip to main content
POST
/
v1
/
connectors
/
github
/
setup
Setup GitHub connector
curl --request POST \
  --url https://api.openworklabs.com/v1/connectors/github/setup \
  --header 'Content-Type: application/json' \
  --data '
{
  "installationId": 123,
  "connectorInstanceName": "<string>",
  "repositoryId": 123,
  "repositoryFullName": "<string>",
  "branch": "<string>",
  "ref": "<string>",
  "connectorAccountId": "<string>",
  "mappings": [
    {
      "mappingKind": "path",
      "selector": "<string>",
      "objectType": "skill",
      "pluginId": "<string>",
      "autoAddToPlugin": false,
      "config": {}
    }
  ]
}
'
{
  "ok": true,
  "item": {
    "connectorAccount": {
      "id": "<string>",
      "organizationId": "<string>",
      "connectorType": "github",
      "remoteId": "<string>",
      "externalAccountRef": "<string>",
      "displayName": "<string>",
      "status": "active",
      "createdByOrgMembershipId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "metadata": {}
    },
    "connectorInstance": {
      "id": "<string>",
      "organizationId": "<string>",
      "connectorAccountId": "<string>",
      "connectorType": "github",
      "remoteId": "<string>",
      "name": "<string>",
      "status": "active",
      "instanceConfigJson": {},
      "lastSyncedAt": "2023-11-07T05:31:56Z",
      "lastSyncStatus": "pending",
      "lastSyncCursor": "<string>",
      "createdByOrgMembershipId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    },
    "connectorTarget": {
      "id": "<string>",
      "connectorInstanceId": "<string>",
      "connectorType": "github",
      "remoteId": "<string>",
      "targetKind": "repository_branch",
      "externalTargetRef": "<string>",
      "targetConfigJson": {},
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  }
}

Body

application/json
installationId
integer
required
Required range: x <= 9007199254740991
connectorInstanceName
string
required
Required string length: 1 - 255
repositoryId
integer
required
Required range: x <= 9007199254740991
repositoryFullName
string
required
Required string length: 1 - 255
branch
string
required
Required string length: 1 - 255
ref
string
required
Required string length: 1 - 255
connectorAccountId
string<typeid>

Den TypeID with 'cac_' prefix and a 26-character base32 suffix.

Required string length: 30
Pattern: ^cac_.*
mappings
object[]
Maximum array length: 100

Response

GitHub connector setup created successfully.

ok
boolean
required
item
object
required