# List sync job run states

> Source: https://truto.one/docs/api-reference/admin/sync-job-run-state/list/

`GET /sync-job-run-state`

Resource: **Sync Job Run State**

## Query parameters

- **`state_key`** _(string, required)_
  The state_key attribute found in a sync job run and defined in the sync job. Used as a namespace for the states.

## Response body

- **`result`** _(array<object>)_
  - **`key`** _(string)_
    The key identifier for this state.
  - **`value`** _(string)_
    The state value stored.
  - **`created_at`** _(string)_
    Timestamp when the state was created.
  - **`updated_at`** _(string)_
    Timestamp when the state was last updated.
  - **`sync_job_run_id`** _(string)_
    The ID of the sync job run this state is associated with (optional).

## Code examples

### curl

```bash
curl -X GET 'https://api.truto.one/sync-job-run-state' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/sync-job-run-state', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

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

### Python

```python
import requests

url = "https://api.truto.one/sync-job-run-state"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

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