IBM DataPower Operations Dashboard v1.0.22.x

Reports REST API

In this page:

GET Retrieve all Reports

Description:

This API retrieves all reports.

Required Roles:

One of the following:

  • A custom role that allows access to “View Reports”.

  • The OpDashAdminRole builtin role.

  • The OpDashPowerUserRole builtin role.

URI:

/op/api/v2/reports/{{productView}}

Request:

The request should use the GET method with the following URL parameters:

Name

Required/Optional

Description

Type

Available Options

Name

Required/Optional

Description

Type

Available Options

productView

Required

The product view.

String

  • APIC

  • IDG

Successful Response:

The response includes the following fields in its resultelement:

Name

Description

Type

Available Options

Name

Description

Type

Available Options

reports

 

Array of Element

 

reports[].id

The ID of the report.

Long

 

reports[].name

The report name.

String

 

reports[].description

Text description of the report’s definition.

String

 

reports[].productView

The product view assigned to the report.

String

  • IDG

  • APIC

reports[].apiReference

Unique report UUID

String

 

reports[].indexSets

Which OpenSearch index sets will be queried (according to product view).

String (Comma separated)

See Index Sets.

reports[].documentType

Which OpenSearch document types will be queried (according to product view)

String

See Document type.

reports[].jsonQuery

An OpenSearch query.

String (JSON)

 

reports[].jsonParameters

Key-Value Pairs to Replace Values within the Query (JSON).

String (JSON)

 

reports[].schedule

The scheduling definition using a simplified version of the Cron scheduling format.

String

format: sec min hour day month weekday year

reports[].recipients

A list of email addresses the report will be emailed to.

Array of Strings

 

reports[].adHocFilterTypes

Ad hoc filters (according to product type and document type).

Array of Strings

See Ad hoc Filters.

reports[].filtersParameters

Report filters (according to product type and document type).
Provided as Key-Value Pairs, where:

  • The key is the filter name and the value is the filter value.

  • The key is the filter operator ( filter name + Op ) and the value is the operator ( eq / ne / gt / gte / lte / lt).

Element

See Report Filters.

reports[].serviceNameFieldOverride

Apply the service filter value to a specific Store field. You may leave this field empty unless otherwise advised.

String

 

reports[].lastUpdateTimeInMillis

Time the report was created.

Long

 

reports[].lastUpdateUserName

The user who created the report.

String

 

reports[].esHeadersDictionary

Key-Value Pairs to Replace Headers with more meaningful headers in Generated Report (JSON) .

String (JSON)

 

reports[].aggregationNamesToIgnore

Aggregation names to ignore in results.

String (Comma separated)

 

Example:

{ "resultCode": "SUCCESS", "resultMessage": "Reports retrieved successfully", "result": { "reports": [ { "id": 20, "name": "API Latency Report", "description": "API Latency", "productView": "APIC", "apiReference": "1B1925B3-EAE0-4E4A-97B6-78AD13EDE856", "indexSets": "apic-log", "documentType": "APIC_LOGICAL_TRANS", "jsonQuery": "{\"query\":{\"bool\":{\"must\":{\"match_all\":{}},\"filter\":{\"bool\":{\"must\":[{\"terms\":{\"recordType\":[\"R4\"]}},{\"bool\":{\"should\":[{\"term\":{\"recordCounter\":{\"value\":\"1\"}}},{\"bool\":{\"must_not\":[{\"exists\":{\"field\":\"recordCounter\"}}]}}],\"minimum_should_match\":\"1\"}}],\"must_not\":[{\"bool\":{\"must\":[{\"terms\":{\"recordType\":[\"R4\"]}},{\"bool\":{\"should\":[{\"term\":{\"recordCounter\":{\"value\":\"1\"}}},{\"bool\":{\"must_not\":[{\"exists\":{\"field\":\"recordCounter\"}}]}}],\"minimum_should_match\":\"1\"}}],\"should\":[{\"term\":{\"txStartRecordCounter\":{\"value\":\"0\"}}},{\"bool\":{\"should\":[{\"match_phrase\":{\"errorMessage\":{\"query\":\"This server could not verify that you are authorized to access the URL\"}}},{\"match_phrase\":{\"errorMessage\":{\"query\":\"Client id missing.\"}}},{\"match_phrase\":{\"errorMessage\":{\"query\":\"Client id in wrong location.\"}}},{\"match_phrase\":{\"errorMessage\":{\"query\":\"Invalid client id or secret.\"}}}],\"minimum_should_match\":\"1\"}},{\"bool\":{\"must\":[{\"term\":{\"apiName\":{\"value\":\"oauth\"}}},{\"term\":{\"isError\":{\"value\":true}}}]}},{\"terms\":{\"frontendHTTPResponseCode\":[401,403]}}],\"minimum_should_match\":\"1\"}}]}}}},\"aggs\":{\"Catalog\":{\"terms\":{\"field\":\"catalogName\",\"size\":1000,\"shard_size\":10000,\"order\":{\"_count\":\"desc\"}},\"aggs\":{\"API\":{\"terms\":{\"field\":\"apiName\",\"size\":1000,\"shard_size\":10000,\"order\":{\"_count\":\"desc\"}},\"aggs\":{\"ApiVersion\":{\"terms\":{\"field\":\"apiVersion\",\"size\":1000,\"shard_size\":10000,\"order\":{\"_count\":\"desc\"}},\"aggs\":{\"FrontendHTTPResponseCode\":{\"terms\":{\"field\":\"frontendHTTPResponseCode\",\"size\":1000,\"shard_size\":10000,\"order\":{\"_count\":\"desc\"}},\"aggs\":{\"AvgTotalLatency\":{\"avg\":{\"field\":\"totalLatency\"}},\"MaxTotalLatency\":{\"max\":{\"field\":\"totalLatency\"}}}}}}}}}}},\"size\":0}", "schedule": "", "recipients": [], "adHocFilterTypes": [ "TIME", "DEVICE", "DOMAIN", "APIC_CATALOG", "APIC_SPACE", "APIC_PRODUCT", "APIC_PLAN", "APIC_API", "APIC_API_VERSION", "APIC_CONSUMER_APP" ], "filtersParameters": { "timeRangeType": "recent", "timeRangePeriod": "86400000" }, "lastUpdateTimeInMillis": 1719389033095, "lastUpdateUserName": "Installer", "esHeadersDictionary": "{\"Catalog Results\":\"Catalog Transactions\",\"API Results\":\"API Transactions\",\"ApiVersion\":\"API Version\",\"ApiVersion Results\":\"API Version Transactions\",\"FrontendHTTPResponseCode\":\"Frontend HTTP Response Code\",\"FrontendHTTPResponseCode Results\":\"Frontend HTTP Response Code Transactions\",\"MaxTotalLatency\":\"Max Total Latency (ms.)\",\"AvgTotalLatency\":\"Avg Total Latency (ms.)\"}" }, ..............................

GET Get a Report

Description:

This API retrieves a specific report.

Required Roles:

One of the following:

  • A custom role that allows access to “View Reports”.

  • The OpDashAdminRole builtin role.

  • The OpDashPowerUserRole builtin role.

URI:

/op/api/v2/report/{{productView}}/{{reportApiReferenceId}}

Request:

The request should use the GET method with the following URL parameters:

Name

Required/Optional

Description

Type

Available Options

Name

Required/Optional

Description

Type

Available Options

productView

Required

The product view.

String

  • APIC

  • IDG

reportApiReferenceId

Required

The report UUID.

String

 

Successful Response:

The response includes the following fields in its resultelement:

Name

Description

Type

Available Options

Name

Description

Type

Available Options

id

The ID of the report.

Long

 

name

The report name.

String

 

description

Text description of the report’s definition.

String

 

productView

The product view assigned to the report.

String

  • IDG

  • APIC

apiReference

Unique report UUID

String

 

indexSets

Which OpenSearch index sets will be queried (according to product view).

String (Comma separated)

See Index Sets.

documentType

Which OpenSearch document types will be queried (according to product view).

String

See Document type.

jsonQuery

An OpenSearch query.

String (JSON)

 

jsonParameters

Key-Value Pairs to Replace Values within the Query (JSON).

String (JSON)

 

schedule

The scheduling definition using a simplified version of the Cron scheduling format.

String

format: sec min hour day month weekday year

recipients

A list of email addresses the report will be emailed to.

Array of Strings

List can be empty.

adHocFilterTypes

Ad hoc filters (according to product type and document type).

Array of Strings

See Ad hoc Filters.

filtersParameters

Report filters (according to product type and document type).
Provided as Key-Value Pairs, where:

  • The key is the filter name and the value is the filter value.

  • The key is the filter operator ( filter name + Op ) and the value is the operator ( eq / ne / gt / gte / lte / lt).

Element

See Report Filters.

serviceNameFieldOverride

Apply the service filter value to a specific Store field. You may leave this field empty unless otherwise advised.

String

 

lastUpdateTimeInMillis

Time the report was created.

Long

 

lastUpdateUserName

The user who created the report.

String

 

esHeadersDictionary

Key-Value Pairs to Replace Headers with more meaningful headers in Generated Report (JSON) .

String (JSON)

 

aggregationNamesToIgnore

Aggregation names to ignore in results.

String (Comma separated)

 

Example:

{ "resultCode": "SUCCESS", "resultMessage": "Report retrieved successfully", "result": { "id": 40, "name": "This_is_automation123", "description": "This_is_automation1", "productView": "APIC", "apiReference": "5F52B418-4DB1-4222-9AD1-2EA9FEE4F453", "indexSets": "wdp-device-resources", "documentType": "WDP_DEVICE_RESOURCES", "jsonQuery": "{\"query\":{\"bool\":{\"must\":{\"match_all\":{}},\"filter\":{}}},\"aggs\":{\"Device\":{\"terms\":{\"field\":\"deviceName\",\"size\":1000,\"shard_size\":10000,\"order\":{\"AvgUsedCPUInPercentage\":\"desc\"}},\"aggs\":{\"AvgUsedCPUInPercentage\":{\"avg\":{\"field\":\"usedCPUInPercentage\"}},\"MaxUsedCPUInPercentage\":{\"max\":{\"field\":\"usedCPUInPercentage\"}}}}},\"size\":0}", "jsonParameters": "", "schedule": "0 0 13 4 * * *", "recipients": [], "adHocFilterTypes": [ "TIME", "DEVICE" ], "filtersParameters": { "timeRangeType": "recent", "timeRangePeriod": "86400000", "deviceNameOp": "eq", "deviceName": "idg_10_5_0_a" }, "serviceNameFieldOverride": "", "lastUpdateTimeInMillis": 1727607998587, "lastUpdateUserName": "admin", "esHeadersDictionary": "{\"Device Results\":\"Device Samples\",\"AvgUsedCPUInPercentage\":\"Average CPU (%)\",\"MaxUsedCPUInPercentage\":\"Maximum CPU (%)\"}", "aggregationNamesToIgnore": "" } }

POST Execute (Async) a Report

Description:

This API executes a specific report.

Required Roles:

One of the following:

  • A custom role that allows access to “View Reports”.

  • The OpDashAdminRole builtin role.

  • The OpDashPowerUserRole builtin role.

URI:

/op/api/v2/report/{{productView}}/{{reportApiReferenceId}}/executeAsync

Request:

The request should use the POST method with the following URL parameters:

Name

Required/Optional

Description

Type

Available Options

Name

Required/Optional

Description

Type

Available Options

productView

Required

The product view.

String

  • APIC

  • IDG

reportApiReferenceId

Required

The report UUID.

String

 

The request should use the POST method with the following fields in its body:

Name

Required/Optional

Description

Type

Available Options

Name

Required/Optional

Description

Type

Available Options

recipients

Required

A list of email addresses the report will be emailed to.

Array of Strings

 

filtersParameters

Required

Report filters (according to product type and document type).
Provided as Key-Value Pairs, where:

  • The key is the filter name and the value is the filter value.

  • The key is the filter operator ( filter name + Op ) and the value is the operator ( eq / ne / gt / gte / lte / lt).

Element

See Report Filters.

Example:

{ "recipients": [ "test@com" ], "filtersParameters": { "timeRangeType": "recent", "timeRangePeriod": "86400000", "deviceName": "idg_10_5_0_a" } }

Successful Response:

The response includes the following fields in its resultelement:

Name

Description

Type

Available Options

Name

Description

Type

Available Options

executionId

The report execution ID.

Long

 

Example:

GET Get a Report Execution

Description:

This API retrieves execution details for a specific report execution.

Required Roles:

One of the following:

  • A custom role that allows access to “View Reports”.

  • The OpDashAdminRole builtin role.

  • The OpDashPowerUserRole builtin role.

URI:

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

Request:

The request should use the GET method with the following URL parameters:

Name

Required/Optional

Description

Type

Available Options

Name

Required/Optional

Description

Type

Available Options

productView

Required

The product view.

String

  • APIC

  • IDG

executionId

Required

The report execution ID.

String

 

Successful Response:

The response includes the following fields in its resultelement:

Name

Description

Type

Available Options

Name

Description

Type

Available Options

executionId

The report execution ID.

Long

 

recipients

Recipients' email address.

Array of Strings

 

filters

Report filters (according to product type and document type).
Provided as Key-Value Pairs, where:

  • The key is the filter name and the value is the filter value.

  • The key is the filter operator ( filter name + Op ) and the value is the operator ( eq / ne / gt / gte / lte / lt).

String

See Report Filters.

executingUserName

The user who executed this report execution.

String

 

status

Report execution status.

String

  • Requested

  • Pending

  • Executing

  • OK

  • Error

requestTimeInMillis

Request time in milliseconds.

Long

 

pendingTimeInMillis

Pending time in milliseconds.

Long

 

executionTimeInMillis

Execution time in milliseconds.

Long

 

completionTimeInMillis

Completion time in milliseconds.

Long

 

Example:

GET Download a Report Execution Result

Description:

This API downloads a report execution result by its execution ID.

Required Roles:

One of the following:

  • A custom role that allows access to “View Reports”.

  • The OpDashAdminRole builtin role.

  • The OpDashPowerUserRole builtin role.

URI:

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

Request:

The request should use the GET method with the following URL parameters:

Name

Required/Optional

Description

Type

Available Options

Name

Required/Optional

Description

Type

Available Options

productView

Required

The product view.

String

  • APIC

  • IDG

executionId

Required

The report execution ID.

String

 

Successful Response:

The response content type is application/octet-stream and includes the report execution result file content as its body.
To open the report execution result file, save the response content as a file with an extension of .xls and open the file.
The Content-Disposition response header value includes a suggested file name (e.g.: attachment; filename=report-<report name + "-" + execution ID>.xls).

POST Duplicate a Report

POST Add a Report

PUT Edit a Report

DELETE Delete a Report

 

 

Copyright © 2015 MonTier Software (2015) Ltd.