getFiltersPaginated method
Returns a paginated list of filters. Use this operation to get:
- specific filters, by defining
id
only. - filters that match all of the specified attributes. For example, all filters for a user with a particular word in their name. When multiple attributes are specified only filters matching all attributes are returned.
This operation can be accessed anonymously.
Permissions required: None, however, only the following filters that match the query parameters are returned:
- filters owned by the user.
- filters shared with a group that the user is a member of.
- filters shared with a private project that the user has Browse projects project permission for.
- filters shared with a public project.
- filters shared with the public.
Implementation
Future<PageBeanFilterDetails> getFiltersPaginated(
{String? filterName,
String? accountId,
String? owner,
String? groupname,
String? groupId,
int? projectId,
List<int>? id,
String? orderBy,
int? startAt,
int? maxResults,
String? expand,
bool? overrideSharePermissions}) async {
return PageBeanFilterDetails.fromJson(await _client.send(
'get',
'rest/api/3/filter/search',
queryParameters: {
if (filterName != null) 'filterName': filterName,
if (accountId != null) 'accountId': accountId,
if (owner != null) 'owner': owner,
if (groupname != null) 'groupname': groupname,
if (groupId != null) 'groupId': groupId,
if (projectId != null) 'projectId': '$projectId',
if (id != null) 'id': id.map((e) => '$e').join(','),
if (orderBy != null) 'orderBy': orderBy,
if (startAt != null) 'startAt': '$startAt',
if (maxResults != null) 'maxResults': '$maxResults',
if (expand != null) 'expand': expand,
if (overrideSharePermissions != null)
'overrideSharePermissions': '$overrideSharePermissions',
},
));
}