Controller (SaaS, On Premise)

Showing results for 
Search instead for 
Did you mean: 

Delete application by API


Hi folks,


We're using kubernets here and a wrong configuration created a lot of Applications, one for each pod. I used the AppDynamicsREST project in python to list all wrong application name but I can't find a way to delete them.


Do you know if it is possible?



Tags (3)
Delete application by API
AppDynamics Team
Hi Kadu,
Thanks for posting the question on the Community.
Application deletion API exists, and this needs authorization token retrieval first, so could you try these lines of execution? Caution to pass only your target application ID in <application_ID>.
  1. curl -s -c cookie.appd --user <username>@<customer name>:<password> -X GET "http://<url>:<port>/controller/auth?action=login"
  2. X_CSRF_TOKEN="$(grep X-CSRF-TOKEN cookie.appd|rev|cut -d$'\t' -f1|rev)" 
  3. X_CSRF_TOKEN_HEADER=$([ -n "$X_CSRF_TOKEN" ] && echo "X-CSRF-TOKEN:$X_CSRF_TOKEN" || echo '')
  4. curl -X POST <url>:<port>/controller/restui/allApplications/deleteApplication -H "Content-Type: application/json;charset=UTF-8" --data "<application_ID>" -b cookie.appd -H "$X_CSRF_TOKEN_HEADER"
Please run these queries by the user who has delete permissions on your applications.
Let me know if this helped you.
Many thanks,

Naoto Yamamoto

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