# org.tangled.ci.subscribePipelineLogs

> Pipeline logs stream

- Kind: subscription
- Authority: ci.tangled.org
- Lexicon: 1
- Published by [tangled.org](https://lexicon.garden/identity/did:plc:wshs7t2adsemcrrd4snkeqli), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.ci.subscribePipelineLogs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.ci.subscribePipelineLogs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.ci.subscribePipelineLogs/analytics)

## Subscription (`org.tangled.ci.subscribePipelineLogs`)

Type: subscription · WebSocket

### Parameters (query string)

- `pipeline` (string, required): Pipeline ID
- `repo` (string · did, required): Repository DID
- `workflows` (array): filter logs by specific workflows
  - `items` (string): Workflow name

### Messages (DAG-CBOR frames)

- `#control` (object)
- `#data` (object)

### Errors

- `PipelineNotFound`: Pipeline not found
- `WorkflowNotFound`: Workflow not found
- `InvalidRequest`: Invalid request parameters

## #control (`org.tangled.ci.subscribePipelineLogs#control`)

Type: object

### Properties

- `command` (string): Step command
- `content` (string, required)
- `kind` (string): Step kind
  - Constraints: enum: system | user
- `outcome` (string): How the step ended, only set on end frames for steps that can fail
  - Constraints: enum: success | failed
- `status` (string): Step status
  - Constraints: enum: start | end
- `step` (integer, required): Step ID
- `time` (string · datetime, required)
- `workflow` (string, required): workflow name

## #data (`org.tangled.ci.subscribePipelineLogs#data`)

Type: object

### Properties

- `content` (string, required)
- `step` (integer, required): Step ID
- `stream` (string, required)
  - Constraints: enum: stdout | stderr
- `time` (string · datetime, required)
- `workflow` (string, required): workflow name

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "control": {
      "properties": {
        "command": {
          "description": "Step command",
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "kind": {
          "description": "Step kind",
          "enum": [
            "system",
            "user"
          ],
          "type": "string"
        },
        "outcome": {
          "description": "How the step ended, only set on end frames for steps that can fail",
          "enum": [
            "success",
            "failed"
          ],
          "type": "string"
        },
        "status": {
          "description": "Step status",
          "enum": [
            "start",
            "end"
          ],
          "type": "string"
        },
        "step": {
          "description": "Step ID",
          "type": "integer"
        },
        "time": {
          "format": "datetime",
          "type": "string"
        },
        "workflow": {
          "description": "workflow name",
          "type": "string"
        }
      },
      "required": [
        "time",
        "workflow",
        "step",
        "content"
      ],
      "type": "object"
    },
    "data": {
      "properties": {
        "content": {
          "type": "string"
        },
        "step": {
          "description": "Step ID",
          "type": "integer"
        },
        "stream": {
          "enum": [
            "stdout",
            "stderr"
          ],
          "type": "string"
        },
        "time": {
          "format": "datetime",
          "type": "string"
        },
        "workflow": {
          "description": "workflow name",
          "type": "string"
        }
      },
      "required": [
        "time",
        "workflow",
        "step",
        "content",
        "stream"
      ],
      "type": "object"
    },
    "main": {
      "description": "Pipeline logs stream",
      "errors": [
        {
          "description": "Pipeline not found",
          "name": "PipelineNotFound"
        },
        {
          "description": "Workflow not found",
          "name": "WorkflowNotFound"
        },
        {
          "description": "Invalid request parameters",
          "name": "InvalidRequest"
        }
      ],
      "message": {
        "schema": {
          "refs": [
            "#control",
            "#data"
          ],
          "type": "union"
        }
      },
      "parameters": {
        "properties": {
          "pipeline": {
            "description": "Pipeline ID",
            "type": "string"
          },
          "repo": {
            "description": "Repository DID",
            "format": "did",
            "type": "string"
          },
          "workflows": {
            "description": "filter logs by specific workflows",
            "items": {
              "description": "Workflow name",
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "repo",
          "pipeline"
        ],
        "type": "params"
      },
      "type": "subscription"
    }
  },
  "id": "org.tangled.ci.subscribePipelineLogs",
  "lexicon": 1
}
```
