Splunk AppDynamics

Email Alert using HTTP Template

Sagar_Naringrek
Explorer

Hi Experts,

We are using infobip API service for email integration

We have created a new HTTP Request Template.

In the Request URL section, we have selected the post method and provided a URL. In Authentication, we have added a username and password for authentication.  The settings here is working fine.

In the Payload section, we have selected application/JSON

{
"from":"[email protected]",
"to":"[email protected]}",
"subject":"AppDynamics",
"text":"Appdynamics test Event"
}

Saved configuration and run tests.

The test run result is success. However, in response payload it is throwing below message

{"requestError":{"serviceException":{"messageId":"BAD_REQUEST","text":"Bad request"}}}

Could you please help to resolve this?

Regards,

Labels (3)
Tags (3)
0 Karma

Morelz
Motivator

Hi There

I am assuming you have validated the same using Postman/SOAP UI? and it's working?

Have you added the 2 headers below to the setup in AppDynamics to the request

Accept: application/json

Content-Type: application/json

Let me know

Ciao

0 Karma

Sagar_Naringrek
Explorer

Hi Mario,

Thanks for quick response.

I have checked on postman, there also it is showing same bad request message.

I have added below headers, still it is showing same bad request message.

Accept: application/json

Content-Type: application/json

Regards,

0 Karma

Morelz
Motivator

Thanks

Ok first step is to understand how the InfoBIP API needs your request to be formatted.

I cant get the exact details from the docs

Also I am not sure if the payload has an issue but you have the "to" section end with a }

{
"from":"[email protected]",
"to":"[email protected]}",
"subject":"AppDynamics",
"text":"Appdynamics test Event"
}

Assuming the correct payload should be as below

{
"from":"[email protected]",
"to":"[email protected]",
"subject":"AppDynamics",
"text":"Appdynamics test Event"
}

Can you test 

Sagar_Naringrek
Explorer

Hi Mario,

that } was by mistake. I have corrected as suggested and checked but still, it is showing bad request message.

I tried without any payload and the result was

{"requestError":{"serviceException":{"messageId":"BAD_REQUEST","text":"[from : may not be null, content : must contain at least one of these (text, html or templateId), to : size must be between 1 and 2147483647, subject : may not be null]"}}}

As the User is able to authenticate the request, I guess the problem is with payload only.

Regards,

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Laser Bananas and Edge Hubs: Exploring Operational Technology (OT) Data Through a ...

  OT is a different environment to traditional IT and can have interesting challenges when interfacing the ...

Event Series: Mastering AI Tokenomics and Splunk Agent Observability

Beyond the Black Box: Correlating AI Performance and Tokenomics with Splunk Agent Observability   As ...

span_metrics: The OpenTelemetry-Idiomatic Way to See Inside Your Services

You open a trace in Splunk Observability Cloud and everything looks fine. One root span, order-pipeline, with ...