AppD Archive

Using Swagger API

Sundarapandian_
Path Finder

Hi,

Could someone please help accessing swagger controller APIs?

https://docs.appdynamics.com/display/PRO42/Access+Swagger+and+Accounts+API

I'm just trying  to follow the above mentioned URL... logged in to the controller with a local user name, tried to access REST API via browser as stated in the doc, however it does not allow me to  use 'GET' , it pops up another authentication window and fails with response code 500 (see attached), if i use the same username, password that i used to access controller UI

However, if i use the same account credentails in a 'CURL' command via CLI, i can execute the command successfully . Wondering how swagger API authentication different.

Please advise

Thanks!

Sundar

0 Karma
1 Solution

Pratik_Maskey
Communicator

Hi Sundarapandian,

The API "/accounts/accountinfo" is for only for system account. We need to login as root@system with the root user password.Do refer the attached screen for your referance.

image.pngimage.png 

Regards,

Pratik

View solution in original post

Pratik_Maskey
Communicator

 Hi Sundarapandian,

 

Form the attached screenshot we noticed following message "The user is not authorised to access account:81". Could you try to get the your user account id through GET (/accounts/myaccount) refer the attached screenshot and then use the account id returned to get applications (/accounts/{accId}/applications).

image.pngimage.png 

Regards,

Pratik

0 Karma

Sundarapandian_
Path Finder

Hi Pratik,

Thanks for you response, you are correct!, the account id that i see from /account/myaccount is different, i tried with that id and i could GET /accounts/{accId}/applications, however when i tried /accounts/accountinfo it failed with response code 403 (see attached). Any reason?

Regards,

Sundar

0 Karma

Pratik_Maskey
Communicator

Hi Sundarapandian,

The API "/accounts/accountinfo" is for only for system account. We need to login as root@system with the root user password.Do refer the attached screen for your referance.

image.pngimage.png 

Regards,

Pratik

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...

Index This | How many sevens are there between 1 and 100?

August 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...