# List Workflows

### Endpoint

**POST** `/api/workflows/list`

### Authentication

This endpoint requires API Key authentication via the Authorization header.

### Headers

| Header          | Required | Description                    |
| --------------- | -------- | ------------------------------ |
| `Authorization` | Yes      | Bearer token with your API key |
| `Content-Type`  | Yes      | Must be `application/json`     |
| `Accept`        | Yes      | Must be `application/json`     |

### Request Body

This endpoint does not require a request body for the POST method.

**Field Descriptions**

| Field                    | Type        | Description                                                    |
| ------------------------ | ----------- | -------------------------------------------------------------- |
| `workflows`              | array       | Array of workflow objects                                      |
| `id`                     | string      | Unique workflow identifier (UUID)                              |
| `name`                   | string      | Workflow name                                                  |
| `description`            | string      | Workflow description                                           |
| `created_by`             | string      | Email of the workflow creator                                  |
| `creation_time`          | string      | Workflow creation timestamp (ISO 8601)                         |
| `triggers`               | array       | Array of trigger configurations                                |
| `triggers[].type`        | string      | Trigger type (e.g., `"alert"`)                                 |
| `interval`               | number      | Execution interval (typically 0 for alert-triggered workflows) |
| `last_execution_time`    | string/null | Last execution timestamp                                       |
| `last_execution_status`  | string/null | Last execution status (`"success"`, `"error"`, etc.)           |
| `providers`              | array       | Array of integration provider configurations                   |
| `providers[].type`       | string      | Provider type (see provider types below)                       |
| `providers[].id`         | string/null | Provider configuration ID                                      |
| `providers[].name`       | string      | Provider display name                                          |
| `providers[].installed`  | boolean     | Whether provider is installed and configured                   |
| `workflow_raw_id`        | string      | Raw workflow identifier                                        |
| `workflow_raw`           | string      | Complete YAML workflow definition                              |
| `revision`               | number      | Workflow version number                                        |
| `last_updated`           | string      | Last update timestamp (ISO 8601)                               |
| `invalid`                | boolean     | Whether workflow configuration is invalid                      |
| `last_execution_started` | string/null | When last execution started                                    |

### Examples

#### Basic Request

Get all workflows:

```bash
curl -L \
  --request POST \
  --url 'https://api.groundcover.com/api/workflows/list' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Accept: */*'
```

#### Response Example

```json
{
  "workflows": [
    {
      "id": "12345678-1234-1234-1234-123456789abc",
      "name": "ms-teams-alerts-workflow",
      "description": "Sends an API to MS Teams alerts endpoint",
      "created_by": "user@company.com",
      "creation_time": "2025-07-02T09:42:13.334103Z",
      "triggers": [
        {
          "type": "alert"
        }
      ],
      "interval": 0,
      "last_execution_time": null,
      "last_execution_status": null,
      "providers": [
        {
          "type": "webhook",
          "id": "provider123456789abcdef",
          "name": "teams-integration",
          "installed": true
        },
        {
          "type": "webhook",
          "id": null,
          "name": "backup-teams-integration",
          "installed": false
        }
      ],
      "workflow_raw_id": "teams-webhook",
      "workflow_raw": "id: teams-webhook\ndescription: Sends an API to MS Teams alerts endpoint\ntriggers:\n- type: alert\n  filters:\n  - key: annotations.ms-teams-alerts-workflow\n    value: enabled\nname: ms-teams-alerts-workflow\n...",
      "revision": 11,
      "last_updated": "2025-07-03T08:57:09.881806Z",
      "invalid": false,
      "last_execution_started": null
    },
    {
      "id": "87654321-4321-4321-4321-987654321def",
      "name": "webhook-alerts-workflow",
      "description": "Workflow for sending alerts to custom webhook",
      "created_by": "admin@company.com",
      "creation_time": "2025-06-19T12:49:37.630392Z",
      "triggers": [
        {
          "type": "alert"
        }
      ],
      "interval": 0,
      "last_execution_time": null,
      "last_execution_status": null,
      "providers": [
        {
          "type": "webhook",
          "id": "webhook987654321fedcba",
          "name": "custom-webhook",
          "installed": true
        }
      ],
      "workflow_raw_id": "webhook-alerts",
      "workflow_raw": "id: webhook-alerts\ndescription: Workflow for sending alerts to custom webhook\n...",
      "revision": 2,
      "last_updated": "2025-06-19T12:51:24.643393Z",
      "invalid": false,
      "last_execution_started": null
    }
  ]
}
```
