---
title: "Latest baseline version with its snapshot"
method: GET
path: "/api/v1/baselines/{target}/latest"
tags: ["Baselines"]
---

# Latest baseline version with its snapshot

`GET /api/v1/baselines/{target}/latest`

## Request

- Base URL: `https://dungbeetle.dev`
- URL: `https://dungbeetle.dev/api/v1/baselines/{target}/latest`
- Auth: one of:
  - HTTP basic
  - HTTP bearer

Requires the `baselines:read` scope on agent tokens.

## Path parameters

- `target` string, required

## Response `200`

Latest version and the canonical snapshot JSON (as a string).

- BaselineWithSnapshot
  - `baseline` BaselineVersion, required
    - `id` string, required
    - `repositoryId` string, required
    - `target` string, required
    - `kind` string, required
    - `version` integer, required
    - `digest` string, required
    - `hasScreenshot` boolean, required
    - `createdAt` string, required
  - `snapshot` string, required: The canonical baseline JSON, verbatim.

## Other responses

- `401`: Missing/malformed Authorization header (`code: unauthorized`), bad Basic credentials (`code: invalid_credentials`), or an invalid, expired, or revoked agent token (`code: invalid_agent_token`).
- `403`: Agent token outside its granted scopes (`code: missing_scope`, with a `scope` field naming the required scope) or a route that is not agent-accessible at all (`code: agent_forbidden`). Basic-auth requests never see this.
- `404`: No such resource in this repository (`code: not_found`).
- `429`: Too many failed attempts or uploads from this client (`code: rate_limited`). Honor the `Retry-After` header; successful authenticated requests never count toward the limit.

---

[API](https://skmtc.dev/dungbeetle/apis/dungbeetle-cloud-api.md) · [All operations](https://skmtc.dev/dungbeetle/apis/dungbeetle-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dungbeetle/apis/dungbeetle-cloud-api/revisions/74778b90420a?raw)
