# Get workflow

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

`GET /workflow/{id}`

Resource: **Workflows**

## Path parameters

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

## Response body

- **`id`** _(string)_
- **`environment_id`** _(string)_
- **`trigger_name`** _(string)_
- **`config`** _(object, required)_
  Workflow execution configuration.
  - **`run_if`** _(string)_
    JSONata condition evaluated before executing workflow steps.
  - **`steps`** _(array<object>)_
    - **`type`** _(string)_
      Step execution type.
      Allowed: `run`
    - **`action`** _(string)_
      Action executed by the step.
    - **`cron_expression`** _(string)_
      Optional cron expression for scheduled execution.
    - **`config`** _(string)_
      JSONata expression evaluated at runtime to generate the step execution payload.
- **`created_at`** _(string)_
- **`updated_at`** _(string)_

## Code examples

### curl

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

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/workflow/{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/{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.workflow.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.workflows.get("<id>")
    print(result)

asyncio.run(main())
```
