PDFs


This page applies to an earlier version of the AppDynamics App IQ Platform.
See the latest version of the documentation.


On this page:


Your Rating:
Results:
PatheticBadOKGoodOutstanding!
68 rates
This page describes the AppDynamics API methods you can use to import and export various types of configuration settings in the Controller.

About the Configuration Import/Export APIs

The Configuration Import/Export APIs enables you to migrate configuration settings across Controller accounts, business applications, or Controller instances. You can also use it to add configuration artifacts—such as transaction detection rules, health rules or custom dashboards—to an existing configuration programmatically. 

An exported configuration is an XML or JSON representation of the configuration artifact. After exporting the file, you can upload it to another account or application, optionally modifying the configuration.  

Export Actions from an Application

Exports all actions in the specified application to a JSON file.

To be able to export actions, the user account you use to make the API call must have permissions to view an action or action template in the application you are exporting from.

Format

GET /controller/actions/application_id 

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

application_id

URI

The application name or application ID.

Yes

Example

curl --user user1@customer1:secret http://demo.appdynamics.com/controller/actions/7

[
   {
      actionType: "EmailAction",
      name: "6DA8942B-DF4A-417A-E1NF-59F14231D670",
      priority: 1,
      description: null,
      toAddress: "user1@example.com",
      subject: "",
      timeZone: null
   },
   {
      actionType: "DiagnosticSessionAction",
      name: "MyDiagnotic",
      priority: 0,
      description: null,
      businessTransactionTemplates: [ ],
      numberOfSnapshotsPerMinute: 5,
      durationInMinutes: 10,
      adjudicate: false,
      adjudicatorEmail: null
   }
]

Import Actions into an Application

After you have exported actions, you can import them to a different application passing the JSON file created by the export operation as the payload to a POST request.

The user account you use to make the API call must have permissions to create an action or action template in the account.

Actions in the import file that have conflicting names with actions in the existing configuration are not imported. The import for those actions fail, while new actions are imported successfully.

This call takes data as multipart/form-data content. Use UTF-8 URL encoding of the URI before posting; for example, do not replace a space (" ") with "%20" in the URI.

Format

POST /controller/actions/application_id 

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

application_id

URI

The application name or application ID.

Yes

Example

curl  -X POST --user user1@customer1:secret http://demo.appdynamics.com/controller/actions/38 -F file=@ExportActions.json
 
{"success":true,"errors":[],"warnings":[]}

If there are actions in the file with the same name as ones in the configuration, those actions are not imported, and the response indicates the success of the request as false, as follows:  

{"success":false,"errors":["Not importing Action with name: DuplicateExportedDiagnosticAction, since it already exists."],"warnings":["Imported 1 out of 2 actions"]}  

Export Email Action Templates from an Account

This API exports all the email action templates in the current account in JSON format. 

Format

GET /controller/actiontemplate/email

Example

curl --user user1@customer1:secret http://demo.appdynamics.com/controller/actiontemplate/email

[ {
  "actionPlanType" : "email",
  "name" : "MyCustomEmailTemplate",
  "oneEmailPerEvent" : true,
  "eventClampLimit" : 100,
  "defaultCustomProperties" : [ {
    "id" : 0,
    "version" : 0,
    "name" : "env",
    "value" : "%OS"
  } ],
  "allowCustomRecipients" : true,
  "toRecipients" : [ ],
  "ccRecipients" : [ ],
  "bccRecipients" : [ ],
  "headers" : [ ],
  "subject" : "We've got a situation...",
  "includeTextBody" : true,
  "textBody" : "<h1>Summary of events occurring during the ${policy.digestDurationInMins}+ minute(s) prior to ${action.triggerTime}:</h1> <table> #foreach(${eventList} in ${fullEventsByTypeMap.values()}) #foreach(${event} in ${eventList}) <tr> <td> <!-- Event icon --> <img src="${event.severityImage.mimeContentRef}" alt="${event.severity}" /> </td> <td> <!-- Event name with event link --> <a href="${event.deepLink}">${event.displayName}</a> </td> <td> <!-- Event message --> ${event.eventMessage} </td> </tr> #end #end </table>"",
  "includeHtmlBody" : true,
  "htmlBody" : "<p>Please look into it.</p>",
  "testLogLevel" : "DEBUG",
  "testPropertiesPairs" : [ ],
  "testToRecipients" : [ ],
  "testCcRecipients" : [ ],
  "testBccRecipients" : [ ],
  "eventTypeCountPairs" : [ ]
} ]

Import Email Action Templates

Enables you to import email action templates to an account as JSON file. The import fails if you attempt to import a template with the same name as an existing template of the same type in the destination account.

Data for this call should be in the form of multipart/form-data. Use UTF-8 URL encoding of the URI before posting; for example, do not replace a space (" ") with "%20" in the URI.

Format

POST /controller/actiontemplate/email

Example

curl  -X POST --user user1@customer1:secret http://demo.appdynamics.com/controller/actiontemplate/email -F file=@emailactiontemplate.json

{"success":true,"errors":[],"warnings":[]}

Export HTTP Request Action Templates from an Account

This API exports all the HTTP request action templates in the current account to a JSON file.

Format

GET /controller/actiontemplate/httprequest/ 

Example:

curl --user user1@customer1:secret http://demo.appdynamics.com/controller/actiontemplate/httprequest

[ {
  "actionPlanType" : "httprequest",
  "name" : "MyCustomHTTPTemplate",
  "oneRequestPerEvent" : false,
  "eventClampLimit" : -1,
  "defaultCustomProperties" : [ ],
  "method" : "GET",
  "scheme" : "HTTP",
  "host" : "http",
  "port" : 0,
  "path" : "//demo.appdynamics.com//controller/rest/applications/${latestEvent.application.name}/nodes/${latestEvent.node.name}",
  "query" : "",
  "urlCharset" : "UTF_8",
  "authType" : "BASIC",
  "authUsername" : "user1",
  "authPassword" : "secret",
  "headers" : [ ],
  "payloadTemplate" : {
    "httpRequestActionMediaType" : "text/plain",
    "charset" : "UTF_8",
    "formDataPairs" : [ ],
    "payload" : ""
  },
  "connectTimeoutInMillis" : 5000,
  "socketTimeoutInMillis" : 15000,
  "maxFollowRedirects" : 0,
  "responseMatchCriteriaAnyTemplate" : [ ],
  "responseMatchCriteriaNoneTemplate" : [ ],
  "testLogLevel" : "DEBUG",
  "testPropertiesPairs" : [ ],
  "eventTypeCountPairs" : [ ]
} ]

Import HTTP Action Templates into an Account

After you have exported HTTP request action templates, you can import them to a different account by logging into the destination account and passing the JSON file created by the export operation as the payload to the POST request.

You can modify the exported file before you import it. You might want to do this to remove one or more template configurations or to change their names. The import will fail if you attempt to import a template with the same name as an existing template of the same type in the destination account.

Use UTF-8 URL encoding of the URI before posting; for example, do not replace a space (" ") with "%20" in the URI.

Format

GET /controller/actiontemplate/httprequest  

Example

curl  -X POST --user user1@customer1:secret http://demo.appdynamics.com/controller/actiontemplate/httprequest -F file=@httpactiontemplate.json

{"success":true,"errors":[],"warnings":[]}

Export Custom Dashboards and Templates

You can export and import custom dashboards and custom dashboard templates interactively from the Controller UI or using this API call. 

See Import and Export Custom Dashboards and Templates Using the UI for information on importing and exporting custom dashboards and dashboard templates from the AppDynamics UI. 

To export the dashboard, the user making the API call must have permissions to view the custom dashboard. 

In the export call, you need to identify the dashboard to export by ID. You can discover the ID of a dashboard in the Controller UI. When you open the dashboard in the UI, the ID appears as the dashboard parameter at the end of the URL.

For example, in this URL snippet, the custom dashboard ID is 3: location=CDASHBOARD_DETAIL&mode=MODE_DASHBOARD&dashboard=3. 

Format

GET /controller/CustomDashboardImportExportServlet?dashboardId=dashboard_id

Input Parameters

Parameter Name

Parameter Type

Value

Mandatory

dashboardId

Query

The numeric ID of the custom dashboard.

Yes

Example

curl --user user1@customer1:secret http://demo.appdynamics.com/controller/CustomDashboardImportExportServlet?dashboardId=8

{
  "schemaVersion" : null,
  "dashboardFormatVersion" : "3.0",
  "name" : "Analytics-BrowserData",
   ...
  "warRoom" : false,
  "template" : false
}

View a complete response example: 

 Click to view dashboard export sample...
{
  "schemaVersion" : null,
  "dashboardFormatVersion" : "3.0",
  "name" : "Analytics-BrowserData",
  "description" : null,
  "properties" : null,
  "templateEntityType" : "APPLICATION_COMPONENT_NODE",
  "associatedEntityTemplates" : null,
  "minutesBeforeAnchorTime" : 15,
  "startDate" : null,
  "endDate" : null,
  "refreshInterval" : 120000,
  "backgroundColor" : 15395562,
  "color" : 15395562,
  "height" : 768,
  "width" : 1024,
  "canvasType" : "CANVAS_TYPE_GRID",
  "layoutType" : "",
  "widgetTemplates" : [ {
    "widgetType" : "AnalyticsWidget",
    "title" : "Browser_data",
    "height" : 4,
    "width" : 4,
    "x" : 0,
    "y" : 0,
    "label" : "",
    "description" : "",
    "drillDownUrl" : "",
    "useMetricBrowserAsDrillDown" : false,
    "backgroundColor" : 16777215,
    "backgroundColors" : null,
    "backgroundColorsStr" : null,
    "color" : 4210752,
    "fontSize" : 12,
    "useAutomaticFontSize" : false,
    "borderEnabled" : false,
    "borderThickness" : 0,
    "borderColor" : 0,
    "backgroundAlpha" : 1.0,
    "showValues" : false,
    "compactMode" : false,
    "showTimeRange" : false,
    "renderIn3D" : false,
    "showLegend" : false,
    "legendPosition" : null,
    "legendColumnCount" : null,
    "startTime" : null,
    "endTime" : null,
    "minutesBeforeAnchorTime" : 0,
    "isGlobal" : true,
    "propertiesMap" : null,
    "dataSeriesTemplates" : null,
    "adqlQueries" : [ "SELECT appkey, pageexperience, distinctcount(pageurl) AS \"URL (Count Distinct)\" FROM browser_records LIMIT 100,100" ],
    "analyticsWidgetType" : "COLUMN",
    "maxAllowedYAxisFields" : 3,
    "maxAllowedXAxisFields" : 2,
    "min" : null,
    "interval" : 98,
    "max" : null,
    "intervalType" : "By Fixed Number",
    "showMinExtremes" : null,
    "showMaxExtremes" : null,
    "displayPercentileMarkers" : null,
    "percentileValue1" : null,
    "percentileValue2" : null,
    "percentileValue3" : null,
    "percentileValue4" : null,
    "resolution" : "1m",
    "dataFetchSize" : null,
    "percentileLine" : null,
    "timeRangeInterval" : null,
    "pollingInterval" : null,
    "unit" : null
  } ],
  "warRoom" : false,
  "template" : false
}o

Import Custom Dashboards and Templates

You can import custom dashboard and templates based on a previously exported JSON definition, which has optionally been modified. Import the definition as an application/json content type.

Data for this call should be in the form of multipart/form-data. Use UTF-8 URL encoding of the URI before posting; for example, do not replace a space (" ") with "%20" in the URI.

To import a dashboard, the user making the API call must have create dashboard permissions in the Controller. 

Prior to version 4.1, exported custom dashboards were in XML format. You can import custom dashboards previously exported as XML data into the current Controller; however, custom dashboards can only be exported as JSON data.

Format

POST /controller/CustomDashboardImportExportServlet 

Example

curl  -X POST --user user1@customer1:secret http://demo.appdynamics.com/controller/CustomDashboardImportExportServlet -F file=@customdashboards.json

{"success":true,"errors":[],"warnings":[],"createdDashboardName":"Uploaded-Analytics-BrowserData"}

Export Health Rules from an Application

Returns all health rules in XML format. 

The user account you use to make the API call must have permissions to view the health rule. 

Format

GET /controller/healthrules/application_id?name=health_rule_name  

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

application_id

URI

The application name or application ID.

Yes

nameQueryThe name of the health rule to export. If not specified, exports all health rules.No

Example

 

curl --user user1@customer1:secret http://demo.appdynamics.com/controller/healthrules/38?name=MyCustomHealthRule

<health-rules controller-version="004-002-000-000">
    <health-rule>
        <name>MyCustomHealthRule</name>
        <type>BUSINESS_TRANSACTION</type>
        <description/>
        <enabled>true</enabled>
        <is-default>false</is-default>
        <always-enabled>true</always-enabled>
        <duration-min>30</duration-min>
        <wait-time-min>30</wait-time-min>
        <affected-entities-match-criteria>
            <affected-bt-match-criteria>
                <type>ALL</type>
            </affected-bt-match-criteria>
        </affected-entities-match-criteria>
        <warning-execution-criteria>
            <entity-aggregation-scope>
                <type>ANY</type>
                <value>0</value>
            </entity-aggregation-scope>
            <policy-condition>
                <type>leaf</type>
                <display-name>CPU</display-name>
                <condition-value-type>BASELINE_STANDARD_DEVIATION</condition-value-type>
                <condition-value>2.0</condition-value>
                <operator>GREATER_THAN</operator>
                <condition-expression/>
                <use-active-baseline>true</use-active-baseline>
                <metric-expression>
                    <type>leaf</type>
                    <function-type>VALUE</function-type>
                    <value>0</value>
                    <is-literal-expression>false</is-literal-expression>
                    <display-name>null</display-name>
                    <metric-definition>
                        <type>LOGICAL_METRIC</type>
                        <logical-metric-name>Average CPU Used (ms)</logical-metric-name>
                    </metric-definition>
                </metric-expression>
            </policy-condition>
        </warning-execution-criteria>
    </health-rule>
</health-rules>

Import Health Rules into an Application

You can import health rules defined in an XML file into a business application. 

Data for this call should be in the form of multipart/form-data. In the POST request, use UTF-8 URL encoding for the URI; for example, do not replace a space (" ") with "%20" in the URI.

By default, a health rule in the posted data with an identical name to one in the existing configuration does not overwrite the existing health rule. If you want to overwrite an existing health rule of the same name, use the overwrite parameter.

The syntax is the same for importing one health rule configuration or several. All the health rule configurations in the posted XML file are imported.

Format

POST /controller/healthrules/application_id?overwrite=true_or_false

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

application_id

URI

The application name or application ID.

Yes

overwriteQuerySet to true to have health rules in the posted data overwrite existing health rules with the same name. The default is false.No

Example

curl -X POST --user user1@customer1:secret http://demo.appdynamics.com/controller/healthrules/38 -F file=@uploadhealthrule.xml

Imported 1 health rules successfully.

If the health rule exists and you have not enabled the overwrite parameters, you will get the following response:

Not importing the health rule: healthrulename since it already exists.

 

Export Transaction Detection Rules for All Entry Point Types

Gets all transaction automatic detection rules in XML format. This call returns the detection rule configurations for all entry point types.

You can get transaction detection rules from the application-level configuration or from the configuration for a specific tier by name. 

The URI used by clients for this call should be UTF-8 encoded

Format 

GET /controller/transactiondetection/application_id/[tier_name/]rule_type  

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

application_id

URI

The application name or application ID.

Yes

tier_name URIThe name of the tier from which you are exporting the entry point configuration.No
rule_type URI

The type of rule to export, from these options:

  • auto: Automatic detection rules
  • custom: Custom detection rules in the configuration 
  • exclude: Custom exclude rules for transaction detection 
Yes

Examples

  • Export all auto-detection rules sample request:

    curl --user user1@customer1:secret http://demo.appdynamics.com/controller/transactiondetection/38/auto
     Click to view complete response...
    curl --user user1@customer1:secret http://demo.appdynamics.com/controller/transactiondetection/38/auto
    <auto-discovery-config controller-version="004-002-000-000">
        <auto-discovery>
            <name>NODEJS_WEB</name>
            <properties>uri-length;first-n-segments;segment-length;4;</properties>
            <discovery-resolution>URI</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>WEB</name>
            <properties>uri-length;first-n-segments;segment-length;4;</properties>
            <discovery-resolution>URI</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>BINARY_REMOTING</name>
            <discovery-resolution>SIMPLE_CLASS_NAME_AND_METHOD_NAME</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>EJB</name>
            <discovery-resolution>EJB_NAME_AND_METHOD_NAME</discovery-resolution>
            <transaction-detection-enabled>false</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>JMS</name>
            <discovery-resolution>DESTINATION_NAME</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>POJO</name>
            <discovery-resolution>FULLY_QUALIFIED_CLASS_NAME</discovery-resolution>
            <transaction-detection-enabled>false</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>SERVLET</name>
            <properties>uri-length;first-n-segments;segment-length;3;</properties>
            <discovery-resolution>URI</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>SPRING_BEAN</name>
            <discovery-resolution>BEAN_ID_AND_METHOD_NAME</discovery-resolution>
            <transaction-detection-enabled>false</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>STRUTS_ACTION</name>
            <discovery-resolution>ACTION_NAME_AND_METHOD_NAME</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>WEB_SERVICE</name>
            <discovery-resolution>SERVICE_NAME_AND_OPERATION_NAME</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>RUBY_RAILS</name>
            <discovery-resolution>CONTROLLER_NAME_AND_ACTION_NAME</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>RUBY_WEB</name>
            <properties>uri-length;first-n-segments;segment-length;4;</properties>
            <discovery-resolution>URI</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>PHP_CLI</name>
            <discovery-resolution>DEFAULT</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>PHP_DRUPAL</name>
            <discovery-resolution>DEFAULT</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>PHP_MVC</name>
            <discovery-resolution>ACTION_CLASS_NAME_AND_METHOD_NAME</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>PHP_WEB</name>
            <properties>uri-length;first-n-segments;segment-length;4;</properties>
            <discovery-resolution>URI</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>PHP_WEB_SERVICE</name>
            <discovery-resolution>SERVICE_NAME_AND_OPERATION_NAME</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>PHP_WORDPRESS</name>
            <discovery-resolution>DEFAULT</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>ASP_DOTNET</name>
            <properties>uri-length;first-n-segments;segment-length;4;</properties>
            <discovery-resolution>URI</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>ASP_DOTNET_WEB_SERVICE</name>
            <discovery-resolution>SERVICE_NAME_AND_OPERATION_NAME</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>DOTNET_JMS</name>
            <discovery-resolution>DESTINATION_NAME</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>DOTNET_REMOTING</name>
            <discovery-resolution>SIMPLE_CLASS_NAME_AND_METHOD_NAME</discovery-resolution>
            <transaction-detection-enabled>false</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>POCO</name>
            <discovery-resolution>SIMPLE_CLASS_NAME_AND_METHOD_NAME</discovery-resolution>
            <transaction-detection-enabled>false</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>WCF</name>
            <discovery-resolution>SERVICE_NAME_AND_OPERATION_NAME</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>PYTHON_WEB</name>
            <properties>uri-length;first-n-segments;segment-length;4;</properties>
            <discovery-resolution>URI</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>NATIVE</name>
            <properties>uri-length;first-n-segments;segment-length;4;</properties>
            <discovery-resolution>URI</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>WEB</name>
            <properties>uri-length;first-n-segments;segment-length;2;</properties>
            <discovery-resolution>URI</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
        <auto-discovery>
            <name>WEB</name>
            <properties>uri-length;first-n-segments;segment-length;2;</properties>
            <discovery-resolution>URI</discovery-resolution>
            <transaction-detection-enabled>true</transaction-detection-enabled>
            <enabled>true</enabled>
        </auto-discovery>
    </auto-discovery-config>
  • Export custom rules defined on a tier-level configuration sample request: 

    curl --user user1@customer1:secret http://demo.appdynamics.com/controller/transactiondetection/ECommerce/Inventory-Services/custom
     Click to view complete response...
    curl --user user1@customer1:secret http://demo.appdynamics.com/controller/transactiondetection/ECommerce/Inventory-Services/custom
    
    <custom-match-points controller-version="004-002-000-000">
        <custom-match-point>
            <name>Cron4J</name>
            <business-transaction-name>Cron4J</business-transaction-name>
            <entry-point>POJO</entry-point>
            <background>false</background>
            <enabled>false</enabled>
            <match-rule>
                <pojo-rule>
                    <enabled>false</enabled>
                    <priority>0</priority>
                    <excluded>false</excluded>
                    <display-name>Cron4J</display-name>
                    <background>true</background>
                    <match-class type="inherits-from-class">
                        <name filter-type="EQUALS" filter-value="it.sauronsoftware.cron4j.Task"/>
                    </match-class>
                    <split-config type="4"/>
                    <match-method>
                        <name filter-type="EQUALS" filter-value="execute"/>
                    </match-method>
                </pojo-rule>
            </match-rule>
        </custom-match-point>
        <custom-match-point>
            <name>JavaTimer</name>
            <business-transaction-name>JavaTimer</business-transaction-name>
            <entry-point>POJO</entry-point>
            <background>false</background>
            <enabled>false</enabled>
            <match-rule>
                <pojo-rule>
                    <enabled>false</enabled>
                    <priority>0</priority>
                    <excluded>false</excluded>
                    <display-name>JavaTimer</display-name>
                    <background>true</background>
                    <match-class type="inherits-from-class">
                        <name filter-type="EQUALS" filter-value="java.util.TimerTask"/>
                    </match-class>
                    <split-config type="4"/>
                    <match-method>
                        <name filter-type="EQUALS" filter-value="run"/>
                    </match-method>
                </pojo-rule>
            </match-rule>
        </custom-match-point>
        <custom-match-point>
            <name>JCronTab</name>
            <business-transaction-name>JCronTab</business-transaction-name>
            <entry-point>POJO</entry-point>
            <background>false</background>
            <enabled>false</enabled>
            <match-rule>
                <pojo-rule>
                    <enabled>false</enabled>
                    <priority>0</priority>
                    <excluded>false</excluded>
                    <display-name>JCronTab</display-name>
                    <background>true</background>
                    <match-class type="matches-class">
                        <name filter-type="EQUALS" filter-value="org.jcrontab.CronTask"/>
                    </match-class>
                    <split-config operation="strClassName" type="2"/>
                    <match-method>
                        <name filter-type="EQUALS" filter-value="runTask"/>
                    </match-method>
                </pojo-rule>
            </match-rule>
        </custom-match-point>
        <custom-match-point>
            <name>MongoBT</name>
            <business-transaction-name>MongoBT</business-transaction-name>
            <entry-point>POJO</entry-point>
            <background>false</background>
            <enabled>true</enabled>
            <match-rule>
                <pojo-rule>
                    <enabled>true</enabled>
                    <priority>0</priority>
                    <excluded>false</excluded>
                    <display-name/>
                    <background>false</background>
                    <match-class type="matches-class">
                        <name filter-type="EQUALS" filter-value="MongoConnector"/>
                    </match-class>
                    <match-method>
                        <name filter-type="EQUALS" filter-value="callMongoDB"/>
                    </match-method>
                </pojo-rule>
            </match-rule>
        </custom-match-point>
        <custom-match-point>
            <name>MyCustomWebService</name>
            <business-transaction-name>MyCustomWebService</business-transaction-name>
            <entry-point>WEB_SERVICE</entry-point>
            <background>false</background>
            <enabled>false</enabled>
            <match-rule>
                <web-service-rule>
                    <enabled>false</enabled>
                    <priority>0</priority>
                    <excluded>false</excluded>
                    <web-service-name filter-type="EQUALS" filter-value="/orderprocessing/"/>
                    <operation-name filter-type="EQUALS" filter-value="cancelorder"/>
                </web-service-rule>
            </match-rule>
        </custom-match-point>
        <custom-match-point>
            <name>Quartz</name>
            <business-transaction-name>Quartz</business-transaction-name>
            <entry-point>POJO</entry-point>
            <background>false</background>
            <enabled>false</enabled>
            <match-rule>
                <pojo-rule>
                    <enabled>false</enabled>
                    <priority>0</priority>
                    <excluded>false</excluded>
                    <display-name>Quartz</display-name>
                    <background>true</background>
                    <match-class type="implements-interface">
                        <name filter-type="EQUALS" filter-value="org.quartz.Job"/>
                    </match-class>
                    <split-config type="4"/>
                    <match-method>
                        <name filter-type="EQUALS" filter-value="execute"/>
                    </match-method>
                </pojo-rule>
            </match-rule>
        </custom-match-point>
    </custom-match-points>
  • Export all exclude rules sample request: 

    curl --user uesr1@customer1:secret http://demo.appdynamics.com/controller/transactiondetection/38/exclude
     Click to view complete response...
    curl --user user1@customer1:secret http://demo.appdynamics.com/controller/transactiondetection/38/exclude
    <excludes controller-version="004-002-000-000">
    
        <exclude name="NodeJS Static Content Filter">
            <web-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <uri filter-type="REGEX" filter-value="robots.txt|.*\.(js|css|png|gif|jpg|jpeg|ico)$"/>
                <http-method>GET</http-method>
            </web-rule>
        </exclude>
        <exclude name="Apache Axis Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="org.apache.axis.transport.http.AxisServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="Apache Axis2 Admin Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="org.apache.axis2.transport.http.AxisAdminServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="Apache Axis2 Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="org.apache.axis2.transport.http.AxisServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="CometD Annotation Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="org.cometd.annotation.AnnotationCometdServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="CometD Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="org.cometd.server.CometdServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="JAX WS RI Dispatcher Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="com.sun.xml.ws.transport.http.servlet.WSServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="JBoss 6.x web-services Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="org.jboss.wsf.spi.deployment.WSFServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="JBoss web-services servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="org.jboss.wsf.stack.jbws.EndpointServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="Jersey 2.x Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="org.glassfish.jersey.servlet.ServletContainer"/>
            </servlet-rule>
        </exclude>
        <exclude name="Jersey Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="com.sun.jersey.spi.container.servlet.ServletContainer"/>
            </servlet-rule>
        </exclude>
        <exclude name="MyExcludeRule">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <uri filter-type="EQUALS" filter-value="/orderprocessingexclude"/>
                <http-method>POST</http-method>
                <properties/>
            </servlet-rule>
        </exclude>
        <exclude name="Spring WS - Base servlet for Spring's web framework">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="org.springframework.web.servlet.FrameworkServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="Spring WS - dispatching of Web service messages">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="org.springframework.ws.transport.http.MessageDispatcherServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="Struts Action Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="org.apache.struts.action.ActionServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="Weblogic JAX RPC Servlets">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="STARTSWITH" filter-value="weblogic.wsee.server.servlet."/>
            </servlet-rule>
        </exclude>
        <exclude name="Weblogic JAX WS Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="weblogic.wsee.jaxws.JAXWSWebAppServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="Weblogic JAX WS Webservice Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="weblogic.wsee.jaxws.JAXWSServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="Websphere web-services axis Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="com.ibm.ws.websvcs.transport.http.WASAxis2Servlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="Websphere web-services Servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="com.ibm.ws.webservices.engine.transport.http.WebServicesServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="XFire web-services servlet">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="org.codehaus.xfire.transport.http.XFireConfigurableServlet"/>
            </servlet-rule>
        </exclude>
        <exclude name="ASP.NET MVC5 Resource Handler">
            <asp-dotnet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="System.Web.Optimization.BundleHandler"/>
            </asp-dotnet-rule>
        </exclude>
        <exclude name="ASP.NET WCF Activation Handler">
            <asp-dotnet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="System.ServiceModel.Activation.HttpHandler"/>
            </asp-dotnet-rule>
        </exclude>
        <exclude name="ASP.NET WebService Script Handler">
            <asp-dotnet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="INLIST" filter-value="System.Web.Script.Services.ScriptHandlerFactory+HandlerWrapper,System.Web.Script.Services.ScriptHandlerFactory+HandlerWrapperWithSession,System.Web.Script.Services.ScriptHandlerFactory+AsyncHandlerWrapper,System.Web.Script.Services.ScriptHandlerFactory+AsyncHandlerWrapperWithSession"/>
            </asp-dotnet-rule>
        </exclude>
        <exclude name="ASP.NET WebService Session Handler">
            <asp-dotnet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <class-name filter-type="EQUALS" filter-value="System.Web.Services.Protocols.SyncSessionlessHandler"/>
            </asp-dotnet-rule>
        </exclude>
        <exclude name="Python Static Content Filter">
            <servlet-rule>
                <enabled>true</enabled>
                <priority>0</priority>
                <excluded>false</excluded>
                <uri filter-type="REGEX" filter-value="robots.txt|.*\.(js|css|png|gif|jpg|jpeg|ico)$"/>
                <http-method>GET</http-method>
            </servlet-rule>
        </exclude>
    </excludes>

Import Transaction Detection Rules for All Entry Point Types

Imports automatic detection rules in XML format. This call can apply the imported configuration either at the application-level or for a specific tier. The tier configuration must be customized for the call to succeed. 

Data for this call should be in the form of multipart/form-data. The URI for this call should be UTF-8 encoded.

Format

POST /controller/transactiondetection/application_id/[tier_name/]rule_type  

Input parameters

Parameter Name

Parameter Type

Value

Mandatory

application_id

URI

The application name or application ID.

Yes

tier_name URIThe name of the tier from which you are exporting the entry point configuration.No
rule_type URI

The type of rule to export, from these options:

  • auto: Automatic detection rules
  • custom: Custom detection rules in the configuration 
  • exclude: Custom exclude rules for transaction detection 
Yes
overwriteQueryUse the overwrite parameter to overwrite a configuration of the same name. Without this parameter, if the import encounters a configuration for a component of the same name, the request will fail.No

Examples 

  • Import custom rules and apply them to a tier-level configuration for the named teir. As indicated, duplicate rules not overwritten: 

    curl -X POST --user user1@customer1:secret http://demo.appdynamics.com/controller/transactiondetection/ECommerce/Inventory-Services/custom/ -F file=@customrules.xml
    
    Not importing the custom match config: Cron4J since there is already a config with the same name.
    Not importing the custom match config: JavaTimer since there is already a config with the same name.
    Not importing the custom match config: JCronTab since there is already a config with the same name.
    Not importing the custom match config: MongoBT since there is already a config with the same name.
    Not importing the custom match config: Quartz since there is already a config with the same name.
  • Import custom rules and apply to the application configuration, overwriting existing rules with the same name: 

    curl -X POST --user user1@customer1:welcome http://demo.appdynamics.com/controller/transactiondetection/38/custom?overwrite=true -F file=@customtransactionrules.xml

Export a Transaction Detection Rule for an Entry Point Type

Exports the configuration for a specific type of entry point type at the application-level or tier-level configuration. 

To identify the entry point type, use the identifiers shown in the following table. 

Entry point types names are case insensitive.

Java.NETPHPNode.js
binaryRemoting (for Thrift)
servlet
strutsAction
springBean
ejb
pojo
jms
webService

aspDotNet (for ASP.NET)
dotNetWebService (for Web Service)
wcf
poco (for .NET Class/Method)
dotNetJms (for Message Queues)
dotNetRemoting

phpWeb
phpMvc
phpDrupal
phpWordpress
phpCli
phpWebService

nodeJsWeb

The URI for this call should be UTF-8 encoded.

Format

GET /controller/transactiondetection/application_id/[tier_name/]rule_type/entry_point_type[/rule_name]

Input Parameters

Parameter Name

Parameter Type

Value

Mandatory

application_id

URI

The application name or application ID.

Yes

tier_name URIThe name of the tier from which you are exporting the entry point configuration.No
rule_type URI

The type of rule to export, from these options:

  • auto: Automatic detection rules
  • custom: Custom detection rules in the configuration 
  • exclude: Custom exclude rules for transaction detection 
Yes
entry_point_type URIThe entry point type, such as servlet, pojo, aspDotNet or nodeJsWeb.Yes
rule_nameURI If using a custom or exclude rule, specify the name of the rule to import 

Example

curl --user user1@customer1:secret http://demo.appdynamics.com/controller/transactiondetection/38/auto/servlet
 
<auto-discovery-config controller-version="004-002-000-000">
    <auto-discovery>
        <name>SERVLET</name>
        <properties>uri-length;first-n-segments;segment-length;2;</properties>
        <discovery-resolution>URI</discovery-resolution>
        <transaction-detection-enabled>true</transaction-detection-enabled>
        <enabled>true</enabled>
    </auto-discovery>
</auto-discovery-config>

Import Transaction Detection Rule for an Entry Point Type 

Imports the automatic detection rule for a specified type of entry point and applies it at the named application-level or tier-level configuration for the business application.

The URI for this call should be UTF-8 encoded.

Format

POST /controller/transactiondetection/application_id/[tier_name/]rule_type/entry_point_type[/rule_name]

Input Parameters

Parameter Name

Parameter Type

Value

Mandatory

application_id

URI

The application name or application ID.

Yes

tier_name URIThe name of the tier from which you are exporting the entry point configuration.No
rule_type URI

The type of rule to export, from these options:

  • auto: Automatic detection rules
  • custom: Custom detection rules in the configuration 
  • exclude: Custom exclude rules for transaction detection 
Yes
entry_point_typeURIThe entry point type, such as servlet, pojo, aspDotNet or nodeJsWeb. See entry point type information in Export an Automatic-Detection Rule for an Entry Point Type for the list of values to use. Yes
rule_nameURI If using a custom or exclude rule, specify the name of the rule to import 
overwriteQueryUse the overwrite parameter to overwrite a configuration of the same name. Without this parameter, if the import encounters a configuration for a component of the same name, the request will fail.No

Example

curl -X POST --user user1@customer1:secret http://demo.appdynamics.com/controller/transactiondetection/38/auto/servlet -F file=@servlettransaction.xml

Export Policies

You can export policies to a JSON file.  Before you export policies, export any actions or health rules with their respective APIs.  

Format

GET /controller/policies/application_id 

Input Parameters

Parameter NameParameter TypeValueMandatory
application_idURIThe application name or application ID.Yes

Example

curl --user user1@customer1:secret http://demo.appdynamics.com/controller/policies/application_id

[ {
  "applicationName" : "ECommerce-Books",
  "name" : "My Policy",
  "reactorType" : "IMMEDIATE",
  "enabled" : true,
  "batchActionsPerMinute" : true,
  "durationInMin" : 1,
  "eventFilterTemplate" : {
    "applicationName" : "ECommerce-E2E",
    "healthRuleNames" : null,
    "eventTypes" : [ "POLICY_OPEN_WARNING", "POLICY_OPEN_CRITICAL", "POLICY_CONTINUES_WARNING", "POLICY_CONTINUES_CRITICAL" ],
    "rsdTypes" : null,
    "customEventFilters" : null,
    "specificEntityNamesByType" : null
  },
  "entityFilterTemplates" : [ ],
  "actionWrapperTemplates" : [ {
    "actionTag" : "ops_viewer@acme.com",
    "type" : null,
    "value" : 0,
    "notes" : "Policy: My Policy",
    "entityIdentifierTemplates" : [ ]
  } ]
} ]

Import Policies

You can import policies that you exported with the Export Policies API.  Before you import policies, import any actions or health rules with their respective APIs.  

Format

POST /controller/policies/application_id 

Input Parameters

Parameter NameParameter TypeValueMandatory
application_idURIThe application name or application ID.Yes

Example

curl  -X POST --user user1@customer1:secret http://demo.appdynamics.com/controller/policies/38 -F file=@ExportPolicies.json
 
{"success":true,"errors":[],"warnings":[]}

Export Application Analytics Dynamic Service Configuration

The Analytics Dynamic Service is an AppDynamics app agent plugin that performs Analytics client functions for the agent. Enabling the Dynamic Service enables AppDynamics Analytics for an app agent type. You can export the Dynamic Service configuration to back up the configuration or for later import into another Controller.    

Format

GET /controller/analyticsdynamicservice/application_id  

Input Parameters

Parameter NameParameter TypeValueMandatory
application_idURIThe application name or application ID.Yes
filenameQuery

The name of a file to which the configuration will be exported.

No

Example

curl -i --user user1@customer1:secret http://demo.appdynamics.com/controller/analyticsdynamicservice/10
 
<analytics-dynamic-service-configurations controller-version="004-003-000-000">
    <analytics-dynamic-service-configuration>
        <override>true</override>
        <agent-type>APP_AGENT</agent-type>
        <enabled>true</enabled>
    </analytics-dynamic-service-configuration>
    <analytics-dynamic-service-configuration>
        <override>true</override>
        <agent-type>DOT_NET_APP_AGENT</agent-type>
        <enabled>true</enabled>
    </analytics-dynamic-service-configuration>
    <analytics-dynamic-service-configuration>
        <override>true</override>
        <agent-type>NODEJS_APP_AGENT</agent-type>
        <enabled>true</enabled>
    </analytics-dynamic-service-configuration>
</analytics-dynamic-service-configurations>

Import Application Analytics Dynamic Service Configuration

The Analytics Dynamics Service configuration determines whether AppDynamics Analytics is enabled for an app agent type. You use this API to import a previously exported configuration to another Controller. 

Data for this call should be in the form of multipart/form-data.

Format

POST /controller/analyticsdynamicservice/application_id  

Input Parameters

Parameter NameParameter TypeValueMandatory
application_idURIThe name or ID identifier of the application to which the Analytics Dynamic Service configuration should be applied.Yes

Example

curl -i -X POST --user user1@customer1:secret http://demo.appdynamics.com/controller/analyticsdynamicservice/10 -F file=@dynamicservice.xml

The following listing shows sample contents of the dynamicservice.xml file. Notice that the agent-type element indicates the type of app server agent to which the enabled state of the dynamics service applies. The APP_AGENT type represents the Java Agent, the DOT_NET_APP_AGENT the .NET Agent, and so on. 

<analytics-dynamic-service-configurations controller-version="004-003-000-000">
    <analytics-dynamic-service-configuration>
        <override>true</override>
        <agent-type>APP_AGENT</agent-type>
        <enabled>false</enabled>
    </analytics-dynamic-service-configuration>
    <analytics-dynamic-service-configuration>
        <override>true</override>
        <agent-type>DOT_NET_APP_AGENT</agent-type>
        <enabled>false</enabled>
    </analytics-dynamic-service-configuration>
    <analytics-dynamic-service-configuration>
        <override>true</override>
        <agent-type>NODEJS_APP_AGENT</agent-type>
        <enabled>true</enabled>
    </analytics-dynamic-service-configuration>
</analytics-dynamic-service-configurations>

 

 

  • No labels