PDFs

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added Export/Import policies for 4.2.4

...

No Format
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

No Format
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

 

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