Splunk AppDynamics

API Problem

CommunityUser
Splunk Employee
Splunk Employee

I have upgraded to 4.3 last week for our on premise environment. Since the update I have been unable to access the REST URL from the metric browser. It returns a 403 Access Forbidden error. I have also been unable to use a curl command such as curl -i --user c***@customer1:****https://appdynamics.******.com/controller/rest/applications/SvcMgmt-Remedy9-Prod/metric-data?metric-.... It did work a couple days ago but then it failed again.

Does anyone have any suggestions about how to fix this? 

Thanks 

Labels (3)
0 Karma
1 Solution

Pratik_Maskey
Communicator

Hello Wesley,

Are you trying the REST API on the same browser where you have logged in to your controller?
If yes, then it will not work because since 4.3.3 we have implemented anti-CSRF token to prevent cross site vulnerabilities. It means alone jsessionID is not sufficient and it requires CSRF token as well which is not passed along if your are using the same browser session you logged into your SaaS controller.

You can do the following:

1) Either use a REST client where you can enter the username/password in the format username = <username>@<account-name> and password.
OR
2) Open a new browser or incognito mode to try the same URL and it will prompt you to enter the username and password.
Remember username is always <username>@<account-name>

Regards,

Pratik

View solution in original post

0 Karma

Pratik_Maskey
Communicator

Hello Wesley,

Are you trying the REST API on the same browser where you have logged in to your controller?
If yes, then it will not work because since 4.3.3 we have implemented anti-CSRF token to prevent cross site vulnerabilities. It means alone jsessionID is not sufficient and it requires CSRF token as well which is not passed along if your are using the same browser session you logged into your SaaS controller.

You can do the following:

1) Either use a REST client where you can enter the username/password in the format username = <username>@<account-name> and password.
OR
2) Open a new browser or incognito mode to try the same URL and it will prompt you to enter the username and password.
Remember username is always <username>@<account-name>

Regards,

Pratik

0 Karma

Abhilash_C
Explorer

Hi Pratik,

Thanks For your Valuable Reply. It worked for me as you suggested but it Didn't Returned any XML output ? It Just Returned

<metric-datas/>

Do we need to configure something to access this Rest API ? Please help me 

0 Karma
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...