Through the API you can add, update, and clean the rules for both groups and locations. The examples below are for groups, but you can do the same for locations, just use location
as a resource type.
Adding a rule
To add a rule you need to use a PUT:
Resource type can be either group
or location
. A resource ID is an integer for groups:
For locations you need to first go into a location to see its UUID:
So, to add a rule for a group with ID 14000 for tenant example on the dev environment where the people from the HR department should belong to:
Updating a rule
To update an existing rule, you can do the same, the content of the rule will be replaced with the new one. So if this group should contain people from the Sales department:
Getting a current rule for a resource
To retrieve the current rule for a resource, you use a GET:
So to retrieve a rule for a group with ID 14000 for an example tenant on the dev environment:
So for this rule, you should receive the following response:
Deleting a rule
To delete a rule you still use a PUT, but provide an empty rule content:
This means that eventually all the dynamically added people to this group will be removed from it. If someone was added there manually, they would stay in the group.
Comments
0 comments
Please sign in to leave a comment.