This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a list of rules, given the provided paging, filtering, and sorting.
createdDate
is sorted in ASC
orderpaging.limit
is 100
paging.offset
is 0
Up to 1,000 rules can be returned per request.
For field support for filters and sorting, see Rules: Supported Filters and Sorting. To learn about working with Query endpoints, see API Query Language.
You can only call this method when authenticated as a Wix app or Wix user identity.
Query options. See API Query Language for more details.
List of rules.
Paging metadata.
curl -X POST https://www.wixapis.com/moderation/v1/rules/query \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: <AUTH>' \
-d '{
"query": {
"sort": [],
"filter": {
"namespace": "reviews/f0f2e34e-a407-41bd-b8b0-d11a90b226de"
},
"cursorPaging": {
"limit": 1
}
}
}'
{
"rules": [
{
"id": "500ea62c-5f4c-4a51-b813-0bd7f239c6dd",
"revision": "1",
"createdDate": "2023-10-10T06:52:04.718Z",
"updatedDate": "2023-10-10T06:52:04.718Z",
"namespace": "reviews/f0f2e34e-a407-41bd-b8b0-d11a90b226de",
"name": "Check for Rating",
"audience": {
"type": "MEMBERS_AND_VISITORS"
},
"trigger": {
"attribute": {
"name": "rating",
"values": ["1", "2"]
}
},
"exemptions": {
"memberGroups": [],
"memberIds": []
},
"action": {
"type": "NEEDS_MANUAL_APPROVAL"
},
"enabled": true
}
],
"pagingMetadata": {
"count": 1,
"cursors": {
"next": "79902130cbb60b4db8ae6b7f0020c04e411ee19b.IiQ1MDBlYTYyYy01ZjRjLTRhNTEtYjgxMy0wYmQ3ZjIzOWM2ZGQ",
"prev": null
},
"hasNext": true
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.