1

Get all report with template IDs

Тема: Get all report with template IDs

Hello Team,

we are developing one custom SDK in which we need all report data API where i can have all list of reports.
we want also report creator id (means from which user, report is created) because while calling svc=report/exec_report this api it requires reportResourceId.

And also we want all report template id in that response.

Please let us know in which API we should call to get response as above.
Also please explain parameters we need to pass in that API and from where we can get those details.

2

Get all report with template IDs

Re: Get all report with template IDs

Hello!

1. reportResourceId is id of resource where reports created.
If you know resource name (sometimes it can be the same as username / sometimes other) you can search resource by it's name (or you can apply name mask as * to get all available resource) and within flags 8192 (report templates) + 1 (base flag) = 8193, the response will contain resource id and reports template.
(report's name, report's id)

For example,

https://hst-api.wialon.com/wialon/ajax.html?svc=core/search_items&params={"spec":{"itemsType":"avl_resource","propName":"sys_name","propValueMask":"*Diana","sortType":"sys_name"},"force":1,"flags":8193,"from":0,"to":200}}],"flags":0}&sid=02b93b7a37e3ce1510908253b4db8902

Response

{"searchSpec":{"itemsType":"avl_resource","propName":"sys_name","propValueMask":"*diana","sortType":"sys_name","propType":"","or_logic":"0"},"dataFlags":8193,"totalItemsCount":1,"indexFrom":0,"indexTo":0,"items":[{"nm":"us_diana","cls":3,"id":21116577,"mu":1,"rep":{"1":{"id":1,"n":"Us report","ct":"avl_unit","c":8513},"2":{"id":2,"n":"CI report","ct":"avl_unit","c":44770}},"repmax":-1,"uacl":-1}]}

"nm":"us_diana" - resource name
"id":21116577 - resource id (reportResourceId)

"rep" - reports collection
"n" - report name,  "id" - report template ID ("reportTemplateId")
"ct" - template type (unit report, group report, driver report and etc)

Diana Cheley
Wialon Hosting Expert
Gurtam