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.

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.

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.

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

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.

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

overwrite

Query

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

Example to overwrite a policy

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.

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 Name

Parameter Type

Value

Mandatory

application_id

URI

The name or ID identifier of the application to which the Analytics Dynamic Service configuration should be applied.

Yes

Example

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.