Emit an event
This REST call allows you to emit an event in BizzStream's event framework.
URL
/api/v2/event/emit
Method
POST
URL parameters
Parameter | Type | Required | Description |
---|---|---|---|
type | String | Yes | The type of the event. |
Body
A JSON object that contains the information of the event that is to be emitted.
Response
A JSON object that indicates whether the event was emitted successfully:
{
status: 'ok',
description: 'The event has been emitted.',
userDescription: 'The event has been emitted.',
}
Example
curl /api/v2/event/emit/PURCHASE_ORDER_CREATED \
-H "authorization: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiI1ZjE1MzI0MDJiOTlhZDAwN2Q2NGFiNGIiLCJleHBpcmVzIjoxNzAzMzc3MzQ4MTY2fQ.N6L8jlpk9HBRjRB3bgKXCMrNtyZArNAzg1RRpgXyOtM" \
-H "environment-id: 5f1532402b99ad007d64ab4b" \
-H "accept: application/json" \
-X POST \
-d '{
"code": "001",
"amout": 500,
"clientId": "4ee0b1b4-5408-45e8-a924-9247d432b5e0"
}'