Api/Reports/listReports lists all available reports.
Requirements
API user must have access to report module and to individual reports.
Syntax
Api/Reports/listReports
There are no additional parameters.
Response
Inside <response/>
node, there is list of <node> elements, what have following subitems:
id
: unique text, what is used for other reportstitle
: report name in language, what is set in API user preferencesstates
: if this report has user defined report, this element is visible and contains<node/>
list of user-defined reports, having following subitems:id
:stateId
value forgetReport
title
: name of custom report
Example
Command:
app.ecofleet.com/seeme/Api/Reports/listReports?key=apidemo-NJ8V7PENgkau5FYH
XML response:
<?xml version="1.0" encoding="utf-8" ?>
<nodes>
<status>0</status>
<response>
<node key="0">
<id>NewDayReport</id>
<title>Day report</title>
</node>
<node key="1">
<id>NewPeriodReport</id>
<title>Period report</title>
</node>
<node key="2">
<id>booking</id>
<title>Booking report</title>
</node>
</response>
</nodes> JSON response:
{
"status":0,
"response":[{
"id":"NewDayReport",
"title":"Day report"
},{
"id":"NewPeriodReport",
"title":"Period report"
},{
"id":"booking",
"title":"Booking report"
}]
}
User-defined reports
SeeMe supports custom reports. If such custom reports are available for user, they are listed in subitems. Here is one example, how it looks like:
XML:
<?xml version="1.0" encoding="utf-8" ?>
<nodes>
<status>0</status>
<response>
<NewDayReport>
<id>NewDayReport</id>
<title>Day report</title>
<states>
<node key="0">
<id>9651</id>
<title>Personal</title>
</node>
</states>
</NewDayReport>
<NewPeriodReport>
<id>NewPeriodReport</id>
<title>Period report</title>
</NewPeriodReport>
<booking>
<id>booking</id>
<title>Booking report</title>
</booking>
</response>
</nodes>
JSON:
{
"status":0,
"response":{
"NewDayReport":{
"id":"NewDayReport",
"title":"Day report",
"states":[{
"id":9651,
"title":"Personal"
}]
},
"NewPeriodReport":{
"id":"NewPeriodReport",
"title":"Period report"
},
"booking":{
"id":"booking",
"title":"Booking report"
}
}
}
Here, id
under state list is what you use for parameter stateId
in getReport
.
Troubleshooting
Here are solutions for some problems.
- Error message "no permission": there is no reports module assigned to API user. Please add it via roles. If your organisation does not have reports module, ask it via sales manager or technical support.
- empty response: there are no reports module shared out to API user via roles.
- your report is not listed: share out that particular report to API user via roles. If some report is still not available, it may be not enabled for your organisation. Please contact your sales representative or customer support.