See Stacksync in action with a solution architect. Book a demo ↗
Connections

Connections

Update a connection

POST
/v1/workspaces/{workspace_id}/connections/{connection_id}/update

Rename a connection, share it with the workspace, or replace its credentials (validated by the app first). Any editor who can see a connection shared with the workspace can update it.

Authorization

Authorizationstringheaderrequired

Bearer <key>, where <key> is a workspace API key or a user API key. See Authentication.

Path Parameters

workspace_id*integer

The workspace. List the ones your key can reach with GET /v1/workspaces.

connection_id*string

The connection.

Formatuuid

Query Parameters

region*Region

Region of the connection: besg or usnv

Value in"besg""usnv"

Request Body

application/json
  1. body
connection_name?|

The new name: letters, numbers, dashes, underscores and spaces, 3 to 63 characters

Defaultnull
is_shared_with_workspace?|

True to share the connection with every member of the workspace

Defaultnull
credentials?|

The new credentials of the app

Defaultnull
validate_only?Validate Only

Run every check of the write and answer 204 without writing: a refused write answers the error the write would

Defaultfalse

Response Body

OK

application/json
  1. response
data*
Update a connection
curl -X POST 'https://api.stacksync.com/v1/workspaces/0/connections/497f6eca-6276-4993-bfeb-53cbbbba6f08/update?region=usnv' \  -H 'Content-Type: application/json' \  -d '{  "connection_name": "Production Postgres"}'
{  "data": {    "connection_id": "<connection_id>",    "connection_name": "<connection_name>",    "app_type": "<app_type>",    "is_shared_with_workspace": false,    "created_time": "<created_time>",    "last_modified_time": "<last_modified_time>",    "credentials_options": {},    "connection_resource_id": "<connection_resource_id>",    "region": "<region>",    "needs_reauthorization": false  }}