listDocuments method
List Documents
Get a list of all the user documents. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's documents. Learn more about different API modes.
Implementation
Future<req.Response> listDocuments(
{required String collectionId,
List? filters,
int? limit,
int? offset,
String? orderField,
OrderType? orderType,
String? orderCast,
String? search}) {
final String path = '/database/collections/{collectionId}/documents'
.replaceAll(RegExp('{collectionId}'), collectionId);
final Map<String, dynamic> params = {
'filters': filters,
'limit': limit,
'offset': offset,
'orderField': orderField,
'orderType': orderType?.name(),
'orderCast': orderCast,
'search': search,
};
final Map<String, String> headers = {
'content-type': 'application/json',
};
return client.call(HttpMethod.get,
path: path, params: params, headers: headers);
}