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

FieldData TypeDescription
nameStringName of the Integration event.
entityStringEntity on which an action is performed. Supported entities include:
  • Service Desk
    • INCIDENT
    • SERVICEREQUEST
    • CHANGE
    • PROBLEM
    • TASK
  • Resource
  • Alert
    • ALERT (used only when eventType is selected as NONE)
eventTypeStringType of action performed on the entity. Supported values include:
  • NONE (Used to invoke external integration through process workflow)
  • CREATE
  • UPDATE
  • DELETE
filterCriteria
  1. matchType
  2. rules
    • resourceType
    • key
    • operator
    • value
String(Optional) Filter entities on which the event is added to the rules:
  1. Match All or Any of the rules.
    • Supported Values: ANY, ALL
  2. Rules to filter the entities:
    • Entity to which the event is added.
    • The unique property of the entity. Example: Subject, Description.
    • Matching parameter
      • Supported Values: Contains, Not Contains, Equals, Not Equals, Starts with, Ends with, Regex. Example: resourceType: Incident, key: Subject, operator: Contains, value: Windows.
    • Value of the entity.
useBaseNotifierBoolean(Optional) Notification details to trigger events defined. To configure integration base notifier:
  • Provide useBaseNotifier: true to assign the notifier details to the event.
  • Provide useBaseNotifier: false to assign different notifier details
    • Supported Values: true, false.
notifier
  1. type
  2. baseURI
  3. authType
  4. grantType
  5. userName
  6. password
  7. apiKey
  8. apiSecret
  9. accessTokenURL
String(Mandatory if useBaseNotifier is false) Define notification details to trigger events:
  1. Notification type. Supported values include:
    • REST_API
    • SOAP_API
  2. Authentication type. Supported values include:
    • BASIC
    • OAUTH2
    • NONE
  3. Grant type. Mandatory if authType is OAUTH2. Supported values include:
    • CLIENT_CREDENTIALS
    • PASSWORD
    • REFRESH_TOKEN
  4. Username. Mandatory if authType is OAUTH2 and grantType is PASSWORD or REFRESH_TOKEN.
  5. Password. Mandatory if authType is OAUTH2 and grantType is PASSWORD or REFRESH_TOKEN.
  6. Key configured in third-party integration. Mandatory if authType is OAUTH2.
  7. Secret configured in third-party integration. Mandatory if authType is OAUTH2.
  8. Access token URL. Mandatory if authType is OAUTH2.
endPointURIString
thirdPartyEventTypeStringType of action performed on the entity.Supported Values: POST, PUT, GET, DELETE, and PATCH
headers
  1. key
  2. value
StringHeaders
  1. Header name
  2. Header value
payloadFile(Optional) Third-party integration event payload. Provide the third-party payload with OpsRamp placeholders to integrate the event between OpsRamp and third-party:
  • To get OpsRamp tokens, use refer to the Get Integration Event Placeholders API.
  • Convert the payload to base 64 and provide the file in the field file in the below sample request.
responseHeaders
  1. key
  2. value
String(Optional) Response headers:
  1. Response header name
  2. Response header value

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}"
}