v1
latestOpenAPI 3.1.02026-07-1324323188.8 KBRetrieves the collection of Draft rules
This endpoint allows to retrieve the collection of draft rules of the project. Draft rules represent changes that have been saved in the project but not yet published. Each draft comes with a status property, which can be one of:
- add: this is a new rule that is going to be added when publishing the ruleset
- update: this is an already existing redirection rule that is going to be changed when publishing the ruleset
- delete: this is an existing redirection rule that is going to be removed when publishing the ruleset
💡 Please note that there is pagination on this endpoint. Each page contain 100 items. Traversing the draft rules collection can be done using the searchAfterId query string parameter.
Query parameters
The id of the project.
The id of the last draft returned in the previous page. Used for pagination.
The name of one or more tags. Every draft that is attached to at least one of those tags will be returned. Tags can also be passed as a comma separated list.
The enabled status of the rule.
The trigger source URL. This allows to filter draft rules that are triggered by a specific URL.
Response
Draft collection
Example response
[
{
"rule": {
"actions": [
{
"mode": "default"
}
],
"markers": [
{
"description": "My enum marker that only allow \"dog\" or \"cat\"",
"name": "MyEnum",
"transformers": [
{
"something": "foo",
"with": "bar"
}
]
}
],
"trigger": {
"date": [
{
"operator": "equals"
}
],
"datetime": [
{
"operator": "after"
}
],
"ipAddress": {
"ip": "1.2.3.4"
},
"methods": [
"GET",
"POST"
],
"requestHeaders": [
{
"name": "Accept",
"operator": "isNotEqualTo",
"value": "application/json"
}
],
"responseStatusCodes": [
500,
503
],
"sampling": 47,
"source": "/old-url",
"time": [
{
"operator": "after"
}
]
},
"variables": [
{
"marker": "markerName",
"name": "myVariable",
"transformers": [
{
"something": "foo",
"with": "bar"
}
]
}
]
},
"status": "add"
}
]