Download PDF
Download page Actions API.
Actions API
Related pages:
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 the following 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"
}
}
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"
}
}
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"}]
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"
}
}
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"
}
}
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"
}
}
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 |
---|---|
200 | Fetched successfully |
201 | Created successfully |
204 | Deleted successfully |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
404 | Resource not found |
409 | Already 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 |
| string | The type of action triggered as a response to an event. EnumsSMS CUSTOM_EMAIL THREAD_DUMP HTTP_REQUEST CUSTOM 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 AppDynamics. See Configure the SMTP Server
Property Name | Type | Description and Valid Values |
---|---|---|
id | integer | This is auto-generated by the system and returned in the response. It is a |
actionType* | string | The type of action triggered as a response to an event. EnumsSMS CUSTOM_EMAIL THREAD_DUMP HTTP_REQUEST CUSTOM RUN_SCRIPT_ON_NODES DIAGNOSE_BUSINESS_TRANSACTIONS CREATE_UPDATE_JIRA |
phoneNumber* | string pattern:
|
EmailAction
An email notification is 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 |
actionType* | string | The type of action triggered as a response to an event. EnumsSMS CUSTOM_EMAIL THREAD_DUMP HTTP_REQUEST CUSTOM RUN_SCRIPT_ON_NODES DIAGNOSE_BUSINESS_TRANSACTIONS CREATE_UPDATE_JIRA |
emails* | string pattern
|
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 | ||||||
---|---|---|---|---|---|---|---|---|
id | integer | This is auto-generated by the system and returned in the response. It is a | ||||||
actionType* | string | The type of action triggered as a response to an event. EnumsSMS CUSTOM_EMAIL THREAD_DUMP HTTP_REQUEST CUSTOM RUN_SCRIPT_ON_NODES DIAGNOSE_BUSINESS_TRANSACTIONS CREATE_UPDATE_JIRA | ||||||
name* | string minLength: 1 | ActionNameThe name you assign to the action. | ||||||
emailTemplateName* | string minLength: 1 | The name of the template to be used for email notification. | ||||||
to* | string
| EmailArrayA list of email IDs. | ||||||
cc* | string
| EmailArrayA list of email IDs. | ||||||
bcc* | string
| EmailArrayA list of email IDs. | ||||||
| string | KeyValuePair
|
ThreadDumpAction
Property Name | Type | Description and Valid Values | ||||||
---|---|---|---|---|---|---|---|---|
id | integer | This is auto-generated by the system and returned in the response. It is a | ||||||
actionType* | string | The type of action triggered as a response to an event. EnumsSMS CUSTOM_EMAIL THREAD_DUMP HTTP_REQUEST CUSTOM RUN_SCRIPT_ON_NODES DIAGNOSE_BUSINESS_TRANSACTIONS CREATE_UPDATE_JIRA | ||||||
name* | string minLength: 1 | ActionNameThe 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* | ApprovalBeforeExecutionMandate an approval before the thread dump action is started.
|
HttpRequestAction
Property Name | Type | Description and Valid Values | ||||||
---|---|---|---|---|---|---|---|---|
id | integer | This is auto-generated by the system and returned in the response. It is a | ||||||
actionType* | string | The type of action triggered as a response to an event. EnumsSMS CUSTOM_EMAIL THREAD_DUMP HTTP_REQUEST CUSTOM RUN_SCRIPT_ON_NODES DIAGNOSE_BUSINESS_TRANSACTIONS CREATE_UPDATE_JIRA | ||||||
name* | string minLength: 1 | ActionNameThe 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
|
CustomAction
Property Name | Type | Description and Valid Values |
---|---|---|
id | integer | This is auto-generated by the system and returned in the response. It is a |
actionType* | string | The type of action triggered as a response to an event. EnumsSMS CUSTOM_EMAIL THREAD_DUMP HTTP_REQUEST CUSTOM RUN_SCRIPT_ON_NODES DIAGNOSE_BUSINESS_TRANSACTIONS CREATE_UPDATE_JIRA |
name* | string minLength: 1 | ActionNameThe name you assign to the action. |
customActionName* | string minLength: 1 |
ScriptAction
Property Name | Type | Description and Valid Values | ||||||
---|---|---|---|---|---|---|---|---|
id | integer | This is auto-generated by the system and returned in the response. It is a | ||||||
actionType* | string | The type of action triggered as a response to an event. EnumsSMS CUSTOM_EMAIL THREAD_DUMP HTTP_REQUEST CUSTOM RUN_SCRIPT_ON_NODES DIAGNOSE_BUSINESS_TRANSACTIONS CREATE_UPDATE_JIRA | ||||||
name* | string minLength: 1 | ActionNameThe name you assign to the action. | ||||||
scriptPath* | string minLength: 1 | The relative path of the script. Enter the part after | ||||||
logFilesPath | The absolute path of the log file(s). | |||||||
scriptTimeout* | string integer | |||||||
approvalBeforeExecution* | Mandate approval before the script action is started.
|
DiagnosticAction
Property Name | Type | Description and Valid Values |
---|---|---|
id | integer | This is auto-generated by the system and returned in the response. It is a |
actionType* | string | The type of action triggered as a response to an event. EnumsSMS CUSTOM_EMAIL THREAD_DUMP HTTP_REQUEST CUSTOM RUN_SCRIPT_ON_NODES DIAGNOSE_BUSINESS_TRANSACTIONS CREATE_UPDATE_JIRA |
name* | string minLength: 1 | ActionNameThe 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. EnumsALL_AFFECTED_BUSINESS_TRANSACTIONS SPECIFIC_BUSINESS_TRANSACTIONS |
JiraAction
Property Name | Type | Description and Valid Values |
---|---|---|
id | integer | This is auto-generated by the system and returned in the response. It is a |
actionType* | string | The type of action triggered as a response to an event. EnumsSMS CUSTOM_EMAIL THREAD_DUMP HTTP_REQUEST CUSTOM RUN_SCRIPT_ON_NODES DIAGNOSE_BUSINESS_TRANSACTIONS CREATE_UPDATE_JIRA |
name* | string minLength: 1 | ActionNameThe name you assign to the action. |
jiraActionDetails* | string | jiraActionTypeThe JIRA action type triggered as a response to an event. EnumsCREATE_JIRA UPDATE_JIRA |
JiraActionDetails
The JIRA action type triggered as a response to an event.
Property Name | Type | Description and Valid Values |
---|---|---|
jiraActionType | string | EnumsCREATE_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 | EnumsCREATE_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 | EnumsCREATE_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 Name | Type |
---|---|
requireApproval | boolean |
approverEmail | string pattern:
|
BusinessTransactions
Run the diagnostic session on the specified Business Transactions.
Property Name | Type | Description and Valid Values |
---|---|---|
businessTransactionScope | string | EnumsALL_AFFECTED_BUSINESS_TRANSACTIONS SPECIFIC_BUSINESS_TRANSACTIONS |
AllAffectedBusinessTransactions
Run the diagnostic session on all Business Transactions.
Property Name | Type | Description and Valid Values |
---|---|---|
businessTransactionScope | string | EnumsALL_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 |
---|---|---|
businessTransactionScope | string | EnumsALL_AFFECTED_BUSINESS_TRANSACTIONS SPECIFIC_BUSINESS_TRANSACTIONS |
businessTransactionNames* | string minItems: 1 |
EmailArray
Property Name | Type |
---|---|
EmailArray | string pattern: |
KeyValuePair
Property Name | Type |
---|---|
key* | string |
value* | string |
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 |
---|---|---|
id | integer | This is auto-generated by the system and returned in the response. It is a |
name* | string minLength: 1 | ActionNameThe name you assign to the action. |
actionType* | string | The type of action triggered as a response to an event. EnumsSMS CUSTOM_EMAIL THREAD_DUMP HTTP_REQUEST CUSTOM RUN_SCRIPT_ON_NODES DIAGNOSE_BUSINESS_TRANSACTIONS CREATE_UPDATE_JIRA |
ActionSummary
Property Name | Type | Description and Valid Values |
---|---|---|
id | integer | This is auto-generated by the system and returned in the response. It is a |
name* | string minLength: 1 | ActionNameThe name you assign to the action. |
actionType* | string | The type of action triggered as a response to an event. EnumsSMS CUSTOM_EMAIL THREAD_DUMP HTTP_REQUEST CUSTOM RUN_SCRIPT_ON_NODES DIAGNOSE_BUSINESS_TRANSACTIONS CREATE_UPDATE_JIRA |
StringIntegerPair
Property Name | Type |
---|---|
id | integer |
name* | string minLength: 1 |
JiraActionTypeEnum
Property Name | Type | Description and Valid Values |
---|---|---|
jiraActionTypeEnum | string | CREATE_JIRA UPDATE_JIRA |
BusinessTransactionScopeEnum
Property Name | Type | Description and Valid Values |
---|---|---|
| string | ALL_AFFECTED_BUSINESS_TRANSACTIONS SPECIFIC_BUSINESS_TRANSACTIONS |
ActionTypeEnum
Property Name | Type | Description and Valid Values |
---|---|---|
ActionTypeEnum | string | EnumsSMS CUSTOM_EMAIL THREAD_DUMP HTTP_REQUEST CUSTOM RUN_SCRIPT_ON_NODES DIAGNOSE_BUSINESS_TRANSACTIONS CREATE_UPDATE_JIRA |
ErrorResponse
Property Name | Type |
---|---|
statusCode | integer |
message | string |
*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.