Splunk AppDynamics

Facing issue with AppDynamics API REST call authentication

CommunityUser
Splunk Employee
Splunk Employee

Hi ,
I am unable to access AppDynamics REST API.
If I write a sample code using the python client

from appd.request import AppDynamicsClient
c = AppDynamicsClient('URL','group','appd@123')
for app in c.get_applications():
print app.id, app.name


It works fine .

But if I do a simple REST call like the following
I get the following response

import requests
usr =<uid>
pwd =<pwd>
url ='http://10.201.51.40:8090/controller/rest/applications?output=JSON'
response = requests.get(url,auth=(usr,pwd))
print 'response',response


response <Response [401]>
Am I doing anything wrong here ? In case anybody has faced such issue please let me know 

Labels (3)
0 Karma

Atyuha_Pal
Contributor

Hi Ayan,

Could you please  verify the password is correct by login in to the controller with the credentials. As  401 Unauthorized

Error means the page you were trying to see needs valid user ID and password.

Thanks,

Atyuha Pal

0 Karma
Get Updates on the Splunk Community!

Best Strategies to Optimize Observability Costs

 Join us on Tuesday, May 6, 2025, at 11 AM PDT / 2 PM EDT for an insightful session on optimizing ...

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...