# org.tangled.ci.queryPipelines

> Query pipelines in a git repository

- Kind: query
- 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.queryPipelines)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.ci.queryPipelines/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.ci.queryPipelines/analytics)

## Query (`org.tangled.ci.queryPipelines`)

Type: query · GET

### Parameters (query string)

- `commits` (array): Filter pipelines by commit ids.
  - `items` (string): commit id (SHA-1 or SHA-256)
    - Constraints: maxLength: 64
- `cursor` (string): Pagination cursor
- `limit` (integer): Maximum number of pipelines to return
  - Constraints: minimum: 1, maximum: 250, default: 50
- `repo` (string · did, required): DID of the repository
- `triggers` (array): Filter pipelines by trigger kind. When provided, pipelines matching any listed kind are returned; when omitted, every kind is returned.
  - `items` (string)
    - Constraints: knownValues: org.tangled.event.push | org.tangled.event.pullRequest | org.tangled.ci.trigger.manual | org.tangled.ci.trigger.schedule

### Output (application/json)

- `cursor` (string)
- `pipelines` (array, required)
  - `items` (ref)
    - Reference: `org.tangled.ci.defs#pipeline`
- `total` (integer, required): Number of matching pipelines

### Errors

- `InvalidRequest`: Invalid request parameters
- `RepoNotFound`: Repository not found

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Query pipelines in a git repository",
      "errors": [
        {
          "description": "Invalid request parameters",
          "name": "InvalidRequest"
        },
        {
          "description": "Repository not found",
          "name": "RepoNotFound"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "pipelines": {
              "items": {
                "ref": "org.tangled.ci.defs#pipeline",
                "type": "ref"
              },
              "type": "array"
            },
            "total": {
              "description": "Number of matching pipelines",
              "type": "integer"
            }
          },
          "required": [
            "total",
            "pipelines"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "commits": {
            "description": "Filter pipelines by commit ids.",
            "items": {
              "description": "commit id (SHA-1 or SHA-256)",
              "maxLength": 64,
              "type": "string"
            },
            "type": "array"
          },
          "cursor": {
            "description": "Pagination cursor",
            "type": "string"
          },
          "limit": {
            "default": 50,
            "description": "Maximum number of pipelines to return",
            "maximum": 250,
            "minimum": 1,
            "type": "integer"
          },
          "repo": {
            "description": "DID of the repository",
            "format": "did",
            "type": "string"
          },
          "triggers": {
            "description": "Filter pipelines by trigger kind. When provided, pipelines matching any listed kind are returned; when omitted, every kind is returned.",
            "items": {
              "knownValues": [
                "org.tangled.event.push",
                "org.tangled.event.pullRequest",
                "org.tangled.ci.trigger.manual",
                "org.tangled.ci.trigger.schedule"
              ],
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "repo"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "org.tangled.ci.queryPipelines",
  "lexicon": 1
}
```
