# com.emdashcms.experimental.aggregator.getLatestRelease

> Published by [emdashcms.com](https://lexicon.garden/identity/did:plc:ilznslhspsvk6naatedr66pi)

✓ This is the authoritative definition for this NSID.

## Description

Get the latest release for a package: the highest semver version among non-tombstoned, non-yanked releases. EXPERIMENTAL.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ilznslhspsvk6naatedr66pi/com.emdashcms.experimental.aggregator.getLatestRelease)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ilznslhspsvk6naatedr66pi/com.emdashcms.experimental.aggregator.getLatestRelease/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ilznslhspsvk6naatedr66pi/com.emdashcms.experimental.aggregator.getLatestRelease/examples)

## Definitions

### `com.emdashcms.experimental.aggregator.getLatestRelease`

**Type**: `query`

Returns the aggregator's view of the latest release for a package, including the signed release record, artifact cache services, and hydrated labels. The latest release is the highest semver version (full precedence rules, not lexicographic) excluding any release tombstoned by the publisher or labelled with a hard-enforcement label by a trusted labeller the request accepts. Returns NotFound if there are no eligible releases.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes | Publisher DID. |
| `package` | `string` | Yes | Parent package slug. |

#### Output

**Encoding**: `application/json`

#### Errors

- **NotFound**: No eligible release for the given (did, package).
- **ListingUnavailable**: The package is indexed but has no release revision available under the aggregator's listing policy. No publisher-controlled content is returned.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Returns the aggregator's view of the latest release for a package, including the signed release record, artifact cache services, and hydrated labels. The latest release is the highest semver version (full precedence rules, not lexicographic) excluding any release tombstoned by the publisher or labelled with a hard-enforcement label by a trusted labeller the request accepts. Returns NotFound if there are no eligible releases.",
      "errors": [
        {
          "description": "No eligible release for the given (did, package).",
          "name": "NotFound"
        },
        {
          "description": "The package is indexed but has no release revision available under the aggregator's listing policy. No publisher-controlled content is returned.",
          "name": "ListingUnavailable"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "com.emdashcms.experimental.aggregator.defs#releaseView",
          "type": "ref"
        }
      },
      "parameters": {
        "properties": {
          "did": {
            "description": "Publisher DID.",
            "format": "did",
            "type": "string"
          },
          "package": {
            "description": "Parent package slug.",
            "maxLength": 64,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "did",
          "package"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "Get the latest release for a package: the highest semver version among non-tombstoned, non-yanked releases. EXPERIMENTAL.",
  "id": "com.emdashcms.experimental.aggregator.getLatestRelease",
  "lexicon": 1
}
```
