# dev.knotless.requestRerun

> Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk)

✓ This is the authoritative definition for this NSID.

## Description

Asks a repository's runners to run a ref's or a pull's workflows again, as the owner logged in to this appview's pages.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.requestRerun)
- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.requestRerun/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.requestRerun/examples)

## Definitions

### `dev.knotless.requestRerun`

**Type**: `procedure`

Writes a dev.knotless.rerun record, as `knotless rerun` does, in the account logged in to this appview's web pages, which must be the repository's owner: its runners run the ref, or the pull's head, again where it points when they read it. Name one ref or one pull. With workflow, only that one: of the pull's, or at the ref, one that runs on a push to it or whose trigger is to be asked for, its steps seeing env. Requires the session cookie the pages' login sets.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `env` | `array` | No | With a ref and a workflow, variables its steps see, over the workflow's own of the same names. |
| `pull` | `string` (at-uri) | No | Or the dev.knotless.pull record whose head to run. |
| `ref` | `string` | No | The ref to run: a branch or a tag by name, or in full. |
| `repo` | `string` (at-uri) | Yes | The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it. |
| `workflow` | `string` | No | The one workflow to run, by name. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | The dev.knotless.rerun record written. |

#### Errors

- **NotFound**: No such repository.
- **AuthenticationRequired**: No account is logged in to the pages, or its session has ended.
- **UpstreamFailure**: Nothing was asked, as the reason says: the account is not the owner, the repository names no runners, or what was named is not there.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Writes a dev.knotless.rerun record, as `knotless rerun` does, in the account logged in to this appview's web pages, which must be the repository's owner: its runners run the ref, or the pull's head, again where it points when they read it. Name one ref or one pull. With workflow, only that one: of the pull's, or at the ref, one that runs on a push to it or whose trigger is to be asked for, its steps seeing env. Requires the session cookie the pages' login sets.",
      "errors": [
        {
          "description": "No such repository.",
          "name": "NotFound"
        },
        {
          "description": "No account is logged in to the pages, or its session has ended.",
          "name": "AuthenticationRequired"
        },
        {
          "description": "Nothing was asked, as the reason says: the account is not the owner, the repository names no runners, or what was named is not there.",
          "name": "UpstreamFailure"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "env": {
              "description": "With a ref and a workflow, variables its steps see, over the workflow's own of the same names.",
              "items": {
                "ref": "dev.knotless.rerun#var",
                "type": "ref"
              },
              "maxLength": 32,
              "type": "array"
            },
            "pull": {
              "description": "Or the dev.knotless.pull record whose head to run.",
              "format": "at-uri",
              "type": "string"
            },
            "ref": {
              "description": "The ref to run: a branch or a tag by name, or in full.",
              "maxLength": 1024,
              "type": "string"
            },
            "repo": {
              "description": "The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.",
              "format": "at-uri",
              "type": "string"
            },
            "workflow": {
              "description": "The one workflow to run, by name.",
              "maxLength": 64,
              "type": "string"
            }
          },
          "required": [
            "repo"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "uri": {
              "description": "The dev.knotless.rerun record written.",
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "uri"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Asks a repository's runners to run a ref's or a pull's workflows again, as the owner logged in to this appview's pages.",
  "id": "dev.knotless.requestRerun",
  "lexicon": 1
}
```
