email.report.update

The email.report.update command is used to modify the specifications of an email report record.

Requires Org-Admin rights.

TR50 Request

{  
   "1":{  
	"command":"email.report.update",
	"params":{  
	  "id": "500000000000000000000001",
	   "name":"My email report",
	   "key":"myemailreport",
	   "subject":"The email subject line for my report",
	   "to":[  
		"myemailaddress@example.com",
		"report@example.com"
	    ],
	   "interval":"day",
	   "hour":13,
	   "sections":[  
	      {  
		"type":"thing.lastseen"
	      },
	      {  
		"type":"lwm2m.device.battery"
	      }
	    ]
	   }
	}
   }

}

Request Parameters

Name Type Required Description
id String Yes* The id of the email report.
key String Yes* The key of the email report.
* Either id or key must be specified. The id parameter takes precedence.
name String   The name of the email report.
desc String   A textual description of the report.
subject String   The subject line of the email containing the report.
to Array   An array of email addresses and notification groups to send the report to.
fromName String   The name given to the sender of the email.
started Boolean   A boolean value indicating if the reports should be scheduled. Defaults to false.
interval String   A string (either 'day' or 'hour') specifying if the report should be sent daily or hourly
hour Integer   When interval is set to 'day', hour is an integer between 0 and 23 defining the hour (UTC) during which the report should be run and sent. Defaults to 0 (midnight UTC).
style String   A CSS formatted string to define the style applied to the report. If no style is specified, the following style will be used:

{font-family: arial;}
table {table-layout: auto;width: 80%;} th, td {padding: 10px;text-align: center;} th {background-color: #DEDAFE;} tr:nth-child(even)
{background-color: #f2f2f2;}

header String   A string containing the text to be displayed above the report table.
footer String   A string containing the text to be displayed above the report table.
sections Array   An array defining the types of reports (and the parameters) to be sent in the email. Some types are: 'lwm2m.device.battery', 'lwm2m.conn.rssi', and 'thing.lastseen'. The possible types (and the parameters) are returned by the email.report.sections command.
unset Array   An array of fields to be unset. Possible fields are: desc, started, fromName, style, header, and footer.

TR50 Response

If the command is sent successfully a success message is returned. Success is returned even for a partial success. Otherwise, an error and error message will be returned.

{
  "1": {
    "success": true,
  }
}