Report Details

Request information about a report, including the parameters the report requires to be executed.

Only available to hosted SaaS clients

HTTP Request

GET /icweb.dll/report/{key}

URI Parameters

Name In Required Type Description Default
key Path Yes Integer Key associated with report.  

Responses

Name Type Description
200 OK Report OK
404 Not Found String Dashboard identified by key was not found.

Report

Contains the information associated with a report.

Name Type Description Optional
name string Name of the report No
parameters Parameter [] List of parameters that the report requires. No

Parameter

Specifies a parameter for a report, a report may have 0 or more parameters, these parameters contain information on allowing the user to select or enter an appropriate value.

Name Type Description Optional Default
parameterName string Name of the parameter. No  
displayName string Display caption used when displaying the parameter to the user for them to enter/select a value. No  
order integer Display order of the parameter. No  
columns integer The number of display columns that this column consumes, report parameters should be displayed in a 2 column form. No 1
blankText string Text that can be used, in a greyed-out embedded in the control for the parameter. Yes  
fieldType Integer Field Type of the parameter, determines what data can be entered by the user. No  
editorType Integer Editor that should be used for the parameter. No  
foreignTable Integer If this is a foreign key, then this specifies the table that should be used to provide a selection dialog. Yes  
multiSelect Boolean Does this parameter allow multiple values to be selected. No No

Example

Retrieve the name and parameters for the report identified by the key of 3

Request

GET /icweb.dll/report/3

Response

{
        "name": "Test Report",
        "parameters": [{
                        "parameterName": "Component_ID",
                        "displayName": "Asset",
                        "order": 0,
                        "columns": 1,
                        "fieldType": 3,
                        "editorType": 13,
                        "foreignTable": "Component",
                        "multiSelect": true
                }, {
                        "parameterName": "Workpack_ID",
                        "displayName": "Workpack",
                        "order": 0,
                        "columns": 1,
                        "fieldType": 3,
                        "editorType": 13,
                        "foreignTable": "Workpack",
                }
        ]
}

Report

Submit a job to generate a report template.

Only available to hosted SaaS clients

HTTP Request

POST /icweb.dll/report/

URI Parameters

Name In Required Type Description Default
reportTemplate Body Yes Integer Key associated with report.  
outputType Body No String Format that the report should be generated in, json, html, xlsx, rtf are accepted types. json
recipients Body No String List of comma separated email address to send the report to, if omitted then the report isn’t emailed and is available for download.  
embedHtml Body No Boolean If outputType is ‘html’ and recipients contains a valid email address, then this determines whether the html report is sent as the body of the email (true) or as an attachment (false). False
subject Body No String Subject used in the email generated if the report is sent to recipients.  

Responses

Name Type Description
200 OK serverJob Report job created, response contains information on the job.
400 Validation Error Configuration provided for report is invalid, further information on what part was invalid is provided.
404 Not found The specified reportTemplate was not found.

Example

Ask the server to generate the report identified by the key of 3, using the values of the passed parameters

Request

POST /icweb.dll/report
{
        "reportTemplate": 3,
        "outputType": "html"
        "parameters": [{
                        "parameterName": "Component_ID",
                        "value": [4, 3]
                }, {
                        "parameterName": "Workpack_ID",
                        "value": 35
                }
        ]
}

Response

{
        "id": "{7945AE0D-BB7D-4D7C-AF68-175C74CF02D5}",
        "percentComplete": 0
}