# town.delve.video.abortUpload

> Published by [delve.town](https://lexicon.garden/identity/did:plc:qzqct2rrq4u2gmy5g3mjxske)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.video.abortUpload)
- [Documentation](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.video.abortUpload/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.video.abortUpload/examples)

## Definitions

### `town.delve.video.abortUpload`

**Type**: `procedure`

Abort an upload only while it is created, releasing its quota reservation immediately. Terminal sessions are unchanged and return their terminal outcome. A finishing session returns UploadNotReady.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `jobId` | `string` | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `completedJobId` | `string` | No | Present only when state is completed. |
| `failureReason` | `string` | No | Present only when state is failed. |
| `state` | `string` | Yes |  |

#### Errors

- **UploadNotFound**: The job ID is unknown or aged out of retention; known terminal sessions return their outcome and are never reported as not found.
- **UploadNotReady**: A finish is in progress; check getUploadStatus and retry.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Abort an upload only while it is created, releasing its quota reservation immediately. Terminal sessions are unchanged and return their terminal outcome. A finishing session returns UploadNotReady.",
      "errors": [
        {
          "description": "The job ID is unknown or aged out of retention; known terminal sessions return their outcome and are never reported as not found.",
          "name": "UploadNotFound"
        },
        {
          "description": "A finish is in progress; check getUploadStatus and retry.",
          "name": "UploadNotReady"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "jobId": {
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "jobId"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "completedJobId": {
              "description": "Present only when state is completed.",
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            },
            "failureReason": {
              "description": "Present only when state is failed.",
              "maxLength": 1024,
              "type": "string"
            },
            "state": {
              "knownValues": [
                "aborted",
                "completed",
                "failed",
                "expired"
              ],
              "maxLength": 32,
              "type": "string"
            }
          },
          "required": [
            "state"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "town.delve.video.abortUpload",
  "lexicon": 1
}
```
