# Window of Tracks (/catalog/tracks)

A Window of Tracks and videos, Page by Page: by Artist Keys (cards in `artists`), by Release Cabinets and by ISRCs; Selection parameters narrow each other. A Track is one row even if it is on several Releases: it is collapsed to the most recent Release from the Selection, `release` is this Release in short form, and `position` is the number of the Track there. Performers are cards in `artists`, as Release Management delivers them to the DSPs; Contributors are separate. ISRCs that the Cabinets of the Cabinet Boundary do not have come back in `missing`; Cabinets outside the Cabinet Boundary give nothing. The order: first the Tracks of the Releases with the latest Opening Date, and within a Release by number. A Page has up to 20 rows by default; the Window has ended when there is no `nextCursor`.

## Request [#request]

```http
GET /api/v1/tracks
```

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `x-cabinets` | `string` |  | This header is required. The Cabinet Boundary: Cabinet slugs or Cabinet Keys `cabinet:<slug>` separated by commas, at most 250. `*` means the whole catalog. A response contains only data of these Cabinets. The Consumer decides the list and never sends an empty one. Example: `label-one,label-two`. |
| `traceparent` | `string` |  | This is a header. Tracing of the call (W3C Trace Context). The API writes the `trace-id` to its log, and the response returns the same header. The API drops an invalid header without an error. Example: `00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01`. |
| `Accept-Language` | `string` |  | This is a header. The language of the labels for people in the response (RFC 9110): `en` or `ru`. The API picks the supported language with the highest `q` weight, ignoring case, and `ru-RU` counts as `ru`. If the header is missing or names no supported language, the labels are in `en`: this is not an error. Example: `ru`. |
| `artist` | `string[]` |  | Artists as card Keys `artist:<uuid>`, at most 50: Tracks where one of the cards is a performer of the Track or, for a Track without its own performers, a performer of the Release; for a video, a performer of the video. The Tracks come from Releases of any Cabinet inside the Cabinet Boundary. Example: `artist:30000000-0000-0000-0000-000000000001`. |
| `cabinet` | `string[]` |  | Release Cabinets as Keys `cabinet:<slug>` or slugs, at most 50: Tracks of Releases and Drafts of these Cabinets. An unknown Cabinet or a Cabinet outside the Cabinet Boundary gives nothing; if all of them are such, the Window is empty. Example: `cabinet:label-one`. |
| `isrc` | `string[]` |  | ISRCs, at most 50: Tracks and videos with these codes. Codes that the Cabinets of the Cabinet Boundary do not have come back in `missing`. Example: `RUAB12600011`. |
| `limit` | `integer` | `20` | The number of rows on the Page: 20 by default, at most 1000. A Page is at most 3 MB, so heavy rows can end the Page with `nextCursor` before `limit` rows. Example: `100`. |
| `cursor` | `string` |  | The `nextCursor` of the previous Page with the same Selection and order: the API returns the next Page. A cursor from another Selection or a damaged cursor returns `invalid_input`: start again without `cursor`. Example: `WyJyZWxlYXNlcyIsImNhNDJreWlTRWVNYWNCVFMiLDAsIjIwMjYtMTAtMDMiLCJjMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDEiXQ`. |

## Response [#response]

A Page of Tracks: first from the Releases with the latest Opening Date, and within a Release by number.

| Field | Type | Description |
| --- | --- | --- |
| `copyVersion` | `string` | The Copy Version that the response was read from. Example: `100`. |
| `ruleVersion` | `string` | The version of the rules that the API applies to build Windows. When it changes, the meaning of saved Windows changes: discard the Windows you saved, including a persisted cache, and read them again. Example: `7372a7633e60b7b5`. |
| `dataAsOf` | `string (date-time)` | The time at which the Catalog Copy is correct, in ISO 8601 UTC. Example: `2026-09-29T07:00:00.000Z`. |
| `items` | `object[]` | The rows of the Page in the order of the Window: at most `limit` rows and at most 3 MB. |
| `items[].position` | `integer \| null` | The number of the Track on the Release of the row, starting from 1. `null` means that it is not set. |
| `items[].title` | `string \| null` | The title of the Track. |
| `items[].isrc` | `string \| null` | The ISRC without spaces and hyphens, in uppercase. `null` means that there is no code. Example: `RUAB12600011`. |
| `items[].durationSec` | `integer \| null` | The duration in seconds. `null` means that it is not set. |
| `items[].parentalWarning` | `string \| null` | The explicit content marker as is: `Explicit`, `NotExplicit` or `Cleaned`. `null` means that it is not set. |
| `items[].artists` | `object[]` | The performers of the Track as cards in `artists`: the performers of the Track or, if it has none of its own, the performers of the Release, as Release Management delivers them to the DSPs; for a video, the performers of the video. Main performers first, then featured ones, by place. |
| `items[].artists[].key` | `string` | The Artist Key `artist:<uuid>`: a card in `artists` of Release Management. The Cabinet of an Artist is the Cabinet of its card. Example: `artist:30000000-0000-0000-0000-000000000001`. |
| `items[].artists[].name` | `string` | The name of the performer as in the card. |
| `items[].artists[].role` | `string` | How Release Management lists the performer, the value of its enum as is: `MainArtist` is a main performer, and `FeaturedArtist` is a featured performer. An empty value in Release Management comes as `MainArtist`. The list may grow. Known values: `MainArtist`, `FeaturedArtist`. |
| `items[].artists[].position` | `integer` | The place within its role, starting from 1. |
| `items[].credits` | `object[]` | The Contributors of the Track, who are not performers: authors, producers and other roles, by role and place. The credit rows for main and featured performers are not included. |
| `items[].credits[].name` | `string` | The name of the Contributor. |
| `items[].credits[].role` | `string` | The role of the Contributor in Release Management, the value of its enum as is, by DDEX: `Composer`, `Lyricist`, `Producer` and others. |
| `items[].credits[].position` | `integer` | The place among the Contributors with the same role, starting from 1. |
| `items[].role` | `string \| null` | The role of the cards from the `artist` Selection in this Track: `MainArtist` if at least one of them is a main performer, otherwise `FeaturedArtist`. `null` means that the Selection is not by Artist. Known values: `MainArtist`, `FeaturedArtist`. |
| `items[].release` | `object` | The Release of the Track in short form: the most recent by Opening Date among the Releases where the Track is in the Selection. A Draft appears only if no Release has this Track. |
| `items[].release.key` | `string` | The Release Key `release:<uuid>`. With this Key in `keys`, `releases` returns the Head, and `release` returns the whole Release. Example: `release:c0000000-0000-0000-0000-000000000001`. |
| `items[].release.title` | `string \| null` | The title of the Release. `null` means that it is not set. |
| `items[].release.date` | `string (date) \| null` | The Opening Date of the Release, a day in Moscow time. Example: `2026-10-03`. |
| `items[].release.cover` | `string \| null` | The link to the cover. `null` means that there is no cover. |
| `nextCursor` | `string` | The cursor of the next Page. Pass it in `cursor` with the same Selection and order. A response without `nextCursor` is the last Page of the Window. Example: `WyJyZWxlYXNlcyIsImNhNDJreWlTRWVNYWNCVFMiLDAsIjIwMjYtMTAtMDMiLCJjMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDEiXQ`. |
| `missing` | `string[]` | The ISRCs from `isrc` that the Cabinets of the Cabinet Boundary do not have, in the order of the codes. It is present only if the request has `isrc`. An empty list means that all codes were found. |

## Errors [#errors]

| Code | When | What to do |
| --- | --- | --- |
| [`invalid_input`](/rules#invalid_input) | The input failed validation (HTTP 422). | Fix the fields listed in `errors` and send the request again. |
| [`unauthorized`](/rules#unauthorized) | The token was not accepted (HTTP 401). | Get a new M2M token for the machine and send the request again. |
| [`forbidden`](/rules#forbidden) | The machine is not allowed (HTTP 403). | Do not retry the request. The machine is not listed in `MACHINES`, or the `scopes` of its token do not include the API machine. |
| [`not_found`](/rules#not_found) | The path or the Key was not found (HTTP 404). | If the response has `details.key`, the Catalog Copy has no item with that Key: find the item again with `search`. Otherwise the path does not exist: Operations are available at `/api/v1/<name>`, and `/api/v1/openapi.json` lists them. |
| [`method_not_allowed`](/rules#method_not_allowed) | The method is not allowed (HTTP 405). | Send the request again with `GET` or `HEAD`: the API only reads, and the `Allow` header lists these methods. |
| [`rate_limited`](/rules#rate_limited) | The machine made too many calls (HTTP 429). | Wait for the number of seconds in `Retry-After`, which is the time until the machine's next allowed call, and send the request again. |
| [`timeout`](/rules#timeout) | The request did not finish in time (HTTP 504). | The API did not retry the request. Narrow it with a shorter period, a smaller `limit` or fewer Parts in `include`, and send it again: the same request will most likely exceed 5 s again. |
| [`unavailable`](/rules#unavailable) | The Catalog Copy is unavailable (HTTP 503). | Wait for the number of seconds in `Retry-After` and retry the request once. The connection to the Catalog Copy was lost, or the database is overloaded or starting after a pause, and the API has already retried once. |
| [`internal`](/rules#internal) | The API failed with an internal error (HTTP 500). | Do not retry the request: the API did not retry it, and the same request will fail the same way. Report the `requestId`. |

## Example [#example]

```bash
curl -s "https://rm-api.ovkch.com/api/v1/tracks?artist=artist:30000000-0000-0000-0000-000000000001" \
  -H "Authorization: Bearer $TOKEN" \
  -H "x-cabinets: label-one"
```