# List workflows

> The workflows of the workspace the caller sees on the web app's Resources page (their own and those shared with the workspace), newest first, one page per region (or of the region asked for). Optionally only the workflows directly in a folder, or those whose name or id contains a text.

Source: https://docs.stacksync.com/api-reference/workflows/list_workflows

`GET https://api.stacksync.com/v1/workspaces/{workspace_id}/workflows/`

- Operation: `list_workflows`
- Resource: Workflows
- Access: read-only

## Authentication

- `Authorization: Bearer <key>`: A workspace API key (workspace_…, created by a workspace owner under Workspace settings > Stacksync API) acts with editor rights on that workspace only; a user API key (user_…, created under Profile > Stacksync API) acts as that user in every workspace they belong to. POST, PUT and PATCH requests must send Content-Type: application/json. Every authentication failure answers 403.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | integer | Yes | The workspace. List the ones your key can reach with GET /v1/workspaces. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `region` | string (besg \| usnv) \| null | No | Region to filter workflows by. If not provided, all regions will be included. |
| `offset` | integer \| null, default 0 | No | Offset for pagination. Used to skip a number of workflows. |
| `limit` | integer, 1 to 200, default 20 | No | Maximum number of workflows of each region, at most 200 |
| `folder_id` | string \| null, at least 1 characters | No | Only the workflows directly in this folder |
| `search` | string \| null, 1 to 200 characters | No | Only the workflows whose name, id or resource id contains this text |

## Returns

### 200 OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `workflows` | array of object (WorkflowListItem) | Yes |  |
| `workflows[].workflow_id` | string | Yes |  |
| `workflows[].workflow_name` | string | Yes |  |
| `workflows[].workflow_resource_id` | string | Yes |  |
| `workflows[].workflow_status` | string (running \| paused \| deleted) | Yes |  |
| `workflows[].workspace_id` | integer | Yes |  |
| `workflows[].is_shared_with_workspace` | boolean \| null | No |  |
| `workflows[].module_app_type_display_list` | array of string \| null | No |  |
| `workflows[].parent_folders` | array of object (ParentFolderModel) \| null | No |  |
| `workflows[].parent_folders[].parent_folder_id` | string (uuid4) | Yes |  |
| `workflows[].parent_folders[].type` | string (primary \| shortcut) | Yes |  |
| `workflows[].created_by` | integer | Yes |  |
| `workflows[].created_time` | string | Yes |  |
| `workflows[].last_modified_by` | integer | Yes |  |
| `workflows[].last_modified_time` | string | Yes |  |
| `workflows[].region` | string (besg \| usnv) | Yes |  |

## Example request

```bash
curl -X GET "https://api.stacksync.com/v1/workspaces/{workspace_id}/workflows/" \
  -H "Authorization: Bearer $STACKSYNC_API_KEY"
```

## Example response (200)

```json
{
  "workflows": [
    {
      "workflow_id": "<workflow_id>",
      "workflow_name": "<workflow_name>",
      "workflow_resource_id": "<workflow_resource_id>",
      "workflow_status": "running",
      "workspace_id": 0,
      "is_shared_with_workspace": false,
      "module_app_type_display_list": [
        "<module_app_type_display_list>"
      ],
      "parent_folders": [
        {
          "parent_folder_id": "3f6c1d2e-8a4b-4c7d-9e21-5b6f7a8c9d01",
          "type": "primary"
        }
      ],
      "created_by": 0,
      "created_time": "<created_time>",
      "last_modified_by": 0,
      "last_modified_time": "<last_modified_time>",
      "region": "besg"
    }
  ]
}
```

## Errors

| Status | Meaning | Body |
| --- | --- | --- |
| 400 | Bad Request | `{ "error": string }` |
| 403 | Forbidden | `{ "error": string }` |
| 404 | Not Found | `{ "error": string }` |
| 422 | Unprocessable Content | `{ "error": string }` |

## Related

- [API Reference overview](https://docs.stacksync.com/api-reference): base URLs, regions, pagination, idempotency and errors
- [Authentication](https://docs.stacksync.com/api-reference/authentication): API keys and the 403 answers
- OpenAPI document: https://docs.stacksync.com/openapi.json
- [List workflow versions](https://docs.stacksync.com/api-reference/workflows/list_workflow_versions)
- [Get workflow](https://docs.stacksync.com/api-reference/workflows/get_workflow)
- [Get workflow info](https://docs.stacksync.com/api-reference/workflows/get_workflow_info)
- [Create workflow](https://docs.stacksync.com/api-reference/workflows/create_workflow)
- [Create workflow draft](https://docs.stacksync.com/api-reference/workflows/create_workflow_draft)
- [Update workflow](https://docs.stacksync.com/api-reference/workflows/update_workflow)
- [Update workflow options](https://docs.stacksync.com/api-reference/workflows/update_workflow_options)
- [Delete workflow](https://docs.stacksync.com/api-reference/workflows/delete_workflow)
- [Run workflow](https://docs.stacksync.com/api-reference/workflows/run_workflow)
- [Deploy workflow](https://docs.stacksync.com/api-reference/workflows/deploy_workflow)
- [Duplicate workflow](https://docs.stacksync.com/api-reference/workflows/duplicate_workflow)
- [Save workflow draft](https://docs.stacksync.com/api-reference/workflows/save_workflow_draft)
- [Check a workflow email alias](https://docs.stacksync.com/api-reference/workflows/check_workflow_email_alias)