# Get workflow run

> Source: https://truto.one/docs/api-reference/admin/workflowruns/get/

`GET /workflow-run/{id}`

Resource: **WorkflowRuns**

## Path parameters

- **`id`** _(string, required)_

## Response body

- **`id`** _(string)_
- **`workflow_id`** _(string)_
- **`environment_id`** _(string)_
- **`status`** _(string)_
  Allowed: `created`, `running`, `completed`, `failed`
- **`result`** _(object, required)_
  - **`steps`** _(array<object>)_
    - **`type`** _(string)_
    - **`action`** _(string)_
    - **`success`** _(boolean)_
    - **`error`** _(string)_
    - **`result`** _(object)_
  - **`success`** _(boolean)_
  - **`error`** _(string)_
- **`retry_attempt`** _(number)_
- **`created_at`** _(string)_
- **`updated_at`** _(string)_
- **`started_at`** _(string)_
- **`finished_at`** _(string)_

## Code examples

### curl

```bash
curl -X GET 'https://api.truto.one/workflow-run/{id}' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/workflow-run/{id}', {
  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/workflow-run/{id}"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

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

### Truto TS SDK

```typescript
import Truto from '@truto/truto-ts-sdk';

const truto = new Truto({
  token: '<your_api_token>',
});

const result = await truto.workflowRun.get('<id>');

console.log(result);
```

### Truto Python SDK

```python
import asyncio
from truto_python_sdk import TrutoApi

truto_api = TrutoApi(token="<your_api_token>")

async def main():
    result = await truto_api.workflow_runs.get("<id>")
    print(result)

asyncio.run(main())
```
