---
title: "Get a list of all shelves in the repo."
method: GET
path: "/repos/{repo_id}/shelves"
tags: ["Repository Shelves Manipulation"]
---

# Get a list of all shelves in the repo.

`GET /repos/{repo_id}/shelves`

## Request

- Base URL: `https://api.diversion.dev/v0`
- URL: `https://api.diversion.dev/v0/repos/{repo_id}/shelves`
- Auth: one of:
  - OAuth 2
    - Implicit: `https://auth.diversion.dev/oauth2/authorize`
    - Scopes: `coreapi/read`
  - OAuth 2
    - Implicit: `https://auth.diversion.dev/oauth2/authorize`
    - Scopes: `coreapi/write`
- TypeScript: <https://skmtc.dev/diversion/apis/diversion-core-api/docs/repos/:repo_id/shelves/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `branch_id` string

## Response `200`

A list of shelf objects

- object
  - `object` 'Shelf', required
  - `items` Shelf[], required
    - `id` string, required: Shelf identifier in Diversion
    - `name` string, required: Display name of the shelf
    - `created_timestamp` integer, required: Seconds since epoch UTC
    - `branch_id` string: Optional branch ID from which the changes were shelved

## Other responses

- `default`: An error occurred

---

[API](https://skmtc.dev/diversion/apis/diversion-core-api.md) - [All operations](https://skmtc.dev/diversion/apis/diversion-core-api/llms.txt) - [OpenAPI document](https://skmtc.dev/diversion/apis/diversion-core-api/revisions/38a18aba804b?raw)
