Last Updated: 7/4/2021 12:23:11 PM
You can list the report templates of your customer by using GET /SMPI/service/report/api/templates_by_cid.
limit = 100 page = 1 method = "GET" request_uri = "/SMPI/service/report/api/templates_by_cid?cid=%s" % company_id res_status, res_data = cspi_conn.send_request(method, request_uri) print "Response data (page %s): \n%s" % (page, res_data) res_data = json.loads(res_data) print "Report templates: %s" % res_data
If successful, the responded report template will be like:
{ "files": 2, "status": 2, "name": "monthly report template", "lastupdate": 1449065829, "frequency": "onetime", "tid": "565e9f28e0967d569fe0a3db", "type": "customer", "targets": 1, "{cid}": { "name": "test company 1", "subject": "Monthly report 2020-09-01", "logo": false, "mailenable": false, "mailto": [ "test@trendmicro.com" ], "recipients": [ "test@trendmicro.com" ]}