email.report.find
The email.report.find command is used to locate a single email report record.
Requires Org-Admin rights.
TR50 Request
{
"cmd": {
"command": "email.report.find",
"params": {
"id": "500000000000000000000001"
}
}
}
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. |
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
"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":9,
"sections":[
{
"type":"thing.lastseen"
},
{
"type":"lwm2m.device.battery"
}
]
}
}
}
}
Response Parameters
Name | Type | Description |
---|---|---|
id | String | The UUID of the email report |
name | String | The name of the email report. |
key | String | A unique identifier string for the 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 are scheduled. |
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. |
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. |