> For the complete documentation index, see [llms.txt](https://flapjax.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flapjax.gitbook.io/docs/rest-api/reference/record-events/list-records.md).

# List Records

## List all records

> Returns a paginated list of all records in the specified stack. Results are sorted in descending order by default.\
> \
> Use \`cursor\_configuration\` to control page size and navigate through results. If you omit the request body, defaults are used (page size 50, descending order).<br>

```json
{"openapi":"3.0.3","info":{"title":"Listener API","version":"1.0.0"},"tags":[{"name":"list-records"}],"servers":[{"url":"https://{domain}/v1","variables":{"domain":{"default":"your-domain","description":"Your deployment domain"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token with the required scope for the endpoint. Pass via the `Authorization: Bearer <token>` header.\n"}},"parameters":{"StackKey":{"name":"stack_key","in":"path","required":true,"description":"The unique key identifying the stack.","schema":{"type":"string"}}},"schemas":{"PaginationRequest":{"type":"object","description":"Pagination parameters for list and related endpoints. If omitted entirely, defaults are used (size 50, descending order).\n","properties":{"cursor_configuration":{"$ref":"#/components/schemas/CursorConfiguration"},"sorting_type":{"type":"string","description":"Sort order for results.","enum":["asc","desc"],"default":"desc"}}},"CursorConfiguration":{"type":"object","description":"Cursor-based pagination configuration.","properties":{"size":{"type":"integer","description":"Number of results per page.","default":50},"after_id":{"type":"string","description":"ID from a previous response. When provided, results start after this ID.\n"}}},"PaginatedResponse":{"type":"object","description":"Response envelope containing a paginated list.","properties":{"status":{"type":"string","enum":["Success"]},"data":{"type":"object","properties":{"items":{"type":"array","description":"The page of results.","items":{"type":"object"}}}}}},"ErrorResponse":{"type":"object","description":"Standard error response envelope.","properties":{"error":{"type":"string","description":"Machine-readable error type. Use this for programmatic error handling.\n","enum":["operation_failed","failed_binding_json","invalid_json","invalid_parameter","not_found","duplicate_entry","rate_limit_exceeded"]},"errorstack":{"type":"object","nullable":true,"description":"Detailed error stack (only present for server errors)."}}}}},"paths":{"/stacks/{stack_key}/list":{"post":{"summary":"List all records","operationId":"listRecords","tags":["list-records"],"description":"Returns a paginated list of all records in the specified stack. Results are sorted in descending order by default.\n\nUse `cursor_configuration` to control page size and navigate through results. If you omit the request body, defaults are used (page size 50, descending order).\n","parameters":[{"$ref":"#/components/parameters/StackKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginationRequest"}}}},"responses":{"200":{"description":"Paginated list of records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}},"500":{"description":"Stack not found or internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
