User will need an opDashOperatorRole access for this API
Run report by reference:GET
The report REST URL is available in the "REST URL" field when viewing a report in the web console.
GET /op/api/v1/reports/00000000-0000-0000-0000-a10000000001
{
"executionID":51,
"reportName":"Device CPU",
"message":"Report Executed",
"status":"OK"
}
Example of an error:
{
"summary":"Exception:Reference 2F522097-7F15-4C91-91C7-4B566ABA136X not found in Reports table (org.montier.reports.rest.ReportResource.executeReport(ReportResource.java:59))",
"message":"Reference 2F522097-7F15-4C91-91C7-4B566ABA136X not found in Reports table",
"status":"error"
}
Show report execution result
GET /op/api/v1/reportexecution/{execution id}
The execution ID is the one that was returned by the Run report by reference API
Example of the returned output:
{
"resultCode": "SUCCESS",
"resultMessage": "Report execution status retrieved successfully",
"result": {
"executionId": 1,
"recipients": "",
"filters": "-timeRangeType:recent-timeRangePeriod:86400000",
"executingUserName": "REST_API",
"status": "OK",
"requestTime": 1618220913156,
"executionTime": 1618220913259,
"completionTime": 1618220913962
}
}
Get report execution output
GET /op/api/v1/reportexecution/{execution id}/output
The execution ID is the one that was returned by the Run report by reference API
The output will be an XLS file
Get all available reports:
GET GET /op/api/v1/reports/
The lastUpdateTime field returns the last time the alert was updated in epoch time format
{
"reports": [
{
"name": "Executed Transactions Device CPU Report",
"description": "List of all executed transactions""Devices ordered by average CPU",
"id": 1,
"URI": "/op/api/v1/reports/e123a124026907A7-647fC761-4de04C62-9b3eA614-71875e7eee90798F40DB8732",
"lastUpdateTime": 15299418189671618217550854
},
{
"name": "Device Resources Domain Request Size Report",
"description": "All device resources samples""Domains ordered by total request size",
"id": 2,
"URI": "/op/api/v1/reports/65beb0d6FE799A78-7f78A243-4b484D1B-a6cbA78C-cd21a7c3a983CF16832F57E3",
"lastUpdateTime": 15299418189711618217550865
},
{
"name": "Message Codes Count Domain Total Transactions Report",
"description": "Message codes distribution"Domains ordered by total number of transactions",
"id": 3,
"URI": "/op/api/v1/reports/61e12f8f08945D21-97bc635D-4cd24529-8fc39E12-b9c4dc9b0d8eE032717DC52B",
"lastUpdateTime": 15299418189761618217550875
},
{
"name": "Device CPUService Elapsed Time Report",
"description": "Devices Services ordered by average CPU"elapsed time",
"id": 4,
"URI": "/op/api/v1/reports/2F5220977BC2FEA8-7F15086F-4C914307-91C79058-4B566ABA136FB1C2DB1D297B",
"lastUpdateTime": 15298529081491618217550884
},
...
]
}