Get Rules
Retrieves a set of rules.
Verb | POST |
---|---|
Endpoint | {base-url}/machines/settings/rules |
Max Page Size | 50 |
The applyHierarchicalFiltering
property of the rules filter dramatically alters the behavior of this route. It will filter the result set to only the most specific scope that each setting
is found at.
Scopes from most to least specific are: machine, group, site, account, org.
See the two (edited for length) sets of rules. They are response bodies for the same request except one has set applyHierarchicalFiltering
to true.
Response without hierarchical filtering
[
{
"value": "unique at machine",
"setting": "1",
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": null,
"machineId": 402,
},
{
"value": "template duplicate of unique at machine",
"setting": "1",
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": 7,
"machineId": null,
},
{
"value": "site duplicate of unique at machine",
"setting": "1",
"organizationId": 1,
"accountId": null,
"siteId": 427,
"groupId": null,
"machineId": null,
},
{
"value": "account duplicate of unique at machine",
"setting": "1",
"organizationId": 1,
"accountId": 1,
"siteId": null,
"groupId": null,
"machineId": null,
},
{
"value": "organization duplicate of unique at machine",
"setting": "1",
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": null,
"machineId": null,
},
{
"value": "unique at group",
"setting": "2",
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": 7,
"machineId": null,
},
{
"value": "site duplicate of unique at group",
"setting": "2",
"organizationId": 1,
"accountId": null,
"siteId": 427,
"groupId": null,
"machineId": null,
},
{
"value": "account duplicate of unique at group",
"setting": "2",
"organizationId": 1,
"accountId": 1,
"siteId": null,
"groupId": null,
"machineId": null,
},
{
"value": "organization duplicate of unique at group",
"setting": "2",
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": null,
"machineId": null,
},
{
"value": "unique at site",
"setting": "3",
"organizationId": 1,
"accountId": null,
"siteId": 427,
"groupId": null,
"machineId": null,
},
{
"value": "account duplicate of unique at site",
"setting": "3",
"organizationId": 1,
"accountId": 1,
"siteId": null,
"groupId": null,
"machineId": null,
},
{
"value": "organization duplicate of unique at site",
"setting": "3",
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": null,
"machineId": null,
},
{
"value": "unique at account",
"setting": "4",
"organizationId": 1,
"accountId": 1,
"siteId": null,
"groupId": null,
"machineId": null,
},
{
"value": "organization duplicate of unique at account",
"setting": "4",
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": null,
"machineId": null,
},
{
"value": "unique at organization",
"setting": "5",
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": null,
"machineId": null,
}
]
Response with hierarchical filtering
[
{
"value": "unique at machine",
"setting": "1",
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": null,
"machineId": 402,
},
{
"value": "unique at group",
"setting": "2",
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": 7,
"machineId": null,
},
{
"value": "unique at site",
"setting": "3",
"organizationId": 1,
"accountId": null,
"siteId": 427,
"groupId": null,
"machineId": null,
},
{
"value": "unique at account",
"setting": "4",
"organizationId": 1,
"accountId": 1,
"siteId": null,
"groupId": null,
"machineId": null,
},
{
"value": "unique at organization",
"setting": "5",
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": null,
"machineId": null,
},
]
Request Body
{
"requestFilter": {
"organizationIds": [1],
"startDate": "2000-08-01T00:20:53.584",
"endDate": "2000-08-02T00:20:53.584",
"accountIds": [1],
"siteIds": [1],
"machineIdentifiers": ["PROSE0200009675"]
},
"routeFilter":{
"ruleIds":[2],
"groupIds": [6],
"includeInactive": true,
"applyHierarchicalFiltering": true,
"includeRuleTree": false
}
}
Filters Honored
- RequestFilter
- organizationIds
- accountIds
- siteIds
- machineIdentifiers
- SettingsFilter
- includeInactive
- groupIds
- ruleIds
- applyHierarchicalFiltering
- includeRuleTree
Returns
On Success
The requested list of rules.
Response Body
[
{
"value": "unique at machine",
"setting": "1",
"id": 12,
"organizationId": 1,
"accountId": null,
"siteId": null,
"groupId": null,
"machineId": 402,
"createdAt": "2023-08-07T01:48:50.783",
"isActive": true
}
]