---
title: "GET /api/admin/search/record"
method: GET
path: "/api/admin/search/record"
tags: ["Admin: Search"]
---

# GET /api/admin/search/record

`GET /api/admin/search/record`

## Request

- The document declares no server URL.
- Auth: API key in cookie `session`

Read one record an `adminSearch` result names, in the request locale, whatever state it is in.

## Query parameters

- `id` string, required

## Response `200`

The request has succeeded.

- AdminRecord: One record as an editor reads it, whatever state it is in.
  - `id` string, required
  - `title` string, required
  - `text` string, required: The record's text, as plain text or Markdown.
  - `path` string, required: The record's page on the website once it is public, with the locale prefix and no origin.
  - `metadata` AdminRecordMetadata, required: What is known about how published a record is.
    - `type` 'course' | 'lesson' | 'post', required: The kinds of record the catalogue search finds.
    - `slug` string, required
    - `courseSlug` string: The course a lesson belongs to, or a course page's own course slug.
    - `state` string, required: Publication state of the landing page, lesson or post.
    - `readiness` string, required: Readiness of the course; empty for a post.
    - `listed` boolean: Whether a landing page is on the course list.
    - `buildState` string: State of the build a lesson was read from.
    - `position` integer: Natural order of a lesson in its course.

## Other responses

- `default`: Default error response shared by every operation. `@error` emits an OpenAPI `default` response, keeping central transport failures typed without enumerating every status on every operation.

## Changes

- **2026-10-18** `9380d4c85a04`: 4 info
  - removed the non-success response with the status `401`
  - removed the non-success response with the status `403`
  - removed the non-success response with the status `404`
  - added the optional property `errors` to the response with the `default` status
- **2026-10-18** `23cc12c79080`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hexlet-basics/apis/hexlet-basics-api/changes/api/admin/search/record/get.md)

---

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