Custom Event API V2
The new API creates a unique end point URL for each event that is created. As a result, it can accept any JSON (including nested) and parse it
When we parse JSON packets sent to us we flatten nested attributes and place a double underscore between them.
Authentication
If you want us to authenticate your inbound events then you can enable the 'Requires authentication' option. Once this is done, IMIconnect will only accept POST requests with key in the header which is the service key of the service in which the event is created
Once a new event is created, it can start accepting any JSON and all the parameters will be passed onto subsequent rules and flows
You can also enter example JSON or send a live request to parse. These parameters will be saved and available for usage in rules and flows when you start typing with $ to search for a variable.
Here is an example of how a smaple JSON is parsed.
{
"data":[
{
"type":"articles",
"id":"1",
"attributes":{
"title":"JSON API paints my bikeshed!",
"body":"The shortest article. Ever.",
"created":"2015-05-22T14:56:29.000Z",
"updated":"2015-05-22T14:56:28.000Z"
}
}
]
}
Parsed variables
Parameter | Parsed value |
---|---|
data__type | articles |
data__id | 1 |
data__attributes__title | JSON API paints my bikeshed! |
data__attributes__body | The shortest article. Ever. |
data__attributes__created | 2015-05-22T14:56:29.000Z |
data__attributes__updated | 2015-05-22T14:56:28.000Z |