> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runalloy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Basic Debugging

## Managing Errors

When workflows error unexpectedly, we provide several methods to help you identify what went wrong. You can access workflow logs via the Error Logging API, receive errors in real-time to your API, or stream error logs via our AWS EventBridge integration.

### Retrieve Logs for a Single Workflow

Use the `GET /2024-03/workflow/{workflowId}/logs` endpoint to retrieve log data for a given workflow. Each log includes the `executionId` (which can be used to rerun an execution), the `startedAt` and `stoppedAt` date stamps, and the JSON output of the execution.

**Endpoint**

```
GET https://embedded.runalloy.com/{VERSION}/workflow/{workflowId}/logs
```

**Sample Request**

```bash cURL theme={null}
curl -X GET 'https://embedded.runalloy.com/2024-03/workflow/{workflowId}/logs' \
  -H 'Accept: application/json' \
  -H 'Authorization: bearer YOUR_API_KEY'
```

**Sample Response**

```json JSON theme={null}
{
  "data": [
    {
      "executionId": "6daaa0cf1a3daa6c41b5-ef",
      "startedAt": "2022-10-04T01:12:40.406Z",
      "stoppedAt": "2022-10-04T01:12:59.508Z",
      "status": "success",
      "results": [
        {
          "blockId": "f2eb053c-d04a-1a6c-8cd1-dbd6b8d016d0",
          "startedAt": "2022-10-04T01:12:40.406Z",
          "stoppedAt": "2022-10-04T01:12:40.782Z",
          "data": [
            {
              "json": {
                "body": {
                  "brandValue": "Order Placed"
                }
              },
              "meta": {
                "url": "embedded.runalloy.com",
                "x-request-id": "0a2253180d67dd23f96d81f49bac",
                "x-real-ip": "00.118.107.70",
                "x-forwarded-for": "00.118.107.70",
                "x-forwarded-host": "embedded.runalloy.com",
                "x-forwarded-port": "80",
                "x-forwarded-proto": "http",
                "x-forwarded-scheme": "http",
                "x-scheme": "http",
                "content-length": "1809",
                "content-type": "application/x-www-form-urlencoded; charset=utf-8; boundary=1-dsDx0TBzB4bDi3maDvCe",
                "user-agent": "PostmanRuntime/7.28.4",
                "postman-token": "c6c95c92-ebed-4ade-bdcd-b49f97d7a6c5",
                "cache-control": "no-cache",
                "accept-encoding": "gzip, deflate, br"
              }
            }
          ],
          "id": "0ab1892x-d28e-443b-a03b-20efbedc4c5"
        }
      ]
    }
  ]
}
```

### AWS EventBridge

The platform also supports direct integration with AWS EventBridge for streaming error logs. To enable this feature:

1. Navigate to the AWS EventBridge connection in Settings
2. Enter your AWS keys (securely encrypted)
3. Enter your Event Bus Name and save

Once enabled, error logs will automatically stream to AWS. You can disable this feature at any time by toggling the EventBridge connector off.
