Event API

The response payload property may change according to the service action executed, check the response payload in the cloud services section.

post
Event

https://{namespace}.reactivehub.io/event/:event_id
Publish events on the platform.
Request
Response
Path Parameters
event_id
required
string
The ID of the event
Headers
client_key
required
string
Client key credentials, see authentication.
client_secret
required
string
Client secret credentials, see authentication.
Body Parameters
<any>
required
object
The body should contains the event model defined by you.
201: Created
Event successfully published.
{
"id": "f19152bd-afee-3dc9-b677-867a29b15154", //event unique id
"event_name": "new-customer", // the processed event name
"match": {
"status": true, // true if has a filter rule matched
"total_rules": 2, // total event filters
"total_matches": 1 // total event filters matched
},
"match_rules": [ // Filter rules matched and action status
{
"id": "on-event", // Filter ID
"condition": null, // Filter conditions
"actions": [ // Actions performed and it status
{
"id": "d964ad77-1370-37b1-99b5-dc499e76f6d5", // The action unique id
"action": {
"id": "add-account-redis", // Action ID
"name": "Save account to Redis", // Action description name
"serviceAccountId": "core-redis", // Service Account used
"serviceAction": "SET" // Service action executed
},
"response": {
"status": true, // TRUE if the action was sucefully performed
"responseTimeMS": 9, //Time it tooks to process in miliseconds
"responseCode": 201 // Service response code
"responsePayload": "?", // The response message may change according to the service action executed, check the response payload in the cloud services section
}
},
{
"id": "947f3907-2273-3a99-a00a-763ef5517375",
"action": {
"id": "add-customer-database",
"name": "Save to Customer Database",
"serviceAccountId": "customer-postgresql-database",
"serviceAction": "INSERT"
},
"response": {
"status": true,
"responseMessage": "Operation performed successfully",
"responseTimeMS": 309,
"responseCode": 201
}
}
]
}
]
}