Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

User will need an opDashOperatorRole access for this API

Run report by reference:

The report REST URL is available in the "REST URL" field when viewing a report in the web console, or you can get it from the Get all available reports REST API described later on this page.
Image Added

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  /op/api/v1/reports/
The lastUpdateTime field returns the last time the alert was updated in epoch time format

{
"reports": [
{
"name": "Device CPU Report",
"description": "Devices ordered by average CPU",
"id": 1,
"URI": "/op/api/v1/reports/026907A7-C761-4C62-A614-798F40DB8732",
"lastUpdateTime": 1618217550854
},
{
"name": "Domain Request Size Report",
"description": "Domains ordered by total request size",
"id": 2,
"URI": "/op/api/v1/reports/FE799A78-A243-4D1B-A78C-CF16832F57E3",
"lastUpdateTime": 1618217550865
},
{
"name": "Domain Total Transactions Report",
"description": "Domains ordered by total number of transactions",
"id": 3,
"URI": "/op/api/v1/reports/08945D21-635D-4529-9E12-E032717DC52B",
"lastUpdateTime": 1618217550875
},
{
"name": "Service Elapsed Time Report",
"description": "Services ordered by average elapsed time",
"id": 4,
"URI": "/op/api/v1/reports/7BC2FEA8-086F-4307-9058-B1C2DB1D297B",
"lastUpdateTime": 1618217550884
},

...

]
}