API reports getReportConf
Related Articles
- Reports management
- API Reports listReports
- Api Reports getReport example
- API Reports getReportConf
- API Reports getReport
- API Reports
API Reports getReportConf
API Reports getReportConf gives detailed insight about specific report. It helps to prepare for getReport command. It consist of three parts:
-
parameters- what parameters you can pass togetReportcommand -
outputType- not in use -
output- what columns are available for that report, which columns are groupable, and formatting information
Requirements
API user must have access to reports module, and that particular report, what command is asking for.
How to use
You need to know id parameter for that command. Values from it comes from listReports command.
Syntax
Api/Reports/getReportConf (id)
-
id: report identification as string. You can get available values fromlistReportscommand.
Response
If you have access to that report, response element contains following main elements.
-
id: report ID, same what you put into
idparameter - title: human-readable name of report in localized language of API user.
Parameters
This is list of <node/> elements, what list available parameters forgetReport , like period begin and end timestamp, list of objects, groupable column etc. They have following elements:
-
name - parameter name, or identificator. This is what you use in
getReportcommand -
type - shows, which kind of value this parameter should be. Some possible values:
-
integer - numbers 0-9
- array_of_int: comma-separated list of integers
- datetime, date, dateortime: parameter must contain date or time. Exact format is shown in format element
- object: rarely used
- string: any text
-
format - shows, how parameter should be formatted. It usually goes for datetime parameters. Possible values may be
Y-m-d 00:00:00,Y-m,Y-m-d H:i:setc. - allowNull - if nonzero, this parameter is not mandatory, what means, that you can skip it, if you like
- defaultValue - if this parameter is not included, this value is used instead
- displayFormat, includeNullOption - purpose not known
- allowTags, inputFormat, map, validate, value - currently not in use
outputType
Currently, there is no known application for that element.
output
This lists all columns, what are available for that report, and includes detailed formatting information.
- data - unique ID of that column. You can use that value for getReport parameters.
- title - human-readable name for that column, in localized language of API user
- type - what format data in column has.
- boolean - 0 or 1
- data - used very rarely
- date - contains date without time
- datetime - contains date and time value
- decimal - float number with digits
- float - same as decimal, but comes with format parameter, what usually shows, how many digits are after comma
- integer - numbers 0-9
- interval - time value indicating, how long some period lasted. Not same as date and time
- mixed - rarely used
- string - any text
- time - contains only time
- format - shows, how that column is formatted. Goes together with type.
- mostly for date and time types, it shows, how output is composed, like Y-m-d H:i:s
- for float type, there is number, what shows, how many digits come after comma
- default - if not selected into column list, this column is added to report default
- description - contains explanation about meaning of that column
- filterBy - there is possible to filter data using that column. Currently, no effect via API
- hide - default, this column is hidden
- showZeros - if value of that column is zero, it's not hidden, but shown as zero
- summaryType - shows, how this column is summarised. There are lots of possibilities, but there are some main choices:
- sum - just adding numbers
- max - finding largest from values
- nonNullAverage - used mostly for fuel calculations. Calculates average from only those values, what are filled
- weightedAvg - weighted arithmetic mean. This averaging method uses one other column, what is "weight" - the larger value, the more this value gives to end result.
- refuelingDifferenceAvg, fuelPer100, fuelPerHour, estFuelCost, relationBetweenSums - not covered in that manual
- unit - shows, in what units this value is
- decimalSeparator - what character is used for comma. This comes from language preferences of API user.
- align - shows, how data is aligned in report. Possible values alignL and alignR
- check - what to check for that column. This is marker for report generator
- dataOnly, orgId, sortData, sortOrder - purpose not known
- thousandSeparator - not in use
Example
Please check general example about how to use report commands together here.
Troubleshooting
You may meet following errors:
- Error 7 "no permissions": API user does not have reports module
- Error 8 "No rights for this report": API user does not have access to this report, or such report does not exist. Or id parameter is empty. Make sure that id value is listed in listReports command.