# technology.agave.marketplace.getVersion

> Published by [catalogue.agave.technology](https://lexicon.garden/identity/did:plc:jgjchylj237en76b3hi2xu4g)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:jgjchylj237en76b3hi2xu4g/technology.agave.marketplace.getVersion)
- [Documentation](https://lexicon.garden/lexicon/did:plc:jgjchylj237en76b3hi2xu4g/technology.agave.marketplace.getVersion/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:jgjchylj237en76b3hi2xu4g/technology.agave.marketplace.getVersion/examples)

## Definitions

### `technology.agave.marketplace.getVersion`

**Type**: `query`

Resolve a version to its record and where its archive is.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `author` | `string` (at-identifier) | Yes |  |
| `slug` | `string` | Yes |  |
| `version` | `integer` | No | Absent: the newest published version. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `author` | `ref` → `technology.agave.marketplace.defs#actorView` | Yes |  |
| `cid` | `string` (cid) | Yes |  |
| `indexedAt` | `string` (datetime) | Yes |  |
| `pds` | `string` (uri) | Yes | The author's PDS as of indexing, which serves the archive at com.atproto.sync.getBlob. |
| `record` | `unknown` | Yes | The technology.agave.blockVersion record as its repository signed it. Its archive names the blob by CID. |
| `uri` | `string` (at-uri) | Yes |  |
| `uses` | `integer` | Yes |  |
| `verified` | `boolean` | Yes | The marketplace's operator vouches for this version's author. |

#### Errors

- **VersionNotFound**: The author never published this version, or no version of the slug.
- **VersionWithdrawn**: The version was published and its record is deleted since. Without a version: every version of the slug is.
- **ActorNotFound**: The author's handle does not resolve.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Resolve a version to its record and where its archive is.",
      "errors": [
        {
          "description": "The author never published this version, or no version of the slug.",
          "name": "VersionNotFound"
        },
        {
          "description": "The version was published and its record is deleted since. Without a version: every version of the slug is.",
          "name": "VersionWithdrawn"
        },
        {
          "description": "The author's handle does not resolve.",
          "name": "ActorNotFound"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "author": {
              "ref": "technology.agave.marketplace.defs#actorView",
              "type": "ref"
            },
            "cid": {
              "format": "cid",
              "type": "string"
            },
            "indexedAt": {
              "format": "datetime",
              "type": "string"
            },
            "pds": {
              "description": "The author's PDS as of indexing, which serves the archive at com.atproto.sync.getBlob.",
              "format": "uri",
              "type": "string"
            },
            "record": {
              "description": "The technology.agave.blockVersion record as its repository signed it. Its archive names the blob by CID.",
              "type": "unknown"
            },
            "uri": {
              "format": "at-uri",
              "type": "string"
            },
            "uses": {
              "minimum": 0,
              "type": "integer"
            },
            "verified": {
              "description": "The marketplace's operator vouches for this version's author.",
              "type": "boolean"
            }
          },
          "required": [
            "uri",
            "cid",
            "author",
            "record",
            "pds",
            "indexedAt",
            "uses",
            "verified"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "author": {
            "format": "at-identifier",
            "type": "string"
          },
          "slug": {
            "maxLength": 40,
            "type": "string"
          },
          "version": {
            "description": "Absent: the newest published version.",
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "author",
          "slug"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "technology.agave.marketplace.getVersion",
  "lexicon": 1
}
```
