# List connection variables

> Source: https://elaichi.ai/docs/api-reference/connections/connection/listconnectionvariables/

`GET /connection/{id}/variables`

Resource: **Connection** · API: **Connections**

## Path parameters

- **`id`** _(string, required)_
  Connection id (`conn_…`).

## Response body

- **`result`** _(array<object>)_
  - **`name`** _(string)_
    Top-level context key; rows sort and page over it.
  - **`value`** _(unknown)_
    The customer-set value in its real shape — object, array or scalar. `null` when `is_secret` is true; inside objects, withheld leaves are absent rather than nulled or masked, so absence is the only shape that cannot lie.
  - **`is_secret`** _(boolean)_
    Saffron's verdict, not a key-name guess; the value ships as `null`.
  - **`has_secrets`** _(boolean)_
    A leaf at or under this key was withheld — true for a secret key itself, and for a public object one of whose leaves was stripped.
- **`next_cursor`** _(string,null)_
- **`prev_cursor`** _(string,null)_

## Code examples

### curl

```bash
curl -X GET 'https://api.elaichi.ai/connection/<id>/variables' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.elaichi.ai/connection/<id>/variables', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/connection/<id>/variables"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())
```
