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
06-17-2020 11:26 PM - last edited on 06-18-2020 09:05 AM by Ryan.Paredez
Hi all,
I'm working on the automation for removing inactive applications from the controller. For this i'm checking the following:
1) application with tiers having zero(0) node count and no health status(?)
2) applications with tiers having zero(0) node count and 0 calls per month
I'm having issues finding the Health status of a node in a particular tier. This can easily found in the UI but I need this through API call.
can someone please help with this.
Thanks,
Pradeep
06-18-2020 09:08 AM
Hi @pradeep.kumar,
Thanks for your post on the community. I found this AppD Docs page that covers the Health Rule API https://docs.appdynamics.com/display/PRO45/Health+Rule+API
If you don't find what you are looking for there, take a look at the sidebar on that page as there is a list of all other AppD APIs.
If you find anything in the documentation that was helpful, please do share those results back in this post. This helps keep knowledge sharing alive and closes the loop.
Thanks,
Ryan, Cisco AppDynamics Community Manager
Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.
Check out Observabiity in Action
new deep dive videos weekly in the Knowledge Base.
07-01-2020 05:47 AM - last edited on 07-02-2020 09:59 AM by Ryan.Paredez
Thanks for the response, w.r.t. health rules the provided information is useful.
Now, after finding the tiers which are no longer needed I have to delete them. But I did not find any API to delete a specific tier.
And also I need an API to delete a specific application. I found API call in one of our community responses but it's not working as expected.
Can you please provide API to delete a specific tier and an API to delete a specific application.
The above APIs are useful to automate the cleanup of an inactive application in Appdynamics.
Thanks for the help.
Regards,
Pradeep
07-02-2020 10:05 AM
Hi @pradeep.kumar,
I don't have answers to those questions. If I find anything, I will share it back here. In the meantime, let's see if the community can jump in and provide any insight.
Thanks,
Ryan, Cisco AppDynamics Community Manager
Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.
Check out Observabiity in Action
new deep dive videos weekly in the Knowledge Base.
07-05-2020 03:44 AM
Hi there
You can use the below two ways to delete Applications and Tiers via the API
First step as you know is to run the auth query to get the JSESSIONID & X-CSRF-TOKEN
Get Auth Details
curl -i --user <username>@<accountname>:<password> https://<controller details>/controller/auth?action=login
Applications
To Delete an application, you can use the default API, to get the ID's of the application, once you have the ID of the application you want to delete you can use the following query
curl -X POST -H "Cookie:JSESSIONID=e81ba25c363b479b16d49ccc8e75;" -H "X-CSRF-TOKEN:ab45ea344e5178f08862g03f4f4a4ddb25910934" -H "Content-Type: application/json" -H "Accept: application/json" https://<controller details>/controller/restui/allApplications/deleteApplication --data "<application ID>"
The same for Tiers
Use the default API's to get the ID's of the tiers you want to delete(ComponentID) and then tun the following query
curl -X DELETE -H "Cookie:JSESSIONID=e81ba24c303be79b16d49ccd8e75;" -H "X-CSRF-TOKEN:ab45ea334e7178f00862f03f4f4a4ddb25910934" -H "Content-Type: application/json" -H "Accept: application/json" https://<controller details>/controller/restui/components/deleteComponent/<componentid>
Ciao
User | Count |
---|---|
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