URL
POST https://{api-url}/api/v2/tenants/{tenantId}/integrations/install/{intgId}
Headers
- Authorization: Bearer {accessToken}
- Content-Type: application/json
- Accept: application/json
Status code
200 OK
Sample URLs
To install email alerts:
https://{api-url}/api/v2/tenants/client_8/integrations/install/Email Alerts
To install email request:
https://{api-url}/api/v2/tenants/client_9/integrations/install/EMAILINCIDENTS
Parameters
Field | SubField | Data Type | Description |
---|---|---|---|
displayName | N/A | String | Display name for the integration. |
logo | name | String | Logo name for the integration. |
logo | file | String | Base64 code file of the logo. |
ticketType | N/A | String | The following ticket types are supported:
|
emailProps | name | String | Name of parsing conditions set. |
emailProps | identifier | String | Unique value of a set. Email data identifies the set with this identifier and parses with the respective parsing conditions. |
emailProps | identifierSource | String | Source for considering the unique value. Supported Values: EMAIL_SUBJECT, EMAIL_CONTENT, DEFAULT_VALUE. |
emailProps | properties: name | String | Name property for the email. Example: Alert State |
emailProps | properties: defaultValue | String | Default Value is considered if any of the properties do not match with the respective configured values. |
emailProps | properties: condition: contentSource | String | Source condition to filter the values from the email data. Source from which the values should be considered. Supported Values: EMAIL_SUBJECT, EMAIL_CONTENT, DEFAULT_VALUE. |
emailProps | properties: condition: operator | String | Unique keys condition to filter the values from the email data. Unique keys required to filter the values from the content source. Supported Values: BETWEEN, BEFORE, AFTER, MATCHES. |
emailProps | properties: condition: startValue | String | Initial value condition to filter the values from the email data. |
emailProps | properties: condition: endValue | String | End value condition to filter the values from the email data. Start value and End value are filter properties. These properties are used to filter a certain value between the start value and end value. |
emailProps | properties: condition: regexStr | String | Regex string condition to filter the values from the email data. Provide a regex string of the value that considered from the content source. |
emailProps | properties: propertyMappings: attrValues : attrValue | String | Attribute values. OpsRamp attributes that map to third-party attributes. |
emailProps | properties: propertyMappings: attrValues: thirdPartyAttrValue | String | Attribute values. Map third-party attributes that map to OpsRamp attributes. |
inboundConfig | dropAlertsOnUnmanagedResources | Boolean | (Optional) When enabled, this parameter discards alerts from resources that are unmanaged. It is applicable only for email alerts. Options: true/false. Default: false |
NA indicates that the value is not applicable.
Sample 1 - Install email alert integration
All incoming alert emails are processed. Apply user-defined rules to create, acknowledge, and close alerts incoming emails.
https://{api-url}/api/v2/tenants/client_8/integrations/install/Email Alerts
Convert image to Base64 and enter the code in file field as shown in the following sample request.
Sample request
{
"displayName" : "email alerts test",
"inboundConfig" : {
"dropAlertsOnUnmanagedResources" : "true"
},
"emailProps":[{
"name":"test set 1",
"identifier":"identify",
"identifierSource":"EMAIL_CONTENT",
"properties": [{
"name":"Alert State",
"defaultValue":"OK",
"condition":{
"contentSource": "EMAIL_CONTENT",
"operator": "BETWEEN",
"startValue": "word1",
"endValue": "word2"
}
},{
"name":"Service Name",
"condition":{
"contentSource": "EMAIL_CONTENT",
"operator": "BETWEEN",
"startValue": "word1",
"endValue": "word2"
}
},
{
"name":"Device Host Name",
"condition":{
"contentSource": "EMAIL_CONTENT",
"operator": "BETWEEN",
"startValue": "word1",
"endValue": "word2"
}
}
]
}]
}
Sample response
{
"id": "INTG-d9b99937-7906-42c7-955c-68a237144ac7",
"displayName": "email alerts test",
"integration": {
"id": "Email Alerts",
"name": "Email Alerts",
"multipleInstallations": true
},
"emailAddress": "alerts@5JHqWy4h34xXDwN2gYFtmaYx.opsramp.com",
"inboundConfig": {
"dropAlertsOnUnmanagedResources": "true"
},
"emailProps": [
{
"name": "test set 1",
"identifier": ".",
"identifierSource": "EMAIL_CONTENT",
"properties": [
{
"name": "Alert State",
"defaultValue": "OK",
"condition": {
"contentSource": "EMAIL_CONTENT",
"operator": "BETWEEN",
"startValue": "word1",
"endValue": "word2"
}
},
{
"name": "Service Name",
"condition": {
"contentSource": "EMAIL_CONTENT",
"operator": "BETWEEN",
"startValue": "word1",
"endValue": "word2"
}
},
{
"name": "Device Host Name",
"condition": {
"contentSource": "EMAIL_CONTENT",
"operator": "BETWEEN",
"startValue": "word1",
"endValue": "word2"
}
}
]
}
],
"alertSource": {
"id": 6,
"name": "Email Alerts",
"displayName": "Email Alerts",
"techUid": "Email Alerts"
},
"installedBy": "opsramp_api_user",
"installedTime": "2020-10-09T08:30:49+0100",
"status": "enabled"
}
Sample 2 - Install email request integration
Email request integration creates tickets in OpsRamp using email.
https://{api-url}/api/v2/tenants/client_9/integrations/install/EMAILINCIDENTS
Convert image to Base64 and enter the code in file field as shown in the following sample request.
Sample request
{
"displayName" : "email incidents test",
"ticketType": "INCIDENT",
"emailProps": [{
"properties": [{
"name": "Priority",
"defaultValue": "Low",
"condition": {
"contentSource": "EMAIL_CONTENT",
"operator": "BETWEEN",
"startValue": "word1",
"endValue": "word2"
},
"propertyMappings": {
"attrValues": [{
"attrValue": "Low",
"thirdPartyAttrValue": "myval"
}]
}
}, {
"name": "Subject",
"condition": {
"contentSource": "EMAIL_CONTENT",
"operator": "BETWEEN",
"startValue": "word1",
"endValue": "word2"
}
}, {
"name": "Description",
"value":"Email Description"
} , {
"name":"Allow anonymous user",
"value":"true"
}]
}]
}
Sample response
{
"id": "INTG-02d467ee-41f2-4d1e-9c55-e8365b421f21",
"displayName": "email incidents test",
"integration": {
"id": "EMAILINCIDENTS",
"name": "Email Requests",
"multipleInstallations": true
},
"emailAddress": "incidents@5JHqWy4h34xXDwN2gYFtmaYx.opsramp.com",
"emailProps": [
{
"properties": [
{
"name": "Allow anonymous user",
"value": "true"
},
{
"name": "Subject",
"value": "Email Subject"
},
{
"name": "Description",
"value": "Email Description"
},
{
"name": "Priority",
"defaultValue": "Low",
"condition": {
"contentSource": "EMAIL_CONTENT",
"operator": "BETWEEN",
"startWord": "word1",
"endWord": "word2"
},
"propertyMappings": {
"name": "Priority",
"attrName": "incident.priority.name",
"entityType": "INCIDENT",
"attrValues": [
{
"attrValue": "Low",
"thirdPartyAttrValue": "myval"
}
]
}
}
]
}
],
"installedBy": "opsramp_api_user",
"installedTime": "2020-10-08T11:02:23+0100",
"status": "enabled"
}