# at.happyproto.registry.retryVersion

> Published by [happyproto.at](https://lexicon.garden/identity/did:plc:mo7vq4jbioxwafy5zkcc3eux)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.registry.retryVersion)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.registry.retryVersion/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.registry.retryVersion/examples)

## Definitions

### `at.happyproto.registry.retryVersion`

**Type**: `procedure`

Copy a version's blobs into the registry again, after an earlier copy failed. Only the registry's own account may call this. The copy is enqueued for any indexed version and fetches only what is not held yet, so an available version whose optional images failed can be retried. For a version deleted at its source, the copy keeps whatever blobs the publisher's PDS still serves, so instances that installed it can keep loading it by CID, but the version stays deletedAtSource and is never made available. For such a version, a blob that cannot be fetched, whether it is missing or the fetch failed transiently, is recorded in `failed` and not retried automatically; call retryVersion again.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes | The publisher. |
| `name` | `string` | Yes | The project's name, which is the record key of its software.release.project: 1 to 64 lowercase letters, digits and interior hyphens. |
| `version` | `string` | Yes | A semver version without build metadata, with an optional lowercase prerelease, such as `1.2.0` or `1.2.0-beta.1`. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `availability` | `string` | Yes | The version's availability when the retry was asked for. The copy runs afterwards, so this does not yet reflect it. |

#### Errors

- **AuthRequired**: The caller's identity could not be determined, so there is no repo to write to.
- **NotConfigured**: The registry has no identity configured. An operator problem, not a caller's.
- **InvalidRecord**: The input breaks a rule the registry applies, so it would refuse the records. The message names the field.
- **Upstream**: A record could not be written to the caller's repo. Records written before the failure stay, and the same call can be made again.
- **VersionNotFound**: No version of that project is indexed at that version string.
- **Forbidden**: Only the registry's own account may retry a copy.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Copy a version's blobs into the registry again, after an earlier copy failed. Only the registry's own account may call this. The copy is enqueued for any indexed version and fetches only what is not held yet, so an available version whose optional images failed can be retried. For a version deleted at its source, the copy keeps whatever blobs the publisher's PDS still serves, so instances that installed it can keep loading it by CID, but the version stays deletedAtSource and is never made available. For such a version, a blob that cannot be fetched, whether it is missing or the fetch failed transiently, is recorded in `failed` and not retried automatically; call retryVersion again.",
      "errors": [
        {
          "description": "The caller's identity could not be determined, so there is no repo to write to.",
          "name": "AuthRequired"
        },
        {
          "description": "The registry has no identity configured. An operator problem, not a caller's.",
          "name": "NotConfigured"
        },
        {
          "description": "The input breaks a rule the registry applies, so it would refuse the records. The message names the field.",
          "name": "InvalidRecord"
        },
        {
          "description": "A record could not be written to the caller's repo. Records written before the failure stay, and the same call can be made again.",
          "name": "Upstream"
        },
        {
          "description": "No version of that project is indexed at that version string.",
          "name": "VersionNotFound"
        },
        {
          "description": "Only the registry's own account may retry a copy.",
          "name": "Forbidden"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "did": {
              "description": "The publisher.",
              "format": "did",
              "type": "string"
            },
            "name": {
              "description": "The project's name, which is the record key of its software.release.project: 1 to 64 lowercase letters, digits and interior hyphens.",
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            },
            "version": {
              "description": "A semver version without build metadata, with an optional lowercase prerelease, such as `1.2.0` or `1.2.0-beta.1`.",
              "maxLength": 64,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "did",
            "name",
            "version"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "availability": {
              "description": "The version's availability when the retry was asked for. The copy runs afterwards, so this does not yet reflect it.",
              "knownValues": [
                "pending",
                "available",
                "deletedAtSource"
              ],
              "type": "string"
            }
          },
          "required": [
            "availability"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "at.happyproto.registry.retryVersion",
  "lexicon": 1
}
```
