---
title: "Get a connection"
method: GET
path: "/v1/workspaces/{workspace_id}/connections/{connection_id}"
tags: ["Connections"]
---

# Get a connection

`GET /v1/workspaces/{workspace_id}/connections/{connection_id}`

## Request

- Base URL: `https://api.stacksync.com`
- URL: `https://api.stacksync.com/v1/workspaces/{workspace_id}/connections/{connection_id}`
- Auth: HTTP bearer

One connection, with every sync, workflow, API proxy and scheduled task that uses it and whether it can be deleted. Never its credentials.

## Path parameters

- `workspace_id` integer, required
- `connection_id` string, uuid, required

## Query parameters

- `region` 'besg' | 'usnv', required: Region of the connection: besg or usnv

## Response `200`

OK

- ConnectionWithUsageResponse
  - `data` ConnectionWithUsage, required
    - `connection_id` string, required
    - `connection_name` string, required
    - `app_type` string, required: The type shown in Stacksync
    - `is_shared_with_workspace` boolean, required
    - `created_time` string, required: UTC, YYYY-MM-DD HH:MM:SS
    - `last_modified_time` string, required: UTC, YYYY-MM-DD HH:MM:SS
    - `credentials_options` object, required: The identifiers of the connection (instance_id, instance_url, shop_name, sub_domain...), never a secret
    - `connection_resource_id` string, nullable, required: The name workflow steps reference the connection by
    - `region` string, required
    - `needs_reauthorization` boolean, required: True when Stacksync marked the credentials invalid (the app refused to refresh them): reauthorize it in Stacksync. Credentials the app refuses on a read are reported by that read
    - `used_in_syncs` ConnectionSync[], required
      - `sync_id` string, required
      - `sync_name` string, required
    - `used_in_workflows` ConnectionWorkflow[], required
      - `workflow_id` string, required
      - `workflow_name` string, required
    - `used_in_api_proxies` ConnectionApiProxy[], required
      - `api_proxy_id` string, required
      - `api_proxy_name` string, required
    - `used_in_tasks` ConnectionTask[], required
      - `task_id` string, required
      - `task_name` string, required
      - `sync_id` string, nullable: The sync of the trigger this task runs, null for a scheduled task
      - `trigger_id` string, nullable: The sync trigger this task runs, null for a scheduled task
    - `can_delete` boolean, required: False while a sync, workflow, API proxy or task uses the connection

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found

---

[API](https://skmtc.dev/stacksync/apis/stacksync-api.md) - [All operations](https://skmtc.dev/stacksync/apis/stacksync-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stacksync/apis/stacksync-api/revisions/21f4ba4b214e?raw)
