findRecords method

Future<Object?> findRecords({
  1. required Object collectionName,
  2. Map<String, Object?>? query,
  3. bool? expandReferences,
  4. Map<String, String>? headers,
})

GET /{version}/database/collections/{collectionName}

expandReferences — set true to get every reference value as { id, display } (see ExpandedReference); left unset, the stored ids come back as before. Needs read permission on every source the schema links to, else the read is refused with CM-ERRORS-DATABASE-056.

Implementation

Future<Object?> findRecords(
    {required Object collectionName,
    Map<String, Object?>? query,
    bool? expandReferences,
    Map<String, String>? headers}) {
  return transport.send(
    route: '/{version}/database/collections/{collectionName}',
    method: 'GET',
    query: withExpandReferences(query, expandReferences),
    headers: headers,
    pathParams: <String, Object?>{'collectionName': collectionName},
  );
}