Get list of reports available to user
You can return a list of reports that the user has access to execute using the following example GET:
<ACCESS_URL>/api/v1/Reports
Get parameters for a report
You can get the report parameters that must be supplied when executing a report using the following example GET:
<ACCESS_URL>/api/v1/Reports('6YA007A-SPF')/ReportParameters
Execute a report
You can execute a report, and download the results using the returned file URL, using the following example POST:
<ACCESS_URL>/api/v1/Reports('6YA007A-SPF')/Intergraph.SPF.Server.API.Model.ExecuteReport
For this example the payload would be:
{"Parameters": [{"Id": "6YA009A-SPF", "Values": [{"Value": "*", "Operator": "0", "Join": "0"}]}]}
Specifying report format
The CSV Supported parameter controls the format of the report returned by the execute report function:
-
True - the report returns as a CSV format file. This is the default.
-
False - the report returns as an XLSX format file.
The following is an example GET:
<ACCESS_URL>/api/v1/Reports/Intergraph.SPF.Server.API.Model.ExecuteReport
CSV file
To return the file in CSV format, the payload would be for example:
{ "Parameters": [{ "Id": "1NQ00FA-SPF", "Values": [{"Value":"*","Operator":"0","Join":"0"} ]}] ,"CSVSupported":"true"}
XLSX file
To return the file in XLSX format, the payload would be for example:
{ "Parameters": [{ "Id": "1NQ00FA-SPF", "Values": [{"Value":"*","Operator":"0","Join":"0"} ]}] ,"CSVSupported":"false"}