IBM DataPower Operations Dashboard v1.0.22.x

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


Available alert actions via APIs

Get / Create / Update / Execute / Delete alerts

Authorization:

Authentication: Basic authentication

Roles: it is recommended to read Role Based Access Control page for understanding build-in and custom roles permissions.

From CLI (example):

curl -u username:password https://<dpod hostname>/op/api/v2/alerts/{{productView}}

GET Retrieve All Alerts

 /op/api/v2/alerts/{{productView}}

URL:

GET - https://{{dpodHostname}}/op/api/v2/alerts/{{productView}}

Request - None.

URL Parameters:

Name

Is required

Description

Parameter Type

Data options

productView

True

Product view APIC / IDG

String

  • APIC

  • IDG

Authorization:

Required Permissions

More info

  1. View or Edit alert

  2. Access permissions for required product

See roles information here: Role Based Access Control

Response:

Response Type

Example value

Description

Successful

{
    "resultCode": "SUCCESS",
    "resultMessage": "Alerts retrieved successfully,
    "result": {
        "alerts": [{
                "isSystemHealthMetric": false,
                "isActive": false,
                "name": "API Error Message Count Alert",
                "description": "Alert when more than 10 API trans. ended with a specific error message",
                "productView": "APIC",
                "indexSets": "apic-log",
                "documentType": "APIC_LOGICAL_TRANS",
                "jsonQuery": "{\"_source\":{\"includes\":[\"apiName\",\"errorMessage\"]},... }",
                "jsonParameters": "{\"messageTextSubstring\":\"Failed to establish a backside connection\"}",
                "schedule": "",
                "recipients": [],
                "filtersParameters": { "timeRangeType": "recent",.....},
                "lastUpdateTimeInMillis": 1646655197926,
                "lastUpdateUserName": "admin",
                "isPublishToMail": false,
                "isPublishToSyslog": false,
                "isPublishToMailWs": false,
                "errorThreshold": 10.0,
                "alertType": "Frequency",
                "comparator": "GreaterThan",
                "apiReference": "EDBD6F2B-A576-4619-AC63-2594A10F7EC6",
                "drillDownDashboardToken": "apicTransactions:"
            },
            {....}
        ]
    }
}

Status code: 200

resultCode → SUCCESS

resultMessage → “Alerts retrieved successfully"

GET Get Specific Alert Details

 /op/api/v2/alert/{{productView}}/{{alertApiReferenceId}}

URL:

GET - https://{{dpodHostname}}/op/api/v2/alert/{{productView}}/{{alertApiReferenceId}}

Request - None.

URL Parameters:

Name

Is required

Description

Parameter Type

Data options

productView

True

Product view APIC / IDG

String

  • APIC

  • IDG

alertApiReferenceId

True

The alert apiReferenceId (can be retrieved from “Retrieved all alerts” response)

String

  • UUID (generated by default)

  • String chosen by user in edit/create alert

Authorization:

Required Permissions

More info

  1. View or Edit alert

  2. Access permissions for required product related to the alert

See roles information here: Role Based Access Control

Response:

Response Type

Example value

Description

Successful

{
    "resultCode": "SUCCESS",
    "resultMessage": "Alert retrieved successfully",
    "result": {
        "isSystemHealthMetric": <true/false>,
        "isActive": <true/false>,
        "name": "<alert name>",
        "description": "<alert description>",
        "productView": "<alert product view>",
        "indexSets": "<alert indexSet>",
        "documentType": "<alert documentType>",
        "jsonQuery": "{\"_source\":{\"includes\":[\"apiName\",... }",
        "jsonParameters": "<json parameters>",
        "schedule": "",
        "recipients": [],
        "filtersParameters": { "timeRangeType": "recent",.....},
        "lastUpdateTimeInMillis": 1644768927839,
        "lastUpdateUserName": "Installer",
        "isPublishToMail": <true/false>,
        "isPublishToSyslog": <true/false>,
        "isPublishToMailWs": <true/false>,
        "errorThreshold": 10.0,
        "alertType": "<alert type>",
        "comparator": "<comparator>",
        "apiReference": "<alert uuid>",
        "drillDownDashboardToken": "<...>"
    }
}

Status code: 200

resultCode → SUCCESS

resultMessage → “Alert retrieved successfully”

POST Execute (Async) Alert

 /op/api/v2/alert/{{productView}}/{{alertApiReferenceId}}/executeAsync

URL:

POST - https://{{dpodHostname}}/op/api/v2/alert/{{productView}}/{{alertApiReferenceId}}/executeAsync

URL Parameters:

Name

Is required

Description

Parameter Type

Data options

productView

True

Product view APIC / IDG

String

  • APIC

  • IDG

alertApiReferenceId

True

The alert apiReferenceId you wish to execute ( id can be retrieved from “Retrieved all alerts” response)

String

  • UUID (generated by default)

  • String chosen by user in edit/create alert

Authorization:

Required Permissions

More info

  1. View or Edit alert

  2. Access permissions for required product related to the alert

See roles information here: Role Based Access Control

Request body:

Type

Parameters

Example Json

Description

Required

  1. List<String> recipients

  2. Map<String, String>filtersParameters

{
    "recipients" :[], 
    "filtersParameters" : {}
}
  1. recipients → Recipients' email address. Array can be sent empty.

  2. filtersParameters→ List of filters. List can be sent empty.

Additional parameter

Available filters:

{
    "recipients" :[“address1@mail.com“...],
    "filtersParameters" : {
      "deviceNameOp":"eq", 
      "deviceName":"<device name>", 
      "timeRangeType":"recent",
      "timeRangePeriod":"600000" 
    }
}
  1. deviceNameOp

    1. “eq” for equal

    2. “ne” for unequitable

  2. filtersParameters→ List of filters. List can be sent empty.

Response:

Response Type

Example value

Description

Successful

{
    "resultCode": "SUCCESS",
    "resultMessage": "Alert executed successfully",
    "result": {
        "executionId": <ID>
    }
}

Status code: 200

resultCode → SUCCESS

resultMessage → “Alert executed successfully”

result executionId → The alert execution id (integer).

GET Get Alert Execution Details

 /op/api/v2/alertexecution/{{productView}}/{{executionId}}

URL:

GET - https://{{dpodHostname}}/op/api/v2/alertexecution/{{productView}}/{{executionId}}

Request - None.

URL Parameters:

Name

Is required

Description

Parameter Type

Data options

productView

True

Relevant product view APIC / IDG

String

  • APIC

  • IDG

executionId

True

The alert execution ID (can be retrieved from “execute alert” api response)

String

The alert Id

Authorization:

Required Permissions

More info

  1. View or Edit alert

  2. Access permissions for required product related to the alert

See roles information here: Role Based Access Control

Response:

Response Type

Example value

Description

Successful

{
    "resultCode": "SUCCESS",
    "resultMessage": "Alert retrieved successfully",
    "result": {
        "executionId": <ID>,
        "recipients": "",
        "filters": "...",
        "executingUserName": "<user name>",
        "status": "OK",
        "requestTimeInMillis": 1646827094043,
        "executionTimeInMillis": 1646827094948,
        "completionTimeInMillis": 1646827101507
        "message": "Execution finished with no alerts."
    }
}

Status code: 200

resultCode → SUCCESS

resultMessage → “Alert retrieved successfully”

result

  • executionId→ The alert execution ID

  • recipients→ Recipients' email address. Array can be sent empty.

  • filters→ List of filters. List can be sent empty.

  • executingUserName→ The user who executed this alert execution

  • status→ Alert execution status

  • requestTimeInMillis→ Request time in Millis

  • executionTimeInMillis→ Execution time in Millis

  • completionTimeInMillis→ Completion time in Millis

  • message

    • "Execution finished with no alerts." - when no alerts found

    • "Execution finished with X alerts." - when X alerts found

Failure

{
    "resultCode": "ERROR",
    "resultErrorCode": "ALERT_NOT_FOUND",
    "resultMessage": "Alert execution not found"
}

Status code: 200

resultCode → ERROR

resultErrorCode → ALERT_NOT_FOUND

resultMessage → “Alert execution not found”

GET Download Alert Execution

 /op/api/v2/alertexecution/{{productView}}/{{executionId}}/download

URL:

GET - https://{{dpodHostname}}/op/api/v2/alertexecution/{{productView}}/{{executionId}}/download

Request - None.

URL Parameters:

Name

Is required

Description

Parameter Type

Data options

productView

True

Relevant product view APIC / IDG

String

  • APIC

  • IDG

executionId

True

The alert execution ID (can be retrieved from “execute alert” api response)

String

The alert Id

Authorization:

Required Permissions

More info

  1. View or Edit alert

  2. Access permissions for required product related to the alert

See roles information here: Role Based Access Control

Response:

Response Type

Value

Description

Successful

xls file type

Status code: 200

POST Duplicate Alert

 /op/api/v2/alert/{{productView}}/{{alertApiReferenceId}}/duplicate

URL:

POST - https://{{dpodHostname}}/op/api/v2/alert/{{productView}}/{{alertApiReferenceId}}/duplicate

Request - None.

URL Parameters:

Name

Is Required

Description

Parameter Type

Data Type

productView

True

Product view APIC / IDG

String

  • APIC

  • IDG

alertApiReferenceId

True

The alert apiReferenceId you wish to duplicate ( id can be retrieved from “Retrieved all alerts” response)

String

‘apiReferenceId’ value from the original alert

Authorization:

Required Permissions

More info

  1. Edit alert

  2. Access permissions for required product related to the alertyou wish to duplicate

See roles information here: Role Based Access Control

Response:

Response Type

Example value

Description

Successful

{
    "resultCode": "SUCCESS",
    "resultMessage": "Alert duplicated successfully",
    "result": {
        "isSystemHealthMetric": <true/false>,
        "isActive": <true/false>,
        "name": "<source alert name> Copy",
        "description": "<source alert description>",
        "productView": "<source alert productView>",
        "indexSets": "<source alert indexSet>",
        "documentType": "<source alert documentType>",
        "jsonQuery": "<source alert query>",
        "jsonParameters": "<source alert json parameters>",
        "schedule": "",
        "recipients": [],
        "filtersParameters": { "timeRangeType": "recent",.....},
        "lastUpdateTimeInMillis": 1646826210928,
        "lastUpdateUserName": "<current userName>",
        "apiReference": "<New unique alert uuid>",
        "isPublishToMail": <true/false>,
        "isPublishToSyslog": <true/false>,
        "isPublishToMailWs": <true/false>,
        "errorThreshold": 10.0,
        "alertType": "<alert type>",
        "comparator": "<comparator>",
        "drillDownDashboardToken": "..."
    }
}

Status code: 200

resultCode → SUCCESS

resultMessage → “Alert duplicated successfully”

POST Add Alert

 /op/api/v2/alerts/{{productView}}

URL:

POST - https://{{dpodHostname}}/op/api/v2/alerts/{{productView}}

URL Parameters:

Name

Is required

Description

Parameter Type

Data Type

productView

True

Product view APIC / IDG

String

  • APIC

  • IDG

Authorization:

Required Permissions

More info

  1. Edit alert

  2. Access permissions for product view of new alert

See roles information here: Role Based Access Control

Request body:

Type

Parameters

Example Json

Description

Required

  1. boolean isSystemHealthMetric

  2. boolean isActive

  3. String name

  4. String description

  5. String productView

  6. String indexSets

  7. String documentType

  8. String jsonQuery

  9. String jsonParameters

  10. String schedule

  11. List<String>recipients

  12. Map<String, String>filtersParameters

  13. boolean isPublishToMail

  14. boolean isPublishToSyslog

  15. boolean isPublishToMailWs

  16. double errorThreshold

  17. String alertType

  18. String comparator

  19. String drillDownDashboardToken

{
        "isSystemHealthMetric": <true/false>,
        "isActive": <true/false>,
        "name": "<new alert name>",
        "description": "<new alert description>",
        "productView": "<new alert productView type>",
        "indexSets": "<new alert indexSet>",
        "documentType": "<new alert documentType>",
        "jsonQuery": "<new alert query>",
        "jsonParameters": "<new alert json parameters>"
        "schedule": "",
        "recipients": [],
        "filtersParameters": {...},
        "isPublishToMail": <true/false>,
        "isPublishToSyslog": <true/false>,
        "isPublishToMailWs": <true/false>,
        "errorThreshold": <new alert error threshold>,
        "alertType": "<new alert type>",
        "comparator": "<new alert comparator>",
        "drillDownDashboardToken": "..."
    }
  1. recipients → recipients' email address. Array can be sent empty.

  2. filtersParameters→ list of filters. List can be sent empty.

Additional parameter

Available filtersParameters:

{
      ....
        "filtersParameters": {
            "timeRangeType": "recent",
            "timeRangePeriod": "86400000"
        },
      ....
}

Response:

Response Type

Example value

Description

Successful

{
    "resultCode": "SUCCESS",
    "resultMessage": "Alert added successfully",
    "result": {
        "isSystemHealthMetric": <true/false>,
        "isActive": <true/false>,
        "name": "<new alert name>",
         "description": "<new alert description>",
        "productView": "<new alert productView type>",
        "indexSets": "<new alert indexSet>",
        "documentType": "<new alert documentType>",
        "jsonQuery": "<new alert query>",
        "jsonParameters": "<new alert json parameters>"
        "schedule": "",
        "recipients": [],
        "filtersParameters": { "timeRangeType": "recent",.....},
        "lastUpdateTimeInMillis": 1646826210928,
        "lastUpdateUserName": "<current userName>",
        "isPublishToMail": <true/false>,
        "isPublishToSyslog": <true/false>,
        "isPublishToMailWs": <true/false>,
        "errorThreshold": <new alert error threshold>,
        "alertType": "<new alert type>",
        "comparator": "<new alert comparator>",
        "apiReference": "New alert unique uuid",
        "drillDownDashboardToken": "..."
    }
}

Status code: 200

resultCode → SUCCESS

resultMessage → “Alert added successfully”

PUT Edit Alert

 /op/api/v2/alert/{{productView}}/{{alertApiReferenceId}}

URL:

PUT - https://{{dpodHostname}}/op/api/v2/alert/{{productView}}/{{alertApiReferenceId}}

URL Parameters:

Name

Is required

Description

Parameter Type

Data Type

productView

True

Product view APIC / IDG

String

  • APIC

  • IDG

alertApiReferenceId

True

The alert apiReferenceId you wish to edit ( id can be retrieved from “Retrieved all alerts” response)

String

‘apiReferenceId’ of the alert you want to edit

Authorization:

Required Permissions

More info

  1. Edit alert

  2. Access permissions for product view of the alert

See roles information here: Role Based Access Control

Request:

Type

Parameters

Example Json

Description

Required

  1. boolean isSystemHealthMetric

  2. boolean isActive

  3. String name

  4. String description

  5. String productView

  6. String indexSets

  7. String documentType

  8. String jsonQuery

  9. String jsonParameters

  10. String schedule

  11. List<String>recipients

  12. Map<String, String>filtersParameters

  13. boolean isPublishToMail

  14. boolean isPublishToSyslog

  15. boolean isPublishToMailWs

  16. double errorThreshold

  17. String alertType

  18. String comparator

  19. String drillDownDashboardToken

{
        "isSystemHealthMetric": <true/false>,
        "isActive": <true/false>,
        "name": "<alert edited/source name>",
        "description": "<alert edited/source description>",
        "productView": "<alert edited/source productView>",
        "indexSets": "<alert edited/source indexSet>",
        "documentType": "<alert edited/source documentType>",
        "jsonQuery": "<alert edited/source query>",
        "jsonParameters": "<alert edited/source json parameters>"
        "schedule": "",
        "recipients": [],
        "filtersParameters": {...},
        "isPublishToMail": <true/false>,
        "isPublishToSyslog": <true/false>,
        "isPublishToMailWs": <true/false>,
        "errorThreshold": <alert edited/source error threshold>,
        "alertType": "<alert edite/source type>",
        "comparator": "<alert edited/source comparator>",
        "drillDownDashboardToken": "..."
    }
  1. recipients → recipients' email address. Array can be sent empty.

  2. filtersParameters→ list of filters. List can be sent empty.

Additional parameter

Available filtersParameters:

{
      ....
        "filtersParameters": {
            "timeRangeType": "recent",
            "timeRangePeriod": "86400000"
        },
      ....
}

Response:

Response Type

Example value

Description

Successful

{
    "resultCode": "SUCCESS",
    "resultMessage": "Alert updated successfully",
    "result": {
        "name": "<alert edited/source name>",
        "description": "<alert edited/source description>",
        "productView": "<alert edited/source productView>",
        "indexSets": "<alert edited/source indexSet>",
        "documentType": "<alert edited/source documentType>",
        "jsonQuery": "<alert edited/source query>",
        "jsonParameters": "<alert edited/source json parameters>"
        "schedule": "",
        "recipients": [],
        "filtersParameters": { "timeRangeType": "recent",.....},
        "lastUpdateTimeInMillis": 1646826210928,
        "lastUpdateUserName": "<current userName>",
        "isPublishToMail": <true/false>,
        "isPublishToSyslog": <true/false>,
        "isPublishToMailWs": <true/false>,
        "errorThreshold": <alert edited/source error threshold>,
        "alertType": "<alert edite/source type>",
        "comparator": "<alert edited/source comparator>",
        "apiReference": "<alert uuid>",
        "drillDownDashboardToken": "..."
    }
}

Status code: 200

resultCode → SUCCESS

resultMessage → “Alert updated successfully”

DELETE Delete Alert

 /op/api/v2/alert/{{productView}}/{{alertApiReferenceId}}

URL:

DELETE - https://{{dpodHostname}}/op/api/v2/alert/{{productView}}/{{alertApiReferenceId}}

Request - None.

URL Parameters:

Name

Is required

Description

Parameter Type

Data Type

productView

True

Product view APIC / IDG

String

  • APIC

  • IDG

alertApiReferenceId

True

The alert apiReferenceId you wish to delete ( id can be retrieved from “Retrieved all alerts” response)

String

‘apiReferenceId’ of the alert to delete

Authorization:

Required Permissions

More info

  1. Edit alert

  2. Access permissions for required product related to the alert you wish to delete

See roles information here: Role Based Access Control

Response:

Response Type

Example value

Description

Successful

{
    "resultCode": "SUCCESS",
    "resultMessage": "Alert deleted successfully"
}

Status code: 200

resultCode → SUCCESS

resultMessage → “Alert deleted successfully”

  • No labels