email.report.list

The email.report.list command is used to list email reports.

Requires Org-Admin rights.

TR50 Request

{
  "cmd": {
    "command": "email.report.list",
    "params": {
         "offset": 0,
	  "limit":  10,
	  "sort":   "name"
    }
  }
}

Request Parameters

Name Type Required Description
offset Integer   The starting list offset, used for pagination. Defaults to 0 if not specified.
limit Integer   Limits the number of results returned. The maximum you can set is 2000. Defaults to 2000.
sort String   sort is an optional parameter that defines the sort order of the result set. It allows to arrange the list in either ascending(+) or descending(-) order. It is possible to sort email.report.list in any of the following categories: name, desc, subject, to, and key

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":{  
	"count": 5,
	"result": [
	{

	   "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
count Integer The total number of email reports.
result Array The array of email report objects. For more information, see the Response Parameters of email.report.find