# place.hud.listAppRecords

> Public records of one of the collections a frame app names in its reads, anyone's, as HUD's index has them, filtered and sorted by fields of their value, each with its author, a page at a time; or, with group, how many hold each value of a field. A collection the index is still taking in answers what it has, and says it is not complete. In a private instance of the app, the same: these are the public network's records, never the instance's. No auth required; each address asks at most 120 times a minute, with listAppEntries, getAppRecords, getShared and callSharedTool.

- Kind: query
- Authority: hud.place
- Lexicon: 1
- Published by [lexicons.hud.place](https://lexicon.garden/identity/did:plc:3tzbz4pml36u4mkresb6pdhv), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.listAppRecords)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.listAppRecords/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:3tzbz4pml36u4mkresb6pdhv/place.hud.listAppRecords/analytics)

## Query (`place.hud.listAppRecords`)

Type: query · GET

### Parameters (query string)

- `app` (string · at-uri, required): The app's place.hud.app record.
- `by` (array): Whose records alone: at most 50 accounts, by DID.
  - Constraints: maxLength: 50
  - `items` (string · did)
- `collection` (string · nsid, required): Which of the collections it reads.
- `cursor` (string): Where the last page ended, as its answer's cursor said.
  - Constraints: maxLength: 512
- `group` (string): As JSON, {by, top?}: in place of records, how many records hold each value of the field by (subject.uri), the top most held, 1 to 100, 20 by default.
  - Constraints: maxLength: 512
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 100, default: 30
- `order` (string): Which way sort sorts.
  - Constraints: maxLength: 8, default: "desc", knownValues: asc | desc
- `sort` (string): A field of the records' value to sort by (createdAt): those without it are left out. Newest first where none.
  - Constraints: maxLength: 256
- `where` (string): Filters, as JSON: an array of at most 6 of {path, op: value}, each path a field of the record's value (subject.uri), each op one of eq, ne, in, contains, gt, gte, lt, lte or exists.
  - Constraints: maxLength: 2048

### Output (application/json)

- `complete` (boolean, required): Whether the index has every repository holding the collection in, and every field asked of indexed: else ask again in a while for more.
- `cursor` (string): Where the next page starts, as the index says it; absent on the last.
  - Constraints: maxLength: 512
- `groups` (array): With group: each value of its field, and how many records hold it, the most held first.
  - Constraints: maxLength: 100
  - `items` (ref)
    - Reference: `#group`
- `records` (array, required): The records; none with group.
  - `items` (ref)
    - Reference: `#record`

### Errors

- `NotFound`: HUD has no frame app of this id.
- `InvalidRequest`: The input is not what the method takes: a collection the app does not name in its reads, or a filter, sort or group not of the records' value, among others.
- `RateLimitExceeded`: This address asked too often in the last minute: ask again in a minute.
- `IndexUnavailable`: This server names no index (HUD_INDEX) to read records from.
- `UpstreamFailure`: The index refused, or could not be reached.

## #group (`place.hud.listAppRecords#group`)

Type: object

A value of a field, and how many records hold it.

### Properties

- `count` (integer, required)
  - Constraints: minimum: 0
- `key` (string, required): The value, a number written as text.
  - Constraints: maxLength: 8192

## #record (`place.hud.listAppRecords#record`)

Type: object

A public record, as its author's repository holds it.

### Properties

- `author` (ref, required)
  - Reference: `place.hud.defs#actor`
- `cid` (string · cid, required)
- `uri` (string · at-uri, required)
- `value` (unknown, required): The record; each blob in it given its addresses as a public record's are (url, thumb and proxy beside its ref).

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "group": {
      "description": "A value of a field, and how many records hold it.",
      "properties": {
        "count": {
          "minimum": 0,
          "type": "integer"
        },
        "key": {
          "description": "The value, a number written as text.",
          "maxLength": 8192,
          "type": "string"
        }
      },
      "required": [
        "key",
        "count"
      ],
      "type": "object"
    },
    "main": {
      "description": "Public records of one of the collections a frame app names in its reads, anyone's, as HUD's index has them, filtered and sorted by fields of their value, each with its author, a page at a time; or, with group, how many hold each value of a field. A collection the index is still taking in answers what it has, and says it is not complete. In a private instance of the app, the same: these are the public network's records, never the instance's. No auth required; each address asks at most 120 times a minute, with listAppEntries, getAppRecords, getShared and callSharedTool.",
      "errors": [
        {
          "description": "HUD has no frame app of this id.",
          "name": "NotFound"
        },
        {
          "description": "The input is not what the method takes: a collection the app does not name in its reads, or a filter, sort or group not of the records' value, among others.",
          "name": "InvalidRequest"
        },
        {
          "description": "This address asked too often in the last minute: ask again in a minute.",
          "name": "RateLimitExceeded"
        },
        {
          "description": "This server names no index (HUD_INDEX) to read records from.",
          "name": "IndexUnavailable"
        },
        {
          "description": "The index refused, or could not be reached.",
          "name": "UpstreamFailure"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "complete": {
              "description": "Whether the index has every repository holding the collection in, and every field asked of indexed: else ask again in a while for more.",
              "type": "boolean"
            },
            "cursor": {
              "description": "Where the next page starts, as the index says it; absent on the last.",
              "maxLength": 512,
              "type": "string"
            },
            "groups": {
              "description": "With group: each value of its field, and how many records hold it, the most held first.",
              "items": {
                "ref": "#group",
                "type": "ref"
              },
              "maxLength": 100,
              "type": "array"
            },
            "records": {
              "description": "The records; none with group.",
              "items": {
                "ref": "#record",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "records",
            "complete"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "app": {
            "description": "The app's place.hud.app record.",
            "format": "at-uri",
            "type": "string"
          },
          "by": {
            "description": "Whose records alone: at most 50 accounts, by DID.",
            "items": {
              "format": "did",
              "type": "string"
            },
            "maxLength": 50,
            "type": "array"
          },
          "collection": {
            "description": "Which of the collections it reads.",
            "format": "nsid",
            "type": "string"
          },
          "cursor": {
            "description": "Where the last page ended, as its answer's cursor said.",
            "maxLength": 512,
            "type": "string"
          },
          "group": {
            "description": "As JSON, {by, top?}: in place of records, how many records hold each value of the field by (subject.uri), the top most held, 1 to 100, 20 by default.",
            "maxLength": 512,
            "type": "string"
          },
          "limit": {
            "default": 30,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "order": {
            "default": "desc",
            "description": "Which way sort sorts.",
            "knownValues": [
              "asc",
              "desc"
            ],
            "maxLength": 8,
            "type": "string"
          },
          "sort": {
            "description": "A field of the records' value to sort by (createdAt): those without it are left out. Newest first where none.",
            "maxLength": 256,
            "type": "string"
          },
          "where": {
            "description": "Filters, as JSON: an array of at most 6 of {path, op: value}, each path a field of the record's value (subject.uri), each op one of eq, ne, in, contains, gt, gte, lt, lte or exists.",
            "maxLength": 2048,
            "type": "string"
          }
        },
        "required": [
          "app",
          "collection"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "record": {
      "description": "A public record, as its author's repository holds it.",
      "properties": {
        "author": {
          "ref": "place.hud.defs#actor",
          "type": "ref"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "value": {
          "description": "The record; each blob in it given its addresses as a public record's are (url, thumb and proxy beside its ref).",
          "type": "unknown"
        }
      },
      "required": [
        "uri",
        "cid",
        "author",
        "value"
      ],
      "type": "object"
    }
  },
  "description": "Anyone's public records of a collection a frame app reads.",
  "id": "place.hud.listAppRecords",
  "lexicon": 1
}
```
