queryPolicies( )


Creates a query to retrieve a list of policies, given the provided paging and filter.

The queryPolicies() function builds a query to retrieve a list of policies and returns a PoliciesQueryBuilder object.

The returned object contains the query definition which is typically used to run the query using the find() function.

You can refine the query by chaining PoliciesQueryBuilder functions onto the query. PoliciesQueryBuilder functions enable you to sort, filter and control the results that PoliciesQueryBuilder.find() returns.

The query runs with the following PoliciesQueryBuilder defaults that you can override:

limit: 50
descending: _createdDate

The functions that are chained to queryPolicies() are applied in the order they are called. For example, if you sort on the _createdDate property in ascending order and then on the id property in descending order, the results are sorted by the created date and then, if there are multiple results with the same date, the items are sorted by the id.

The table below shows which PoliciesQueryBuilder functions are supported for queryPoliciesGuests(). You can only use one filter function for each property. If a property is used in more than one filter, only the first filter will work.

PROPERTYSUPPORTED FILTERS & SORTING
_ideq(),ne(),in(),exists(),ascending(),descending()
revisioneq(),ne(),in(),lt(),le(),gt(),ge(),exists(),ascending(),descending()
_createdDateeq(),ne(),in(),lt(),le(),gt(),ge(),exists(),ascending(),descending()
_updatedDateeq(),ne(),in(),lt(),le(),gt(),ge(),exists(),ascending(),descending()
nameeq(),ne(),in(),exists(),ascending(),descending()
bodyeq(),ne(),in(),exists(),ascending(),descending()
eventIdeq(),ne(),in(),exists(),ascending(),descending()

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Events - all permissions
Read Policies
Manage Policies
Learn more about permission scopes.
Method Declaration
Copy
Request
This method does not take any parameters
Was this helpful?
Yes
No