CustomRule schema from WSO2 API Manager
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/wso2/refs/heads/main/json-schema/admin-api-custom-rule-schema.json", "title": "Custom Rule", "description": "CustomRule schema from WSO2 API Manager", "allOf": [ { "$ref": "#/components/schemas/ThrottlePolicy" }, { "required": [ "keyTemplate", "siddhiQuery" ], "type": "object", "properties": { "siddhiQuery": { "type": "string", "description": "Siddhi query which represents the custom throttling policy", "example": "FROM RequestStream\\nSELECT userId, ( userId == '[email protected]' ) AS isEligible , str:concat('[email protected]','') as throttleKey\\nINSERT INTO EligibilityStream; \\n\\nFROM EligibilityStream[isEligible==true]#throttler:timeBatch(1 min) \\nSELECT throttleKey, (count(userId) >= 10) as isThrottled, expiryTimeStamp group by throttleKey \\nINSERT ALL EVENTS into ResultStream;\n" }, "keyTemplate": { "type": "string", "description": "The specific combination of attributes that are checked in the policy.", "example": "$userId" } } } ] }