report.get

    The method allows to retrieve scheduled reports according to the given parameters.

    This method is available to users of any type. Permissions to call the method can be revoked in user role settings. See User roles for more information.

    Parameters

    The method supports the following parameters.

    (integer/array) Returns either:

    • an array of objects;
    • the count of retrieved objects, if the countOutput parameter has been used.

    Examples

    Retrieving report data

    Response:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. {
    5. "reportid": "1",
    6. "userid": "1",
    7. "name": "Weekly report",
    8. "dashboardid": "1",
    9. "period": "1",
    10. "cycle": "1",
    11. "start_time": "43200",
    12. "weekdays": "31",
    13. "active_since": "2021-04-01",
    14. "active_till": "2021-08-31",
    15. "subject": "Weekly report",
    16. "message": "Report accompanying text",
    17. "state": "1",
    18. "lastsent": "1613563219",
    19. "info": "",
    20. "users": [
    21. {
    22. "userid": "1",
    23. "access_userid": "1",
    24. "exclude": "0"
    25. },
    26. {
    27. "userid": "2",
    28. "access_userid": "0",
    29. "exclude": "1"
    30. }
    31. ],
    32. "user_groups": [
    33. {
    34. "usrgrpid": "7",
    35. "access_userid": "0"
    36. }
    37. ]
    38. },
    39. {
    40. "reportid": "2",
    41. "name": "Monthly report",
    42. "period": "2",
    43. "cycle": "2",
    44. "start_time": "0",
    45. "weekdays": "0",
    46. "active_since": "2021-05-01",
    47. "active_till": "",
    48. "subject": "Monthly report",
    49. "message": "Report accompanying text",
    50. "status": "1",
    51. "description": "",
    52. "state": "0",
    53. "lastsent": "0",
    54. "info": "",
    55. "users": [
    56. {
    57. "userid": "1",
    58. "access_userid": "1",
    59. "exclude": "0"
    60. }
    61. ],
    62. "user_groups": []
    63. }
    64. ],
    65. }

    Source

    CReport::get() in ui/include/classes/api/services/CReport.php.