This API allows third party/external applications to make event requests using a RESTful API over HTTPS to the IMIconnect platform.
Prerequisites
Following are the prerequisites to use this API.
Service Key | A service must be created in IMIconnect to get a service key. Click here to create a service. |
Event | Create an event in a service. |
Rule | Create a rule within the event. |
Actions | Create actions within the rule. |
Request
The event request is specified as follows:
URI | https://api.imiconnect.com/resources/v1/events/externalevent/ Note: If your IMIconnect web access URL is on a .io TLD, then you should use the API end point with .io. For example, if your domain is mycompany.imiconnect.com then your API base URL will be api.imiconnect.com . But, if your domain is mycompany.imiconnect.io then your API base URL will be api.imiconnect.io . |
Method | POST |
Request Headers
The following table describes the request headers:
Request Header | Description |
---|---|
key | Service Key |
content-type | application/json |
{
"expiry":"<expiry time in UTC format>",
"notifyurl":"<Notification URL>",
"events":[
{
"evtid":"<Event ID>",
"correlationid":"<Unique transaction ID from the client end>",
"parameters":
{
"param1":"value1",
"param2":"value2"
}
}
]
}
{
"expiry":"<expiry time in UTC format>",
"notifyurl":"<Notification URL>",
"events":[
{
"evtid":"<Event ID>",
"correlationid":"<Correlation ID>",
"parameters":
{
"param1":"value1",
"param2":"value2"
}
},
{
"evtid":"<Event ID>",
"correlationid":"<Correlation ID>",
"parameters":
{
"param1":"value1",
"param2":"value2"
}
}
]
}
Request Body
The following table describes the elements in the request body:
Parameter | Type | Mandatory | Description |
---|---|---|---|
expiry | String | No | Expiry time is in UTC format, after which no action is taken. For example,
|
notifyurl | String | No | Specifies a URL that receives notifications. This URL overrides the service's Notify URL. For example,
|
events | Array of Strings | Yes | Specifies the events in an array. The parameters are:
For example,
|
If a mandatory parameter is missing, then the API will execute with default values. If the default values are not defined then the API request will be rejected.
If an optional parameter is missing, then the API will execute with default values. The API request is accepted even if the default values are not defined.
{
"response":{
"code":"<Status code>",
"description" : "<Description of status code>",
"transid":"< Transaction ID generated by IMIconnect >",
"correlationid":"<Correlation ID>",
}
}
Response / return codes
This API may return the following response codes:
Response Code | Message | Description |
---|---|---|
1002 | Queued | Returned when the request is accepted by IMIconnect. |
7000 | Invalid JSON | Returned when an invalid JSON request is sent. |
7001 | Authentication failed | Returned when an invalid service key or profile key is provided in the request. |
7004 | Invalid parameters/values | Returns when any invalid value is given for any parameter in request body. |
7005 | Internal error occurred | Returned when there is an issue with IMIconnect. |
7020 | You have reached maximum transaction limit | Returned when you have reached the transaction limit. |
7025 | Mandatory custom parameters missing | Returns when any mandatory custom event parameter is missing, where these custom parameters are created in custom event creation screen. |
7027 | Invalid XML | Returned when an invalid XML request is sent. |