We are successfully creating Alerts and are sending extra key pairs, but the key pairs are not showing.
eg. Node: SEAVM01, NodeLocation: Seattle, NodeLocalTimeZone: PDT
I've looked at the following pages:
These pages have warning boxes that say:
However the API integration page has space for adding Extra Properties key pairs
Is it:
Name Value
Node {{Node}}
Node {{details.Node}}
Node {{extraPropertiesKeyValue.Node}}
{{extraProperties}} {{extraPropertiesKeyValue}}
The documentation looks like the API Integrations page has changed and so not sure proper format.
Hi @Mikel Stous ,
The documentation looks a bit different because there are different plans and some plans have access to the "advanced settings" in the integrations.
You actually don't need to add anything to the ExtraProperties field; you can simply leave the default value of {{extraProperties}} there and then in the API payload you will need to add the extraProperties key (along with your values), which would look like this:
We've tried it with "extraProperties": [{"key1": "value1"},{"key2": "value2"}]
and we've tried it with "extraProperties": { "serverName": "Zion", "region": "Oregon" } as per API documentation. https://docs.opsgenie.com/docs/incident-api#get-incident
We were able to verify our JSON output and the Alert comes through fine,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mikel Stous ,
Please post your entire request with the headers so I can help (please remember to redact your API key).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
They figured it out
We're using the Alert API (https://docs.opsgenie.com/docs/alert-api), so we needed to put it in the key pair map as "details", and we also needed "isExtraPropertiesWithKey" (mentioned in https://docs.opsgenie.com/docs/integration-api#create-a-new-integration-action)
"details":{"key1":"value1","key2":"value2"},
"isExtraPropertiesWithKey": true,
In OpsGenie, would specifying {{details}} have worked instead of {{extraProperties}}?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mikel Stous You're right, it should be "details" as the key instead of "extraProperties" for creating the alert. I was using the integration API. But I was able to process it without the "isExtraPropertiesWithKey: true" flag, just using the default payload here: https://docs.opsgenie.com/docs/alert-api#create-alert
The "details" key in the payload will match up to "extraProperties" in the Opsgenie UI so you want to leave that as "extraProperties" on the integration.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.