SendEventCustomBody - usil/eventhos-web GitHub Wiki
In this video it will be shown how to conduce this use case.
📹 video
These objects body, query params, headers, oauth2-response are merged in one to be easy to query them using jsonpath
{
"body" : {....},
"query" : {....},
"headers" : {....},
"oauthResponse" : {
"body" : {....},
"headers" : {....}
}
}
{}
source request
{
"firstName": "John",
"lastName": "doe",
"age": 26,
"address": {
"streetAddress": "naist street",
"city": "Nara",
"postalCode": "630-0192"
},
"phoneNumbers": [
{
"type": "iPhone",
"number": "0123-4567-8888"
},
{
"type": "home",
"number": "0123-4567-8910"
}
]
}
transformed request
{
"primerNombre" : "${.body.firstName}",
"foo" : "bar"
}
- clientid/clientsecret are sent as json
- oauthResponse.body oauthResponse.headers will contain the data ready to be used with jsonpath
Send an event from a producer system to a consumer system with custom body.
- Have administrative access.
- Login
- Create Aplication Resource
- Create Rol
Select the App resource creado anteriormente y dar check al check button *.
- Create client and save credentials
- Create producer system
- Create consumer system
7. Create Event
- Create Action
First parth
Second parth.
This is a example of custom body, should be write with json path.
- Create Contract
- The input **Mail recipients on error** is optional. They are the mails that received an email when an error appears.
- Use tool to run the event and its associated contracts
- Send a **event-identifier** and **access-key**.
- Send in the body the parameters expected and written in the action.
- Should be return a successful message.
- Should be execute endpoint saved in actions to consumer system.
Send a event-identifier and access-key.
Send the parameters in the body.
In the consumer system, I should receive the parameters sent.