URL
POST https://{api-url}/api/v2/tenants/{tenantId}/integrations/installed/{installedIntgId}/event
Sample URLs
https://{api-url}/api/v2/tenants/client_9/integrations/installed/INTG-24f0fabd-02df-4a83-a93a-f4155f58ddb8/event
Events are used for sending certain notifications whenever an action is performed on OpsRamp entities.
Parameters
Field | Data Type | Description |
---|---|---|
name | String | Name of the Integration event. |
entity | String | Entity on which an action is performed. Supported entities include:
|
eventType | String | Type of action performed on the entity. Supported values include:
|
filterCriteria
| String | (Optional) Filter entities on which the event is added to the rules:
|
useBaseNotifier | Boolean | (Optional) Notification details to trigger events defined. To configure integration base notifier:
|
notifier
| String | (Mandatory if useBaseNotifier is false) Define notification details to trigger events:
|
endPointURI | String | |
thirdPartyEventType | String | Type of action performed on the entity.Supported Values: POST, PUT, GET, DELETE, and PATCH |
headers
| String | Headers
|
payload | File | (Optional) Third-party integration event payload. Provide the third-party payload with OpsRamp placeholders to integrate the event between OpsRamp and third-party:
|
responseHeaders
| String | (Optional) Response headers:
|
Note
- Provide API payload in Base64 encoding.
- Integration event for Alert entity is created only using API but can be viewed from the OpsRamp Portal.
Create event
To create an event:
Sample request
{
"name" : "Create event",
"entity" : "INCIDENT",
"eventType" : "CREATE",
"notifier" : {
"type" : "SOAP_API",
"baseURI" : "www.google.com",
"authType" : "OAUTH2",
"userName" : "testUser",
"password" : "test"
},
"endPointURI" : "www.google.com/update",
"headers" : [
{
"key" : "accept",
"value" : "application/json"
},
{
"key" : "Content-Type",
"value" : "application/json"
}
],
"thirdPartyEventType" : "POST",
"payload" : "ew0KInN1YmplY3QiOiIkaW5jaWRlbnQuc3ViamVjdCIsDQoiZGVzY3JpcHRpb24iOiIkaW5jaWRlbnQuaW1wYWN0IiwNCiJwcmlvcml0eSI6IiRpbmNpZGVudC5wcmlvcml0eS5uYW1lIg0KInN0YXV0cyI6ImhpZ2giDQp9"
}
Sample response
{
"id" : "INTG-EVENT-debdf8a2-6986-4398-adfc-e50b185d049a",
"name" : "Create event",
"entity" : "INCIDENT",
"notifier" : {
"baseURI" : "www.google.com/update",
"authType" : "OAUTH2",
"userName" : "testUser"
},
"headers" : [
{
"key" : "accept",
"value" : "application/json"
},
{
"key" : "Content-Type",
"value" : "application/json"
}
],
"eventPayload" : "{\r\n"subject":"$incident.subject",\r\n"description":"$incident.impact",\r\n"priority":"$incident.priority.name"\r\n}"
}
Create Event with Filter Criteria
To filter the entity with the filter criteria rules and then create an event:
Sample request
{
"name" : "Create event with policy",
"entity" : "INCIDENT",
"eventType" : "CREATE",
"filterCriteria" : {
"matchType" : "ANY",
"rules" : [
{
"key" : "Subject",
"operator" : "Contains",
"value" : "test",
"resourceType" : "INCIDENT"
},
{
"key" : "Description",
"operator" : "Contains",
"value" : "testing",
"resourceType" : "INCIDENT"
}
]
},
"notifier" : {
"type" : "SOAP_API",
"baseURI" : "www.google.com",
"authType" : "OAUTH2",
"userName" : "testUser",
"password" : "test"
},
"endPointURI" : "www.google.com/update",
"headers" : [
{
"key" : "accept",
"value" : "application/json"
},
{
"key" : "Content-Type",
"value" : "application/json"
}
],
"thirdPartyEventType" : "POST",
"payload" : "ew0KInN1YmplY3QiOiIkaW5jaWRlbnQuc3ViamVjdCIsDQoiZGVzY3JpcHRpb24iOiIkaW5jaWRlbnQuaW1wYWN0IiwNCiJwcmlvcml0eSI6IiRpbmNpZGVudC5wcmlvcml0eS5uYW1lIg0KInN0YXV0cyI6ImhpZ2giDQp9"
}
Sample response
{
"id" : "INTG-EVENT-717000e9-bc95-4339-adf7-db7a43db2580",
"name" : "Create event with policy",
"entity" : "INCIDENT",
"filterCriteria" : {
"id" : 140,
"name" : "Create event with policy",
"matchType" : "ALL",
"rules" : [
{
"id" : 579,
"key" : "Subject",
"operator" : "Contains",
"value" : "test",
"resourceType" : "INCIDENT"
},
{
"id" : 580,
"key" : "Description",
"operator" : "Contains",
"value" : "testing",
"resourceType" : "INCIDENT"
}
],
"actions" : []
},
"notifier" : {
"baseURI" : "www.google.com/update",
"authType" : "OAUTH2",
"userName" : "testUser"
},
"headers" : [
{
"key" : "accept",
"value" : "application/json"
},
{
"key" : "Content-Type",
"value" : "application/json"
}
],
"eventPayload" : "{\r\n"subject":"$incident.subject",\r\n"description":"$incident.impact",\r\n"priority":"$incident.priority.name"\r\n"stauts":"high"\r\n}"
}
Create Event with Alert Entity Type
To create an event with alert entity type for work flow events only:
Sample request
{
"name": "Alert event test",
"entity": "ALERT",
"eventType": "CREATE",
"notifier": {
"type": "SOAP_API",
"baseURI": "www.google.com",
"authType": "OAUTH2",
"userName": "testUser",
"password": "test"
},
"endPointURI" : "www.google.com/update",
"headers": [{
"key": "accept",
"value": "application/json"
}, {
"key": "Content-Type",
"value": "application/json"
}],
"thirdPartyEventType": "POST",
"payload": "ewoJInNlcnZpY2VOYW1lIjoiJGFsZXJ0LnNlcnZpY2VOYW1lIiwKCSJyZXNvdXJjZSI6ewoJCSJpZCI6IiRhbGVydC5yZXNvdXJjZUlkIgoJfSwKCSJzdWJqZWN0IjoiJGFsZXJ0LnN1YmplY3QiLAogICAgICAgICJjdXJyZW50U3RhdGUiOiIkYWxlcnQuY3VycmVudFN0YXRlIiwKCSJhcHAiOiJPUFNSQU1QIgp9"
}
Sample response
{
"id": "INTG-EVENT-61301956-5a04-405e-9ee1-03f62595ca05",
"name": "Alert event test",
"entity": "ALERT",
"notifier": {
"baseURI": "www.google.com/update",
"authType": "OAUTH2",
"userName": "testUser"
},
"thirdPartyEventType": "POST",
"headers": [
{
"key": "accept",
"value": "application/json"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"eventPayload": "{\n\t"serviceName":"$alert.serviceName",\n\t"resource":{\n\t\t"id":"$alert.resourceId"\n\t},\n\t"subject":"$alert.subject",\n "currentState":"$alert.currentState",\n\t"app":"OPSRAMP"\n}"
}