How to Use the API
To use the SRS API, you need to have a valid token. See authentication and execute the following GET/POST requests.
Definition
This API returns the SRS definition.
Execute
This API executes the SRS and returns the result in the specified format.
Note
- An error in any command returns HTTP status 200 with
success=falseand the error text inmessage - An error in the
srssetupcommand returns an error message and stops the SRS (this can be used to execute business logic before the SRS runs)
Parameters
When executing a request, parameters can be passed via query string, JSON body, or both.
Note
- If a name is duplicated in the query string and JSON body, the query string takes precedence.
| HTTP | |
|---|---|
Renderers
The renderer is the format in which the SRS result is returned. The following renderers are supported:
/api/srs/{SRSID}- SRS definition only; no command is executed/api/srs/{SRSID}/run- any name without an extension returns the full SRS JSON (tables,def,data); used by the UI/api/srs/{SRSID}/{name}.json- JSON object, simplified format: one property per command indata/api/srs/{SRSID}/{name}.lower.json- same as.jsonwith lowercase property names/api/srs/{SRSID}/{name}.html- HTML tables/api/srs/{SRSID}/{name}.xlsx- Excel workbook, one worksheet per command plus anExport Summarysheet with parameters/api/srs/{SRSID}/{name}.txt- all cell values written one after another, without separators; useful when a command returns ready text/api/srs/{SRSID}/{name}.epp- same as.txt/api/srs/{SRSID}/{name}.md- Markdown tables/api/srs/{SRSID}/{name}.xml- XML document without a template: root element = SRSlabel, one element per row named after the command, one child element per column; see XML export/api/srs/{SRSID}/{template}.hbs[.html|.pdf|.csv|.txt|.xml|.epp|.svg|.json|.md|.css|.js]- Handlebars templatetemplates/{template}.hbs; see Handlebars/api/srs/{SRSID}/{template}.frx[.html|.pdf]- FastReport templatetemplates/{template}.frx; see FastReport
Other extensions (for example .csv, .svg, .pdf) have no built-in renderer. They require a .hbs or .frx template; without one the request returns a Missing renderer error.
The file renderers (.html, .xlsx, .md, .txt, .xml) skip:
- columns and commands with
ex="false" - commands with
opts="server" - commands that return no rows (
.html,.xlsx,.xml)
Extra query parameters
ptoken- authorization token; see authenticationpscope- comma-separated list of command names to limit execution to those commandspopts- comma-separated renderer optionslinks-.htmlrenderstlinkandtlink_framecolumns as<a>links-nav-.htmlhides the title, the parameter table and the view toggles--aioptimized- JSON renderers return a compact projection for AI/MCP clients: onlyname,label,title,typeof columns, links resolved to{name, url}, no debugger
pcolumns- comma-separated list of columns to hide in every renderer, each name prefixed with-, for examplepcolumns=-col1,-col2file_name- downloads the result as a file with this name; see File name and encoding
File name and encoding
- The default encoding for all files is UTF-8.
- To use Windows-1250 encoding, add
,1250after the file name:/api/srs/123/test.hbs.txt?file_name=test.txt,1250 - Custom file name:
/api/srs/123/test.hbs.txt?file_name=test.txt