Controller (SaaS, On Premise)

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Swagger API

SOLVED

Using Swagger API

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

 

 

Using Swagger API
3 REPLIES 3
Employee

Re: Using Swagger API

 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).

 

Screen Shot 2017-07-28 at 4.51.10 PM.pngScreen Shot 2017-07-28 at 4.51.30 PM.png 

Regards,

Pratik



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Re: Using Swagger API

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

 

 

 

Employee

Re: Using Swagger API

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.

 

Screen Shot 2017-07-31 at 1.46.51 PM.pngScreen Shot 2017-07-31 at 1.45.40 PM.png 

 

Regards,

Pratik



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.