# com.livtet.listShelfItems

> List the books placed on a shelf: its shelfItem records, hydrated with the shelf and book views.

- Kind: query
- Authority: livtet.com
- Lexicon: 1
- Published by [biblio.livtet.com](https://lexicon.garden/identity/did:plc:e2x3ihw2ntxt7pcgzmtu3abi), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.listShelfItems)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.listShelfItems/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e2x3ihw2ntxt7pcgzmtu3abi/com.livtet.listShelfItems/analytics)

## Query (`com.livtet.listShelfItems`)

Type: query · GET

### Parameters (query string)

- `cursor` (string): Opaque pagination cursor.
- `limit` (integer): Maximum number of shelfItem records to return.
  - Constraints: minimum: 1, maximum: 100, default: 50
- `shelf` (string · at-uri, required): AT-URI of the shelf to list items for.

### Output (application/json)

- `cursor` (string)
- `items` (array, required): Items in record-uri order; a client ordering a curated shelf sorts by metadata.position.
  - `items` (ref)
    - Reference: `com.livtet.defs#shelfItemView`

### Errors

- `InvalidRequest`: The shelf parameter is not an AT-URI.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "errors": [
        {
          "description": "The shelf parameter is not an AT-URI.",
          "name": "InvalidRequest"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "items": {
              "description": "Items in record-uri order; a client ordering a curated shelf sorts by metadata.position.",
              "items": {
                "ref": "com.livtet.defs#shelfItemView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "items"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "description": "Opaque pagination cursor.",
            "type": "string"
          },
          "limit": {
            "default": 50,
            "description": "Maximum number of shelfItem records to return.",
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "shelf": {
            "description": "AT-URI of the shelf to list items for.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "shelf"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "List the books placed on a shelf: its shelfItem records, hydrated with the shelf and book views.",
  "id": "com.livtet.listShelfItems",
  "lexicon": 1
}
```
