integer/array report.get(object parameters)
このメソッドで、指定されたパラメーターに従ってスケジュールされたレポートを取得できます。
このメソッドはどのタイプのユーザーでも利用可能です。このメソッドを呼び出す権限は、ユーザーロール設定で取り消すことができます。詳しくはユーザーの役割を参照してください。
(object) 目的の出力を定義するパラメーター
このメソッドは、次のパラメーターをサポートします。
| パラメータ | タイプ | 説明 |
|---|---|---|
| reportids | string/array | 指定されたレポートIDを持つスケジュールされたレポートのみを返します |
| expired | boolean | true:期限切れのスケジュール済みレポートのみ false:アクティブなスケジュール済みレポートのみ |
| selectUsers | query | レポートの送信先として構成されているusersプロパティを返します |
| selectUserGroups | query | レポートの送信先として構成されているuser_groups プロパティを返します。 |
| sortfield | string/array | 指定されたプロパティで結果を並べ替えます。 可能な値は reportid,name,statusです。 |
| countOutput | boolean | すべてのgetメソッドに共通するこれらのパラメーターについてはリファレンス解説ページで詳しく説明されています。 |
| excludeSearch | boolean | |
| filter | object | |
| limit | integer | |
| output | query | |
| preservekeys | boolean | |
| search | object | |
| searchByAny | boolean | |
| searchWildcardsEnabled | boolean | |
| sortorder | string/array | |
| startSearch | boolean |
(integer/array) 次のいずれかを返します:
countOutputパラメータが使用されている場合、取得されたオブジェクトの数Request:
{
"jsonrpc": "2.0",
"method": "report.get",
"params": [
"output": "extend",
"selectUsers": "extend",
"selectUserGroups": "extend",
"reportids": ["1", "2"]
],
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}Response:
{
"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.