# Management apiEndpointsConnections

## Get connection

Returns the connection with the given ID.

### Request

```
GET `/v1/connections/{id}`
```

### [Authorization](/content/docs/management-api/endpoints/connections/get-connections-by-id#authorization/index.html)

`OAuth2 workspace:admin, offline_access`

**Authorization**  
`Bearer <token>`  
**In:** `header`  
**Scope:** `workspace:admin, offline_access`

### [Path Parameters](/content/docs/management-api/endpoints/connections/get-connections-by-id#path-parameters/index.html)

* `id`  
  Type: `string`  
  Match: `^(con_)?([cC][^\s-]{8,}|[a-z0-9]+)$`

### [Response Body](/content/docs/management-api/endpoints/connections/get-connections-by-id#response-body/index.html)

#### Success Response

**200**  `application/json`

```json
{
  "data": {
    "id": "string",
    "type": "connection",
    "url": "http://example.com",
    "name": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "kind": "postgres",
    "endpoints": {
      "direct": {
        "host": "string",
        "port": 0
      },
      "pooled": {
        "host": "string",
        "port": 0
      },
      "accelerate": {
        "host": "string",
        "port": 0
      }
    },
    "directConnection": {
      "host": "string",
      "pass": "string",
      "user": "string"
    },
    "database": {
      "id": "string",
      "url": "http://example.com",
      "name": "string"
    }
  }
}
```

#### Error Response

**401**  `application/json`

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "hint": "string"
  }
}
```

**404**  `application/json`

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "hint": "string"
  }
}
```
