# technology.agave.marketplace.getVersion

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

- Kind: query
- Authority: marketplace.agave.technology
- Lexicon: 1
- Published by [catalogue.agave.technology](https://lexicon.garden/identity/did:plc:jgjchylj237en76b3hi2xu4g), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:jgjchylj237en76b3hi2xu4g/technology.agave.marketplace.getVersion)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:jgjchylj237en76b3hi2xu4g/technology.agave.marketplace.getVersion/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:jgjchylj237en76b3hi2xu4g/technology.agave.marketplace.getVersion/analytics)

## Query (`technology.agave.marketplace.getVersion`)

Type: query · GET

### Parameters (query string)

- `author` (string · at-identifier, required)
- `slug` (string, required)
  - Constraints: maxLength: 40
- `version` (string): MAJOR.MINOR.PATCH; a whole number N means N.0.0. Absent: the newest published version, comparing MAJOR, then MINOR, then PATCH as numbers.
  - Constraints: maxLength: 20

### Output (application/json)

- `author` (ref, required)
  - Reference: `technology.agave.marketplace.defs#actorView`
- `cid` (string · cid, required)
- `indexedAt` (string · datetime, required)
- `pds` (string · uri, required): The author's PDS as of indexing, which serves the archive at com.atproto.sync.getBlob.
- `record` (unknown, required): The technology.agave.blockVersion record as its repository signed it. Its archive names the blob by CID.
- `uri` (string · at-uri, required)
- `uses` (integer, required)
  - Constraints: minimum: 0
- `verified` (boolean, required): 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.

## 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": "MAJOR.MINOR.PATCH; a whole number N means N.0.0. Absent: the newest published version, comparing MAJOR, then MINOR, then PATCH as numbers.",
            "maxLength": 20,
            "type": "string"
          }
        },
        "required": [
          "author",
          "slug"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "technology.agave.marketplace.getVersion",
  "lexicon": 1
}
```
