# org.tangled.ci.retryPipeline

> Duplicate existing pipeline for rerun.

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

## Procedure (`org.tangled.ci.retryPipeline`)

Type: procedure · POST

### Input (application/json)

- `pipeline` (string · record-key, required): pipeline id
- `repo` (string · did, required): git repository DID
- `workflows` (array): Workflow names to filter. When not provided, entire pipeline will be duplicated.
  - `items` (string): workflow name

### Output (application/json)

- `pipeline` (string · record-key, required): Scheduled pipeline id

### Errors

- `PipelineNotFound`: Pipeline not found
- `PipelineNotRetryable`: Pipeline is still blocked or has no stored spec to rerun

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Duplicate existing pipeline for rerun.",
      "errors": [
        {
          "description": "Pipeline not found",
          "name": "PipelineNotFound"
        },
        {
          "description": "Pipeline is still blocked or has no stored spec to rerun",
          "name": "PipelineNotRetryable"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "pipeline": {
              "description": "pipeline id",
              "format": "record-key",
              "type": "string"
            },
            "repo": {
              "description": "git repository DID",
              "format": "did",
              "type": "string"
            },
            "workflows": {
              "description": "Workflow names to filter. When not provided, entire pipeline will be duplicated.",
              "items": {
                "description": "workflow name",
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "repo",
            "pipeline"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "pipeline": {
              "description": "Scheduled pipeline id",
              "format": "record-key",
              "type": "string"
            }
          },
          "required": [
            "pipeline"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "org.tangled.ci.retryPipeline",
  "lexicon": 1
}
```
