Áú»¢¶Ä²©

§¿§ä§à §á§Ö§â§Ö§Ó§à§Õ §ã§ä§â§Ñ§ß§Ú§è§í §Õ§à§Ü§å§Þ§Ö§ß§ä§Ñ§è§Ú§Ú §ã §Ñ§ß§Ô§Ý§Ú§Û§ã§Ü§à§Ô§à §ñ§Ù§í§Ü§Ñ. §±§à§Þ§à§Ô§Ú§ä§Ö §ß§Ñ§Þ §ã§Õ§Ö§Ý§Ñ§ä§î §Ö§Ô§à §Ý§å§é§ê§Ö.

report.create

§°§á§Ú§ã§Ñ§ß§Ú§Ö

object report.create(§à§Ò§ì§Ö§Ü§ä/§Þ§Ñ§ã§ã§Ú§Ó reports)

§¿§ä§à§ä §Þ§Ö§ä§à§Õ §á§à§Ù§Ó§à§Ý§ñ§Ö§ä §ã§à§Ù§Õ§Ñ§Ó§Ñ§ä§î §ß§à§Ó§í§Ö §Ù§Ñ§á§Ý§Ñ§ß§Ú§â§à§Ó§Ñ§ß§ß§í§Ö §à§ä§é§Ö§ä§í.

§¿§ä§à§ä §Þ§Ö§ä§à§Õ §Õ§à§ã§ä§å§á§Ö§ß §ä§à§Ý§î§Ü§à §á§à§Ý§î§Ù§à§Ó§Ñ§ä§Ö§Ý§ñ§Þ §ã §ä§Ú§á§à§Þ §Õ§à§ã§ä§å§á§Ñ §¡§Õ§Þ§Ú§ß§Ú§ã§ä§â§Ñ§ä§à§â §Ú §³§å§á§Ö§â-§Ñ§Õ§Þ§Ú§ß§Ú§ã§ä§â§Ñ§ä§à§â. §²§Ñ§Ù§â§Ö§ê§Ö§ß§Ú§ñ §ß§Ñ §Ó§í§Ù§à§Ó §Þ§Ö§ä§à§Õ§Ñ §Þ§à§Ø§ß§à §à§ä§à§Ù§Ó§Ñ§ä§î §Ó §ß§Ñ§ã§ä§â§à§Û§Ü§Ñ§ç §â§à§Ý§Ö§Û §á§à§Ý§î§Ù§à§Ó§Ñ§ä§Ö§Ý§ñ. §¥§à§á§à§Ý§ß§Ú§ä§Ö§Ý§î§ß§å§ð §Ú§ß§æ§à§â§Þ§Ñ§è§Ú§ð §ã§Þ. §Ó §â§Ñ§Ù§Õ§Ö§Ý§Ö §²§à§Ý§Ú §á§à§Ý§î§Ù§à§Ó§Ñ§ä§Ö§Ý§Ö§Û.

Parameters

(object/array) Scheduled reports to create.

Additionally to the standard scheduled report properties, the method accepts the following parameters.

Parameter Type Description
users object/array of objects Users to send the report to.
user_groups object/array of objects User groups to send the report to.

Return values

(object) Returns an object containing the IDs of the created scheduled reports under the reportids property. The order of the returned IDs matches the order of the passed scheduled reports.

§±§â§Ú§Þ§Ö§â§í

Creating a scheduled report

Create a weekly report that will be prepared for the previous week every Monday-Friday at 12:00 from 2021-04-01 to 2021-08-31.

Request:

{
           "jsonrpc": "2.0",
           "method": "report.create",
           "params": {
               "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",
               "users": [
                   {
                       "userid": "1",
                       "access_userid": "1",
                       "exclude": "0"
                   },
                   {
                       "userid": "2",
                       "access_userid": "0",
                       "exclude": "1"
                   }
               ],
               "user_groups": [
                   {
                       "usrgrpid": "7",
                       "access_userid": "0"
                   }
               ]
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "reportids": [
                   "1"
               ]
           },
           "id": 1
       }

§³§Þ§à§ä§â§Ú§ä§Ö §ä§Ñ§Ü§Ø§Ö

§ª§ã§ä§à§é§ß§Ú§Ü

CReport::create() §Ó ui/include/classes/api/services/CReport.php.