getAdvancedReportData
Method: GET
Description: getAdvancedReportData functions based on lazy loading. When the first API call is made, it will give the count of the rows present in the report as a response. The subsequent API calls will bring the appropriate response based on the specified params.
Example:
Make the listAllAdvancedReports API call to get the reportId data. Then make the getAdvancedReportData API call subsequently.
First API Call: https://<Host>:<port>/api/json/reports/getAdvancedReportData?getColumnDetails=true&reportID=901&apiKey=***********************************
Params: getColumnDetails=true, reportID=901, apiKey=**********************************************
Response:
{
deviceNameIndex: 0
groupByCount: 0
groupHeader: []
headers: ["Device Name", "Status", "Availability (%)"]
moduleId: "1"
records: 4289
total: 86
totalColumns: 3
}
Note: Records represent the total number of rows present in the report. Depending on the records (the number of rows) you can decide the number of API calls to be made. In a single API call, you can get up to 1000 rows. So, if your report has 5000 rows totally, you have to make 5 consecutive API calls to get the complete data.
Consecutive API calls
https://<Host>:<port>/api/json/reports/getAdvancedReportData?fetchFromRowNumber=1&rowsToFetch=1000&reportId=901&apiKey=***********************************
https://<Host>:<port>/api/json/reports/getAdvancedReportData?fetchFromRowNumber=1001&rowsToFetch=1000&reportId=901&apiKey=***********************************
https://<Host>:<port>/api/json/reports/getAdvancedReportData?fetchFromRowNumber=2001&rowsToFetch=1000&reportId=901&apiKey=***********************************
https://<Host>:<port>/api/json/reports/getAdvancedReportData?fetchFromRowNumber=3001&rowsToFetch=1000&reportId=901&apiKey=***********************************
https://<Host>:<port>/api/json/reports/getAdvancedReportData?fetchFromRowNumber=4001&rowsToFetch=289&reportId=901&apiKey=***********************************
Parameter name
Description
rowsToFetch
Number of Rows to Fetch -- range is from 1 to 1000
fetchFromRowNumber
Specifies the starting number of rows to fetch the data.
getOnlyColumnDetails
Specify either true or false. If true, Report MetaData will be returned, if false, remaining parameters should be sent mandatory.
reportId
Unique and varies for each report
apiKey
An apiKey enables you to access OpManager server.