Gamma API
OrganizationsConnections

Turn a connection off or on

PATCH
/api/organizations/{slug}/connections/{id}

Off, nothing syncs through it and its settings are kept. Not checked against the provider.

Who may call it: An owner, security admin or admin of the organization. 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

slug*string

The organization's slug, as in its URL.

id*string

Request Body

application/json
  1. body
disabled*boolean

Response Body

OK.

application/json
  1. response
connection*

An organization's connection to an external provider. Its secrets are never sent back.

Example Request
curl -X PATCH 'http://localhost:3000/api/organizations/string/connections/string' \  -H 'Content-Type: application/json' \  -d '{  "disabled": true}'
Example Response
{  "connection": {    "id": "string",    "provider": "string",    "name": "string",    "config": {      "property1": null,      "property2": null    },    "allows": {      "property1": "inbound",      "property2": "inbound"    },    "disabledAt": "2019-08-24T14:15:22Z",    "lastCheckedAt": "2019-08-24T14:15:22Z",    "lastError": "string",    "projects": -9007199254740991,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}