integer/array report.get(object parameters)
该方法帮助用户根据所提供的参数来检索计划报表。
该方法可供所有类型的用户使用。 用户可以在用户角色设置中对该方式的使用权限进行设定修改。请参考 用户角色以获取更多信息。
(object)
定义所需输出的参数。
该方法支持以下参数。
参数 | 类型 | 描述 |
---|---|---|
reportids | ID/数组 | 仅返回具有给定报告ID的已安排报告。 |
expired | 布尔值 | 如果设置为true ,仅返回已过期的已安排报告;如果为false ,则仅返回活动的已安排报告。 |
selectUsers | 查询 | 返回一个users 属性,其中包含配置为接收报告的用户。 |
selectUserGroups | 查询 | 返回一个user_groups 属性,其中包含配置为接收报告的用户组。 |
sortfield | 字符串/数组 | 根据给定属性对结果进行排序。 可能的值: reportid ,name ,status 。 |
countOutput | 布尔值 | 这些参数在参考说明中进行了描述。 |
excludeSearch | 布尔值 | |
filter | 对象 | |
limit | 整数 | |
output | 查询 | |
preservekeys | 布尔值 | |
search | 对象 | |
searchByAny | 布尔值 | |
searchWildcardsEnabled | 布尔值 | |
sortorder | 字符串/数组 | |
startSearch | 布尔值 |
(integer/array)
返回下列两种数值之一:
countOutput
参数应用的情况下,返回检索对象的数量。请求:
{
"jsonrpc": "2.0",
"method": "report.get",
"params": [
"output" : "extend",
"selectUsers" : "extend",
"selectUserGroups" : "extend",
"reportids" : ["1", "2"]
],
"id": 1
}
响应:
{
"jsonrpc": "2.0",
"result": [{
"reportid": "1",
"userid": "1",
"name": "Weekly report",
"dashboardid": "1",
"period": "1",
"cycle": "1",
"start_time": "43200",
"weekdays": "31",
"active_since": "2021-04-01",
"active_till": "2021-08-31",
"subject": "Weekly report",
"message": "Report accompanying text",
"status": "1",
"description": "Report description",
"state": "1",
"lastsent": "1613563219",
"info": "",
"users": [{
"userid": "1",
"access_userid": "1",
"exclude": "0"
}, {
"userid": "2",
"access_userid": "0",
"exclude": "1"
}],
"user_groups": [{
"usrgrpid": "7",
"access_userid": "0"
}]
}, {
"reportid": "2",
"userid": "1",
"name": "Monthly report",
"dashboardid": "2",
"period": "2",
"cycle": "2",
"start_time": "0",
"weekdays": "0",
"active_since": "2021-05-01",
"active_till": "",
"subject": "Monthly report",
"message": "Report accompanying text",
"status": "1",
"description": "",
"state": "0",
"lastsent": "0",
"info": "",
"users": [{
"userid": "1",
"access_userid": "1",
"exclude": "0"
}],
"user_groups": []
}],
"id": 1
}
CReport::get() in ui/include/classes/api/services/CReport.php.