Returns a paginated records list, supporting sorting and filtering.

Depending on the collection's listRule value, the access to this action may or may not have been restricted.

You could find individual generated records API documentation in the "Dashboard > Collections > API Preview".

= "2022-01-01 00:00:00" && someField1 != someField2', }); // you can also fetch all records at once via getFullList const records = await pb.collection('posts').getFullList({ sort: '-created', }); // or fetch only the first record that matches the specified filter const record = await pb.collection('posts').getFirstListItem('someField="test"', { expand: 'relField1,relField2.subRelField', }); `} dart={` import 'package:pocketbase/pocketbase.dart'; final pb = PocketBase('http://127.0.0.1:8090'); ... // fetch a paginated records list final resultList = await pb.collection('posts').getList( page: 1, perPage: 50, filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2', ); // you can also fetch all records at once via getFullList final records = await pb.collection('posts').getFullList(sort: '-created'); // or fetch only the first record that matches the specified filter final record = await pb.collection('posts').getFirstListItem( 'someField="test"', expand: 'relField1,relField2.subRelField', ); `} />
API details
GET
/api/collections/collectionIdOrName/records
Path parameters
Param Type Description
collectionIdOrName String ID or name of the records' collection.
Query parameters
Param Type Description
page Number The page (aka. offset) of the paginated list (default to 1).
perPage Number The max returned records per page (default to 30).
sort String

Specify the ORDER BY fields.

Add - / + (default) in front of the attribute for DESC / ASC order, eg.:

Supported record sort fields:
@random, @rowid, id, and any other collection field.

filter String

Filter expression to filter/search the returned records list (in addition to the collection's listRule), e.g.:

'2022-01-01') `} />

Supported record filter fields:
id, + any field from the collection schema.

Responses
{#each responses as response (response.code)} {/each}
{#each responses as response (response.code)}
{/each}