Remote Rules
Remote Rules (Beta) - Browser Extension Exclusive
Only available on Requestly Browser Extension

What are Remote Rules?

Requestly Remote rules is another great feature for rule management in Requestly Browser Extension. Requestly Remote Rules can help you share your rules with your team, while maintaining a single repository for all the defined rules. This means that an admin can manage all the rules and the members can use these rules without worrying about configuration or setup.

How do I use Remote Rules?

  1. 1.
    To use Requestly Remote Rules, first open https://app.requestly.io
  2. 2.
    Here, click on the Remote Rules button to open the Remote Rules Window in the right pane. You'll see something like this:
3. The Server Endpoint parameter requires you to enter an API endpoint that responds with a JSON. This JSON file needs to be structured in the exact same way as Requestly's export rules function. For example, if you export one of your rules, you'll get an exported TXT file with the likes of this:
[
{
"createdBy": "gYqNpEsG8XfikhKzbnXruvx0Xie2",
"creationDate": 1646889744603,
"currentOwner": "gYqNpEsG8XfikhKzbnXruvx0Xie2",
"description": "",
"groupId": "",
"id": "Cancel_9u90v",
"isSample": false,
"lastModified": 1646889934511,
"lastModifiedBy": "gYqNpEsG8XfikhKzbnXruvx0Xie2",
"modificationDate": 1646889747961,
"name": "cr",
"objectType": "rule",
"pairs": [
{
"id": "p6y6r",
"source": {
"filters": {},
"key": "Url",
"operator": "Contains",
"value": "`"
}
}
],
"ruleType": "Cancel",
"status": "Active"
},
]
So make sure that your JSON response object also looks like this. You'll be making changes to your JSON object and they'll be served through the endpoint. Please note that you can also use Requestly's Mock APIs feature to host the JSON.
Using Mock APIs to create a new API endpoint
4. Next up, all your teammates will now enter the respective API link that you provide them with, into Requestly and they'll be setting up a time for update. That is the time interval which dictates the data fetching trigger from the API endpoint. The minimum you can currently enter in the Beta version of Remote Rules is 2 Minutes, so every 2 minutes the rules will be fetched from the API endpoint and your team will have their rules automatically update every 2 minutes, of course for this to happen you'll be required to change the JSON object that you'll be returning as a response from your endpoint.

Conclusion

So that concludes our short Remote Rules feature tutorial. After adding the remote rules, they should appear under the HTTP Rules section of your Requestly dashboard. These will be grouped inside a separate group made for Remote Rules.

Caveats

  • Currently, Remote Rules Beta does not support grouped rules.