Views:

Last Updated: 7/4/2021 12:28:27 PM

Use GET /SMPI​/service​/report​/api​/files with template ID to list the template files that generated from specified template.

limit = 100
page = 1
method = "GET"
request_uri = "/SMPI/service/report/api/files?tid=%s" % template_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 "Generated Reports: %s" % res_data

If successful, the reponded data will be like:

{ "files": [ { "from": 1450779761, "target": "test_customer", "format": "pdf", "generated": 1450866162, "fid": "567a75f14d89597975ebc86b", "endby": 1450866161, "size": 64930 } ], "paging": { "total": 1, "limit": 100, "page": 1 }}