---
title: "Get script lib version"
method: GET
path: "/api/scripts/{handle}/{host}/lib/versions/{version}"
---

# Get script lib version

`GET /api/scripts/{handle}/{host}/lib/versions/{version}`

## Request

- Base URL: `https://reduck.ai`
- URL: `https://reduck.ai/api/scripts/{handle}/{host}/lib/versions/{version}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Read one version of a host's lib, its code included; with `diff`, the changes from another version.

## Path parameters

- `handle` string, required: The owner a resource is addressed under: "@username" for a personal scope, or a bare slug for a project.
- `host` string, required: The site whose lib it is; scripts import it as `lib:<host>`.
- `version` integer, required

## Query parameters

- `diff` integer

## Response `200`

OK

- object
  - `diff` string
  - `version_number` number, required
  - `note` string, nullable, required
  - `created_at` string, required
  - `latest` boolean, required
  - `content` string, required

## Other responses

- `401`: Not authenticated
- `403`: Forbidden
- `404`: Not found

---

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