API by router
Rules
GET
HTTPBearerheader
AuthorizationBearer <token>instance_id?|nullactive_only?Active OnlyDefault
falseX-Api-Key?string|nullSuccessful Response
application/json- response
[index: integer]?curl -X GET 'https://example.com/v1/rules'Example Response
[ { "actions": [ {} ], "conditions": [ {} ], "cooldown_seconds": 0, "created_at": "2019-08-24T14:15:22Z", "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366", "is_active": true, "last_triggered_at": "2019-08-24T14:15:22Z", "name": "string", "priority": 0, "rule_key": "string", "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0", "trigger_count": 0, "trigger_event": "string", "updated_at": "2019-08-24T14:15:22Z" }]POST
HTTPBearerheader
AuthorizationBearer <token>X-Api-Key?string|nullapplication/json- body
actions?array<>Items
1 <= itemsconditions?array<>cooldown_seconds?Cooldown SecondsRange
0 <= valueDefault
300customer_id?|NULL = tenant-wide, set = customer-specific
description?string|nullinstance_id?|nullis_active?Is ActiveDefault
truename*NameLength
1 <= length <= 200priority?PriorityRange
0 <= valueDefault
0rule_key?|Override key — same key suppresses tenant rule
trigger_event*Trigger EventSuccessful Response
application/json- response
actions*array<>conditions*array<>cooldown_seconds*Cooldown Secondscreated_at*Created AtFormat
date-timecustomer_id?|nulldescription*string|nullid*IdFormat
uuidinstance_id*|nullis_active*Is Activelast_triggered_at*|nullname*Namepriority*Priorityrule_key?string|nulltenant_id*Tenant IdFormat
uuidtrigger_count*Trigger Counttrigger_event*Trigger Eventupdated_at*Updated AtFormat
date-timecurl -X POST 'https://example.com/v1/rules' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "trigger_event": "string"}'Example Response
{ "actions": [ {} ], "conditions": [ {} ], "cooldown_seconds": 0, "created_at": "2019-08-24T14:15:22Z", "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366", "is_active": true, "last_triggered_at": "2019-08-24T14:15:22Z", "name": "string", "priority": 0, "rule_key": "string", "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0", "trigger_count": 0, "trigger_event": "string", "updated_at": "2019-08-24T14:15:22Z"}GET
Successful Response
application/json- response
[index: integer]?curl -X GET 'https://example.com/v1/rules/replayable-services'Example Response200
[ {}]curl -X GET 'https://example.com/v1/rules/trigger-types'Example Response200
[ { "description": "string", "event": "string", "label": "string", "payload_fields": [ {} ] }]GET
HTTPBearerheader
AuthorizationBearer <token>rule_id*Rule IdFormat
uuidX-Api-Key?string|nullSuccessful Response
application/json- response
actions*array<>conditions*array<>cooldown_seconds*Cooldown Secondscreated_at*Created AtFormat
date-timecustomer_id?|nulldescription*string|nullid*IdFormat
uuidinstance_id*|nullis_active*Is Activelast_triggered_at*|nullname*Namepriority*Priorityrule_key?string|nulltenant_id*Tenant IdFormat
uuidtrigger_count*Trigger Counttrigger_event*Trigger Eventupdated_at*Updated AtFormat
date-timecurl -X GET 'https://example.com/v1/rules/497f6eca-6276-4993-bfeb-53cbbbba6f08'Example Response
{ "actions": [ {} ], "conditions": [ {} ], "cooldown_seconds": 0, "created_at": "2019-08-24T14:15:22Z", "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366", "is_active": true, "last_triggered_at": "2019-08-24T14:15:22Z", "name": "string", "priority": 0, "rule_key": "string", "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0", "trigger_count": 0, "trigger_event": "string", "updated_at": "2019-08-24T14:15:22Z"}PATCH
HTTPBearerheader
AuthorizationBearer <token>rule_id*Rule IdFormat
uuidX-Api-Key?string|nullapplication/json- body
actions?array<>|nullconditions?array<>|nullcooldown_seconds?|nullcustomer_id?|nulldescription?string|nullinstance_id?|nullis_active?boolean|nullname?|nullpriority?|nullrule_key?|nulltrigger_event?string|nullSuccessful Response
application/json- response
actions*array<>conditions*array<>cooldown_seconds*Cooldown Secondscreated_at*Created AtFormat
date-timecustomer_id?|nulldescription*string|nullid*IdFormat
uuidinstance_id*|nullis_active*Is Activelast_triggered_at*|nullname*Namepriority*Priorityrule_key?string|nulltenant_id*Tenant IdFormat
uuidtrigger_count*Trigger Counttrigger_event*Trigger Eventupdated_at*Updated AtFormat
date-timecurl -X PATCH 'https://example.com/v1/rules/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "actions": [ {} ], "conditions": [ {} ], "cooldown_seconds": 0, "created_at": "2019-08-24T14:15:22Z", "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "instance_id": "06587974-2dbe-4e10-8bf9-38cce0f5a366", "is_active": true, "last_triggered_at": "2019-08-24T14:15:22Z", "name": "string", "priority": 0, "rule_key": "string", "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0", "trigger_count": 0, "trigger_event": "string", "updated_at": "2019-08-24T14:15:22Z"}DELETE
HTTPBearerheader
AuthorizationBearer <token>rule_id*Rule IdFormat
uuidX-Api-Key?string|nullSuccessful Response
curl -X DELETE 'https://example.com/v1/rules/497f6eca-6276-4993-bfeb-53cbbbba6f08'Example Response
Empty
POST
HTTPBearerheader
AuthorizationBearer <token>rule_id*Rule IdFormat
uuidX-Api-Key?string|nullapplication/json- body
Dry-run test: provide a sample payload and see which conditions match.
payload*Sample event payload to test against
Successful Response
application/json- response
actions_that_would_fire*array<>all_conditions_met*All Conditions Metcondition_results*array<>rule_id*Rule IdFormat
uuidrule_name*Rule Namecurl -X POST 'https://example.com/v1/rules/497f6eca-6276-4993-bfeb-53cbbbba6f08/test' \ -H 'Content-Type: application/json' \ -d '{ "payload": {}}'Example Response
{ "actions_that_would_fire": [ {} ], "all_conditions_met": true, "condition_results": [ {} ], "rule_id": "728c1541-d6d1-4290-9a53-cdf01dd32d60", "rule_name": "string"}