How to access RESTAPIRequest in MID Server Script Include [ecc_agent_script_include]

Jiri Simek
Tera Contributor

Hello,

The "Listener Transform Script" of "Instance" type, which I need to transfer to "MID" type, requires access to received RESTAPIRequest to read its header parameters. Parameter values are utilized further for the Event payload transformation generated by AWS. Access to RESTAPIRequest in Listener Transform Script of "Instance" type is implemented by the "request" parameter in the "process" javascript function. 

(function process(/*RESTAPIRequest*/ request, body) {
	
var messageType = new AWSSNSMessage().subscibeAndGetType(request, body);
if (messageType.equals("Notification")) {
	try {
		var awsDataObject = JSON.parse(body);
		var topicArn = awsDataObject.TopicArn;
....


Does anybody know how to get access to RESTAPIRequest in javascript stored in MID Server Script Include [ecc_agent_script_include] ?
I apologize if this topic has already been discussed here. If so, can you share the link?
Thank you for any idea.
Best regards,
Jiří Šimek

0 REPLIES 0