0

Continuing the Response Duplication - how to pass along original event data?

This is a follow up to:

https://support.xmatters.com/hc/en-us/community/posts/115000018286-Using-response-to-duplicate-event-to-different-team 

So in the above it looks like you can build/forward the new event with eventProperties from the old event

// Prepare the HTTP request
var request = http.request({
'endpoint': 'xMatters',
'method': 'POST',
'path': '/reapi/2015-04-01/forms/c34c75ba-379f-4d58-99b4-02154cc8fb79/triggers',
'headers': {
'Content-Type': 'application/json'
}
});

// Where the 'path' is the form uuid destination for the new event

// Prepare the HTTP request body
var json = {
"recipients": recipients,
"Message": callback.eventProperties.Message,
};

// Where recipients is set to the new group and Message is also included in the form


// Submit the request and capture the response
var response = request.write(json);


The problem is then that the "Message" part of the payload gets rejected with "DATA_FORMAT_ERROR", that includes a list of allowed properties/fields

Removing "Message" works fine, but now we can't forward information from the original notification.

5 comments

Please sign in to leave a comment.