# at.happyproto.server.getJob

> One of the caller's own background jobs, such as the one a change to an instance started. Customers only.

- Kind: query
- Authority: server.happyproto.at
- Lexicon: 1
- Published by [happyproto.at](https://lexicon.garden/identity/did:plc:mo7vq4jbioxwafy5zkcc3eux), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.server.getJob)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.server.getJob/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.server.getJob/analytics)

## Query (`at.happyproto.server.getJob`)

Type: query · GET

### Parameters (query string)

- `id` (string, required): The job's UUID.

### Output (application/json)

- `job` (ref, required)
  - Reference: `#job`

### Errors

- `AuthRequired`: This endpoint requires an authenticated caller.
- `Forbidden`: The caller is not a HappyProto customer.
- `InvalidRequest`: id is not a UUID.
- `NotFound`: No such job, or the caller did not create it. The two are indistinguishable.

## #job (`at.happyproto.server.getJob#job`)

Type: object

A background job. Never carries its session fields.

### Properties

- `error` (string): Why the job failed. For an instance change, the operation's error code, then its message.
- `id` (string, required): A UUID.
- `progress` (unknown): The job's last progress report. For an instance change: {status, step?}, the operation's.
- `result` (unknown): What the job returned, once completed.
- `status` (string, required)
  - Constraints: knownValues: pending | running | paused | pausing | cancelling | completed | failed | cancelled

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "job": {
      "description": "A background job. Never carries its session fields.",
      "properties": {
        "error": {
          "description": "Why the job failed. For an instance change, the operation's error code, then its message.",
          "type": "string"
        },
        "id": {
          "description": "A UUID.",
          "type": "string"
        },
        "progress": {
          "description": "The job's last progress report. For an instance change: {status, step?}, the operation's.",
          "type": "unknown"
        },
        "result": {
          "description": "What the job returned, once completed.",
          "type": "unknown"
        },
        "status": {
          "knownValues": [
            "pending",
            "running",
            "paused",
            "pausing",
            "cancelling",
            "completed",
            "failed",
            "cancelled"
          ],
          "type": "string"
        }
      },
      "required": [
        "id",
        "status"
      ],
      "type": "object"
    },
    "main": {
      "description": "One of the caller's own background jobs, such as the one a change to an instance started. Customers only.",
      "errors": [
        {
          "description": "This endpoint requires an authenticated caller.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller is not a HappyProto customer.",
          "name": "Forbidden"
        },
        {
          "description": "id is not a UUID.",
          "name": "InvalidRequest"
        },
        {
          "description": "No such job, or the caller did not create it. The two are indistinguishable.",
          "name": "NotFound"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "job": {
              "ref": "#job",
              "type": "ref"
            }
          },
          "required": [
            "job"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "id": {
            "description": "The job's UUID.",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "at.happyproto.server.getJob",
  "lexicon": 1
}
```
