eCMRhub.docs
API referenceConnections

Change a connection (owner only)

PATCH
/functions/v1/connections/{connectionId}

Changes the permissions of a connection or whether its writes wait for a person's approval.

Authorization

apikeybearerAuth
headerapikey<token>
headerAuthorizationBearer <JWT>

Path Parameters

connectionId*string
Formatuuid

Request Body

application/json
  1. body
requireApproval?boolean
permissions?array<>
Itemsitems <= 6

Response Body

Success

application/json
  1. response
id*string
Formatuuid
kind*string
Value in"oauth""apikey"
clientId*string|null
apiKeyId*|null
name*string
permissions*array<>
requireApproval*boolean
createdAt*string
Formatdate-time
lastUsedAt*|null
revokedAt*|null
Example Request
curl -X PATCH 'https://api-ecmr-dev.lucaspiera.com/functions/v1/connections/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "kind": "oauth",  "clientId": "string",  "apiKeyId": "37ba0474-c0bb-4910-bfb5-d6cebb614366",  "name": "string",  "permissions": [    "documents:read"  ],  "requireApproval": true,  "createdAt": "2019-08-24T14:15:22Z",  "lastUsedAt": "2019-08-24T14:15:22Z",  "revokedAt": "2019-08-24T14:15:22Z"}