This page applies to an earlier version of the AppDynamics App IQ Platform.
For the latest documentation, see the 4.5 Documentation.

Skip to end of metadata
Go to start of metadata

You can fetch the contents of the AppDynamics REST API calls using curl. curl dumps the XML results to standard output.

The syntax for a GET is:

curl --user <appdynamics-username>@<appdynamics-account-name:<appdynamics-password> '<URI>'

The syntax for a POST is:

curl -x POST --user <appdynamics-username>@<appdynamics-account-name:<appdynamics-password> '<URI>'

For example, this command gets the applications on the "demo" server:

curl --user user1@customer1:secret ''

This command gets the tiers in application 2:

curl --user user1@customer1:secret ''

This command gets the average response time in the Ecommerce tier of the ACME Online Book Store application over the past two hours:

curl --user user1@customer1:secret ''

This command uses the -F curl option to import transaction detection rules from the file TEST01.transdetection.aspDotNet.xml into TestApp.

curl --user user1@customer1:secret -F file=@TEST01.transdetection.aspDotNet.xml ''

Note that there is a discrepancy in the file parameter specification that the controller expects for the file parameter depending on the type of the API:

  • For transaction detection configuration upload: -F file=@filetoimport.xml
  • For health rule upload: -F fileUpload=@myHealthRule.xml

This command creates an Application Deployment event:

curl -X POST --user admin@customer1:secret ""

Notice that the URI argument to the curl command is enclosed in quotes. The argument either needs to be enclosed as shown, or you need to escape special characters. Otherwise, you will get misleading errors indicating missing elements from the command, such as a missing summary. Using escapes, the equivalent command would be as follows: 


curl -X POST --user admin@customer1:secret\?eventtype=APPLICATION_DEPLOYMENT\&summary=CodePush\&comment=134\&severity=INFO

  • No labels