Overview
Set-up your own custom rules that will be applied when you use the API
Custom rules allow you to define specific conditions and actions to be executed based on incoming events or data. This guide provides an overview of custom rules, their benefits, and how to create and manage them in Greip.
Greip custom rules section
Adding custom rules
To add a custom rule, follow these steps:
First Step
Go to the Custom Rules page from the account dashboard.
Second Step
Click on the ‘Add Rule’ button from the top right corner of the page to create a new custom rule.
Third Step
Give it a title that describes the rule. This will help you identify the rule later, and when the custom rule is applied to an API request, it will be returned in the API response along with the rule ID.
Fourth Step
Choose the endpoint then define the conditions and action for the custom rule.
Defining conditions and action
Fifth Step
Click the “Add rule” button to save the custom rule.
Once you have added a custom rule, it will be considered immediately when you use the API. If the conditions are met, the action will be executed and the custom rule will be returned in the API response.
Sample response with custom rule
When a custom rule is applied to an API request, the custom rule ID will be returned in the API response. Here is an example of a response with a custom rule:
Definitions of custom rule actions
Custom rules can be defined with the following actions:
Was this page helpful?