API by router
Rule templates
GET
HTTPBearerheader
AuthorizationBearer <token>X-Api-Key?string|nullSuccessful Response
application/json- response
[index: integer]?curl -X GET 'https://example.com/v1/rule-templates'Example Response
[ { "created_at": "2019-08-24T14:15:22Z", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "is_active": true, "name": "string", "rules": [ {} ], "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0", "updated_at": "2019-08-24T14:15:22Z", "version": 0 }]POST
HTTPBearerheader
AuthorizationBearer <token>X-Api-Key?string|nullapplication/json- body
description?string|nullname*NameLength
length <= 200rules*array<>Successful Response
application/json- response
created_at*Created AtFormat
date-timedescription*string|nullid*IdFormat
uuidis_active*Is Activename*Namerules*array<>tenant_id*Tenant IdFormat
uuidupdated_at*Updated AtFormat
date-timeversion*Versioncurl -X POST 'https://example.com/v1/rule-templates' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "rules": [ { "name": "string", "trigger_event": "string" } ]}'Example Response
{ "created_at": "2019-08-24T14:15:22Z", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "is_active": true, "name": "string", "rules": [ {} ], "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0", "updated_at": "2019-08-24T14:15:22Z", "version": 0}GET
HTTPBearerheader
AuthorizationBearer <token>template_id*Template IdFormat
uuidX-Api-Key?string|nullSuccessful Response
application/json- response
created_at*Created AtFormat
date-timedescription*string|nullid*IdFormat
uuidis_active*Is Activename*Namerules*array<>tenant_id*Tenant IdFormat
uuidupdated_at*Updated AtFormat
date-timeversion*Versioncurl -X GET 'https://example.com/v1/rule-templates/497f6eca-6276-4993-bfeb-53cbbbba6f08'Example Response
{ "created_at": "2019-08-24T14:15:22Z", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "is_active": true, "name": "string", "rules": [ {} ], "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0", "updated_at": "2019-08-24T14:15:22Z", "version": 0}DELETE
HTTPBearerheader
AuthorizationBearer <token>template_id*Template IdFormat
uuidX-Api-Key?string|nullSuccessful Response
curl -X DELETE 'https://example.com/v1/rule-templates/497f6eca-6276-4993-bfeb-53cbbbba6f08'Example Response
Empty
PUT
HTTPBearerheader
AuthorizationBearer <token>template_id*Template IdFormat
uuidX-Api-Key?string|nullapplication/json- body
description?string|nullis_active?boolean|nullname?string|nullrules?array<>|nullSuccessful Response
application/json- response
created_at*Created AtFormat
date-timedescription*string|nullid*IdFormat
uuidis_active*Is Activename*Namerules*array<>tenant_id*Tenant IdFormat
uuidupdated_at*Updated AtFormat
date-timeversion*Versioncurl -X PUT 'https://example.com/v1/rule-templates/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "created_at": "2019-08-24T14:15:22Z", "description": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "is_active": true, "name": "string", "rules": [ {} ], "tenant_id": "34f5c98e-f430-457b-a812-92637d0c6fd0", "updated_at": "2019-08-24T14:15:22Z", "version": 0}GET
HTTPBearerheader
AuthorizationBearer <token>template_id*Template IdFormat
uuidX-Api-Key?string|nullSuccessful Response
application/json- response
[index: integer]?curl -X GET 'https://example.com/v1/rule-templates/497f6eca-6276-4993-bfeb-53cbbbba6f08/applications'Example Response
[ { "applied_at": "2019-08-24T14:15:22Z", "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc", "template_version": 0 }]POST
HTTPBearerheader
AuthorizationBearer <token>template_id*Template IdFormat
uuidX-Api-Key?string|nullapplication/json- body
customer_id*Customer IdFormat
uuidSuccessful Response
application/json- response
customer_id*Customer IdFormat
uuidrules_created*Rules Createdrules_skipped*Rules Skippedtemplate_id*Template IdFormat
uuidcurl -X POST 'https://example.com/v1/rule-templates/497f6eca-6276-4993-bfeb-53cbbbba6f08/apply' \ -H 'Content-Type: application/json' \ -d '{ "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e"}'Example Response
{ "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e", "rules_created": 0, "rules_skipped": 0, "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc"}