Gamma API
ProjectsIntegrations

Change an integration

PUT
/api/projects/{projectId}/integrations/{id}

What syncs which way, the conflict policy, and whether it is paused. Runs no sync, and changes no records. 400 for an entity or a way the provider cannot sync, or a model that is not the project's; 409 for one its connection does not allow.

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.

id*string

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

Response Body

OK.

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 PUT 'http://localhost:3000/api/projects/string/integrations/string' \  -H 'Content-Type: application/json' \  -d '{  "entities": [    {      "entity": "issues",      "direction": "inbound"    }  ]}'
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"  }}