Gamma API
ProjectsIntegrations

Link a project over there

POST
/api/projects/{projectId}/integrations

Links the project to one in the external system, which the provider must confirm. Runs no sync. 400 for an entity or a way the provider cannot sync, or a model that is not the project's; 409 when it is already linked, the connection is off, or the connection does not allow an entity that way (its allows).

Who may call it: Whoever manages the project: an owner, security admin or admin of its organization, or an admin of the project. API keys: no.

Authorization

session
cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Host- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Path Parameters

projectId*string

The project's id.

Request Body

application/json
  1. body
conflictPolicy?string
Default"manual"
Value in"prefer_internal""prefer_external""manual"
paused?boolean
Defaultfalse
entities*array<>

What syncs, and which way; anything left out does not.

Itemsitems <= 4
connectionId*string
Length1 <= length
externalProjectId*string
Length1 <= length <= 200

Response Body

Created.

application/json
  1. response
integration*

A project synced with a project in an external system, through one of the organization's connections. Saving it runs no sync.

Example Request
curl -X POST 'http://localhost:3000/api/projects/string/integrations' \  -H 'Content-Type: application/json' \  -d '{  "entities": [    {      "entity": "issues",      "direction": "inbound"    }  ],  "connectionId": "string",  "externalProjectId": "string"}'
Example Response
{  "integration": {    "id": "string",    "connectionId": "string",    "externalProjectId": "string",    "externalProjectName": "string",    "conflictPolicy": "prefer_internal",    "pausedAt": "2019-08-24T14:15:22Z",    "entities": [      {        "entity": "issues",        "direction": "inbound",        "importNew": true,        "mirrorFolders": true,        "categoryIds": [          "string"        ],        "modelIds": [          "string"        ]      }    ],    "checkpoints": [      {        "entity": "issues",        "side": "internal",        "updatedAt": "2019-08-24T14:15:22Z"      }    ],    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}