This page describes the Action API methods you can use to create, configure, and manage various actions that are to be triggered as a response to events. Use this API to create these types of actions:

Syntax validation of the JSON payload is done when creating the action.

Create a New Action

Creates a new action with the specified JSON payload. See Property Details.

Resource URL

POST <controller_url>/controller/alerting/rest/v1
/applications/<application_id>/actions

Request/Response Format

JSON

Example

This example creates an action of the type Thread Dump. See Download Examples.

{
         "actionType": "THREAD_DUMP",
         "name": "Thread Dump Action",
         "numberOfThreadDumps": 2,
         "intervalInMs": 500,
         "approvalBeforeExecution": {
             "requireApproval": true,
             "approverEmail": "email@website.com"
         }
}
JSON

This example returns the created action object.

{
		 "id": "3",
         "actionType": "THREAD_DUMP",
         "name": "Thread Dump Action",
         "numberOfThreadDumps": 2,
         "intervalInMs": 500,
         "approvalBeforeExecution": {
             "requireApproval": true,
             "approverEmail": "email@website.com"
         }
}
JSON


Retrieve a List of Actions for a Given Application

Returns the action ID, name, and description of the action pertaining to a specified application ID. See Property Details.

Resource URL

GET <controller_url>/controller/alerting/rest/v1/applications/<application_id>/actions

Response Format

JSON

Example Response

This example returns a list of actions pertaining to a given application ID.

[{"id":1,"name":"Thread Dump Action","actionType":"THREAD_DUMP"}]
JSON


Retrieve Details of a Specified Action

Retrieves the details of action with a specified ID. See Property Details.

Ensure that you provide a valid action ID.

Resource URL

GET <controller_url>/controller/alerting/rest/v1/applications/<application_id>/actions/{action-id}

Response Format

JSON

Example Response

This example retrieves the details of an action. See Download Examples.

{
 "id": 1,
 "actionType": "THREAD_DUMP",
 "name": "Thread Dump Action",
 "numberOfThreadDumps": 2,
 "intervalInMs": 500,
 "approvalBeforeExecution": {
 "requireApproval": true,
 "approverEmail": "email@website.com"
 }
}
JSON


Update an Action

Updates an existing action with a specified JSON payload. See Property Details.

This request requires a complete JSON payload as input. Hence, it is recommended that you retrieve the JSON payload using,

 GET /action/{action-id} and update the required fields. Then, send the modified payload as part of a PUT request.

Resource URL

PUT <controller_url>/controller/alerting/rest/v1/applications/<application_id>/action/{action-id}

Request/Response Format

JSON

Example 

This example updates an action. See Download Examples.

{
         "actionType": "THREAD_DUMP",
         "name": "Thread Dump Action",
         "numberOfThreadDumps": 2,
         "intervalInMs": 500,
         "approvalBeforeExecution": {
             "requireApproval": true,
             "approverEmail": "email@website.com"
         }
}
JSON

This example returns the updated action.

{
		 "id": "3",
         "actionType": "THREAD_DUMP",
         "name": "Thread Dump Action",
         "numberOfThreadDumps": 2,
         "intervalInMs": 500,
         "approvalBeforeExecution": {
             "requireApproval": true,
             "approverEmail": "email@website.com"
         }
}
JSON


Delete an Action

Deletes an action with the specified ID. See Property Details.

Ensure that you provide a valid action ID.

Resource URL

DELETE <controller_url>/controller/alerting/rest/v1/applications/<application_id>/action/{action-id}

Response Codes

Code

Description

200Fetched successfully
201Created successfully
204Deleted successfully
400Bad request
401Unauthorized
403Forbidden
404Resource not found
409Already exists

Property Details

Action

Payload details for an action triggered as a response to an event.

Property Name

Type

Description and Valid Values

id integer

This is auto-generated by the system and returned in the response.

It is a readOnly value.

actionType*

string

The type of action triggered as a response to an event.

Enums

SMS

EMAIL

CUSTOM_EMAIL

THREAD_DUMP

HTTP_REQUEST

RUN_SCRIPT_ON_NODES

DIAGNOSE_BUSINESS_TRANSACTIONS

CREATE_UPDATE_JIRA

SmsAction

An SMS notification is triggered as a response to an event.

Note

Ensure that you have configured the email and SMS settings for Cisco AppDynamics. See Enable an Email Server.

Property Name

Type

Description and Valid Values

idinteger

This is auto-generated by the system and returned in the response.

It is a readOnly value.

actionType*string

The type of action triggered as a response to an event.

Enums

SMS

EMAIL

CUSTOM_EMAIL

THREAD_DUMP

HTTP_REQUEST

RUN_SCRIPT_ON_NODES

DIAGNOSE_BUSINESS_TRANSACTIONS

CREATE_UPDATE_JIRA

phoneNumber*

string

pattern:

^\d{10,}$


EmailAction

An email notification is triggered as a response to an event.

Property Name

Type

Description and Valid Values

idinteger

This is auto-generated by the system and returned in the response.

It is a readOnly value.

actionType*string

The type of action triggered as a response to an event.

Enums

SMS

EMAIL

CUSTOM_EMAIL

THREAD_DUMP

HTTP_REQUEST

RUN_SCRIPT_ON_NODES

DIAGNOSE_BUSINESS_TRANSACTIONS

CREATE_UPDATE_JIRA

emails*

string

pattern

^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$


CustomEmailAction

An email notification based on a predefined template is triggered as a response to an event.

The template must already exist before you can use it in an action. See Email Templates.

Property Name

Type

Description and Valid Values

idinteger

This is auto-generated by the system and returned in the response.

It is a readOnly value.

actionType*string

The type of action triggered as a response to an event.

Enums

SMS

EMAIL

CUSTOM_EMAIL

THREAD_DUMP

HTTP_REQUEST

RUN_SCRIPT_ON_NODES

DIAGNOSE_BUSINESS_TRANSACTIONS

CREATE_UPDATE_JIRA

name*string
minLength: 1

ActionName

The name you assign to the action.

emailTemplateName*string
minLength: 1

The name of the template to be used for email notification.

to*

string
pattern: 

^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$

EmailArray

A list of email IDs.

cc*

string
pattern: 

^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$

EmailArray

A list of email IDs.

bcc*

string
pattern: 

^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$

EmailArray

A list of email IDs.

customTemplateVariables*

string

KeyValuePair

Property NameType
key*string
value*string

ThreadDumpAction

Property Name

Type

Description and Valid Values

idinteger

This is auto-generated by the system and returned in the response.

It is a readOnly value.

actionType*string

The type of action triggered as a response to an event.

Enums

SMS

EMAIL

CUSTOM_EMAIL

THREAD_DUMP

HTTP_REQUEST

RUN_SCRIPT_ON_NODES

DIAGNOSE_BUSINESS_TRANSACTIONS

CREATE_UPDATE_JIRA

name*string
minLength: 1

ActionName

The name you assign to the action.

numberOfThreadDumps*integer
minimum: 1
maximum: 50
The number of thread dump samples you want the 'action' to collect.
intervalInMs*integer
minimum: 500
The time interval in milliseconds between the thread dump samples collected.
approvalBeforeExecution*

ApprovalBeforeExecution

Mandate an approval before the thread dump action is started.

Property NameType
requireApprovalboolean
approverEmail

string

pattern: 

^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$


HttpRequestAction

Property Name

Type

Description and Valid Values

idinteger

This is auto-generated by the system and returned in the response.

It is a readOnly value.

actionType*string

The type of action triggered as a response to an event.

Enums

SMS

EMAIL

CUSTOM_EMAIL

THREAD_DUMP

HTTP_REQUEST

RUN_SCRIPT_ON_NODES

DIAGNOSE_BUSINESS_TRANSACTIONS

CREATE_UPDATE_JIRA

name*string
minLength: 1

ActionName

The name you assign to the action.

httpRequestTemplateName

string

minLength: 1

An existing HTTP request template to be used in an HTTP request action.
customTemplateVariables

KeyValuePair

Property NameType
key*string
value*string

ScriptAction

Property Name

Type

Description and Valid Values

idinteger

This is auto-generated by the system and returned in the response.

It is a readOnly value.

actionType*string

The type of action triggered as a response to an event.

Enums

SMS

EMAIL

CUSTOM_EMAIL

THREAD_DUMP

HTTP_REQUEST

RUN_SCRIPT_ON_NODES

DIAGNOSE_BUSINESS_TRANSACTIONS

CREATE_UPDATE_JIRA

name*string
minLength: 1

ActionName

The name you assign to the action.

scriptPath*string
minLength: 1

The relative path of the script.

Enter the part after ${machine.agent.directory}/local-scripts/

logFilesPath
The absolute path of the log file(s).
scriptTimeout*

string

integer
minimum: 1
maximum: 1440



approvalBeforeExecution*

Mandate approval before the script action is started.

Property NameType
requireApprovalboolean
approverEmail

string

pattern: 

^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$


DiagnosticAction

Property Name

Type

Description and Valid Values

idinteger

This is auto-generated by the system and returned in the response.

It is a readOnly value.

actionType*string

The type of action triggered as a response to an event.

Enums

SMS

EMAIL

CUSTOM_EMAIL

THREAD_DUMP

HTTP_REQUEST

RUN_SCRIPT_ON_NODES

DIAGNOSE_BUSINESS_TRANSACTIONS

CREATE_UPDATE_JIRA

name*string
minLength: 1

ActionName

The name you assign to the action.

duration*integer
minimum: 1
maximum: 10
The duration in minutes to run the diagnostic session.
snapshotRate*integer
minimum: 1
maximum: 10
The rate at which diagnostic snapshots are captured.
businessTransactions*string

Runs the diagnostic session on the specified Business Transactions.

Enums

ALL_AFFECTED_BUSINESS_TRANSACTIONS

SPECIFIC_BUSINESS_TRANSACTIONS

JiraAction

Property Name

Type

Description and Valid Values

idinteger

This is auto-generated by the system and returned in the response.

It is a readOnly value.

actionType*string

The type of action triggered as a response to an event.

Enums

SMS

EMAIL

CUSTOM_EMAIL

THREAD_DUMP

HTTP_REQUEST

RUN_SCRIPT_ON_NODES

DIAGNOSE_BUSINESS_TRANSACTIONS

CREATE_UPDATE_JIRA

name*string
minLength: 1

ActionName

The name you assign to the action.

jiraActionDetails*string

jiraActionType

The JIRA action type triggered as a response to an event.

Enums

CREATE_JIRA

UPDATE_JIRA

JiraActionDetails

The JIRA action type triggered as a response to an event.

Property Name

Type

Description and Valid Values

jiraActionTypestring

Enums

CREATE_JIRA

UPDATE_JIRA

JiraCreateAction

The Jira action type create JIRA is triggered as a response to an event.

Property Name

Type

Description and Valid Values

jiraActionType*string

Enums

CREATE_JIRA

UPDATE_JIRA

assignee*

string

minLength: 1


project*

string

minLength: 1


priority*

string

minLength: 1


issueType*

string

minLength: 1


JiraUpdateAction

The Jira action type update JIRA is triggered as a response to an event.

Property Name

Type

Description and Valid Values

jiraActionType*string

Enums

CREATE_JIRA

UPDATE_JIRA

changePriorityTo*

string

minLength: 1


ActionName

The name you assign to the action.

Property Name

Type

Description and Valid Values

ActionName

string

minLength: 1


ApprovalBeforeExecution

Mandate email approval before the action execution is initiated.

Property NameType
requireApprovalboolean
approverEmail

string

pattern: 

^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$

BusinessTransactions

Run the diagnostic session on the specified Business Transactions.

Property Name

Type

Description and Valid Values

businessTransactionScopestring

Enums

ALL_AFFECTED_BUSINESS_TRANSACTIONS

SPECIFIC_BUSINESS_TRANSACTIONS

AllAffectedBusinessTransactions

Run the diagnostic session on all Business Transactions.

Property Name

Type

Description and Valid Values

businessTransactionScopestring

Enums

ALL_AFFECTED_BUSINESS_TRANSACTIONS

SPECIFIC_BUSINESS_TRANSACTIONS

SpecificBusinessTransactions

Run the diagnostic session on the Business Transactions that match the specified criteria.

Property Name

Type

Description and Valid Values

businessTransactionScopestring

Enums

ALL_AFFECTED_BUSINESS_TRANSACTIONS

SPECIFIC_BUSINESS_TRANSACTIONS

businessTransactionNames*

string

minItems: 1


EmailArray

Property Name

Type

EmailArray

string

pattern: ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$

KeyValuePair

Property NameType
key*string
value*string

Email

Property Name

Type

Email

string

pattern: ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$

ActionSummaryArray

Property Name

Type

Description and Valid Values

idinteger

This is auto-generated by the system and returned in the response.

It is a readOnly value.

name*string
minLength: 1

ActionName

The name you assign to the action.

actionType*string

The type of action triggered as a response to an event.

Enums

SMS

EMAIL

CUSTOM_EMAIL

THREAD_DUMP

HTTP_REQUEST

RUN_SCRIPT_ON_NODES

DIAGNOSE_BUSINESS_TRANSACTIONS

CREATE_UPDATE_JIRA

ActionSummary

Property Name

Type

Description and Valid Values

idinteger

This is auto-generated by the system and returned in the response.

It is a readOnly value.

name*string
minLength: 1

ActionName

The name you assign to the action.

actionType*string

The type of action triggered as a response to an event.

Enums

SMS

EMAIL

CUSTOM_EMAIL

THREAD_DUMP

HTTP_REQUEST

RUN_SCRIPT_ON_NODES

DIAGNOSE_BUSINESS_TRANSACTIONS

CREATE_UPDATE_JIRA

StringIntegerPair

Property Name

Type

idinteger
name*string
minLength: 1

JiraActionTypeEnum

Property Name

Type

Description and Valid Values

jiraActionTypeEnumstring

CREATE_JIRA

UPDATE_JIRA

BusinessTransactionScopeEnum

Property Name

Type

Description and Valid Values

BusinessTransactionScopeEnum

string

ALL_AFFECTED_BUSINESS_TRANSACTIONS

SPECIFIC_BUSINESS_TRANSACTIONS

ActionTypeEnum

Property Name

Type

Description and Valid Values

ActionTypeEnumstring

Enums

SMS

EMAIL

CUSTOM_EMAIL

THREAD_DUMP

HTTP_REQUEST

RUN_SCRIPT_ON_NODES

DIAGNOSE_BUSINESS_TRANSACTIONS

CREATE_UPDATE_JIRA

ErrorResponse

Property Name

Type

statusCodeinteger
messagestring

*This property is required.

Download Examples

Download actions_api.zip for a set of examples that help you configure an action. 

Download SWAGGER YAML file

Download the Swagger actions_openapi.yml.