This method returns the list of scheduled reports, according to the parameters received.
This method requires you to place the {service}
name in the API URL. The allowed services are:
computers
, for "Computers and Virtual Machines"virtualmachines
, for "Virtual Machines"
For example, the request URL for the virtual machines
service is:
https://YOUR-HOSTNAME/api/v1.0/jsonrpc/reports/virtualmachines
Parameter | Type | Optional | Description |
---|---|---|---|
| String | Yes | The name of the report. |
| Number | Yes | The report type. The available types are:
|
| Number | Yes | The results page number. Default page number is 1. |
| Number | Yes | The number of items displayed in a page. The upper limit is 100 items per page. Default value: 30 items per page. |
This method returns an Object containing information about the reports. The returned object contains:
page
- the current page displayedpagesCount
- the total number of available pagesperPage
- the total number of returned items per pageitems
- the list of reports. Each entry in the list has the following fields:ID
, the ID of the reportname
, the name of the reporttype
, the report type, as described in the Parameters tableoccurrence
, the time interval when the report runs. The occurrence can be: 2 - hourly, 3 - daily, 4 - weekly or 5 - monthly. Please mind that value 1 (instant report) is excluded from the valid options.
total
- the total number of items
Request:
{
"params": {
"type": 2,
"page": 2,
"perPage": 4
},
"jsonrpc": "2.0",
"method": "getReportsList",
"id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f"
}
Response:
{
"id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
"jsonrpc":"2.0",
"result": {
"page": 2,
"pagesCount": 11,
"perPage": 5,
"total": 54
"items": [
{
'id': '5638cdceb1a43d46137b23c6',
'name': 'My report 1',
'occurrence': 2,
'type': 2
},
{
'id': '5638d7f8b1a43d49137b23c9',
'name': 'My report 2',
'occurrence': 4,
'type': 2
},
{
'id': u'563b271bb1a43d21077b23c8',
'name': 'My report 3',
'occurrence': 4,
'type': 2
},
{
'id': '563a289eb1a43d2f617b23c6',
'name': 'My report 4',
'occurrence': 2,
'type': 2
}
]
}
}