Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
02-12-2019 06:35 AM
Team,
With recent release (4.5) we see "API Client" through which we can pull metric data via POST API.
Even though we have documentation available at https://docs.appdynamics.com/display/PRO45/API+Clients
But I have not been able to execute it successully, so thought to check with you.
In below code, we have API Client named 'test21' and Account i am taking by default that is customer1.
Appreciate your help.
geturl = 'https://'+ControllerPort+'/controller/api/oauth/access_token'
client_secret = '<<Secret_Copied>>'
data = {'grant_type': 'client_credentials','Content-Type': 'application/vnd.appd.cntrl+protobuf;v=1'}
access_token_response = requests.post(geturl, data=data, verify=False, allow_redirects=False, auth=('test21@customer1', client_secret))
print(access_token_response.text)
Solved! Go to Solution.
02-13-2019 01:02 PM
Any Updates or Response?
02-13-2019 08:30 PM
Hi Vaibhav
I am able to run this succcessfully. See the below command for your referance.
curl -H "Authorization:Bearer Authkey "https://controller.appdynamics.com/controller/rest/applications"
02-13-2019 09:18 PM
02-14-2019 08:47 PM
Hi vaibhav
I did not develop any python code...if you can share your full code i can test with my controller and get back to you.
cheers
Umer
02-14-2019 09:01 PM
02-14-2019 09:13 PM
Do you have time for quick webex?
02-15-2019 08:38 AM
02-17-2019 10:40 PM
Ok lets take one step back.
the command I tested is curl -H "Authorization:Bearer Authkey "https://controller.appdynamics.com/controller/rest/applications"
so when you create a API client from Adminstartion tab then make sure you use access token not the client secret
Under the roles I tried with Admin not sure which role you are trying but I am not saying that it should be an admin
02-28-2019 12:57 PM
I tried above it is working (no issue with my setup)
My query is how to use secreta nd create token and use that for subsequent multiple REST API calls.
Regards,
Vaibhav
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form