ComponentOne Studio Web API Edition
Instance

Report services provide GET, POST, UPDATE, and DELETE methods to work with report instances. Report instances help you to create a new report instance, get information of the report instance and render the report instance. Your client application sends an HTTP request to the service application for using the report instances API to get the information for a particular report instance.

[POST] Create a new instance

To create a new report instance from the specified report, you need to use POST method. Report folder path and report name are specified in the request URL, as follows:

POST: http://<host>[:port]/api/report/{folder path}/{report name}/$instances

Example URL
Copy Code
http://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report/ReportsRoot
/FlexCommonTasks/FlexCommonTasks.flxr/Simple List/$instances

Parameters

Parameter Description
Folder Path Specify the full path of the executing report.
For example: FlexCommonTasks.flxr/Simple List
Report Name Specify the report name that is defined in the FlexReport file, or under the SSRS folder.
Report Parameters Check the response of action parameters. For example: pCategory=1&...

If the parameter is multi-value, set the parameters multiple times. For example: pCategory=1&pCustomers=3&...
Report Page Settings Set the page settings. Example: paperSize=custom&height=10in&width=20.5cm

Response Messages

HTTP Status Code Reason
201 JSON string contains IReportInstanceInfo type object, for the new created instance.
404 The report path does not exist.

Back to Top

[GET] Get report information

To get information of a report instance with the specified instance id, you need to use GET method. Report full path and Instance id are specified in the request URL, as follows:

GET: http://<host>[:port]/api/report/{folder path}/{report name}/$instances/{instance id}

Example URL
Copy Code
http://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report/ReportsRoot
/FlexCommonTasks/FlexCommonTasks.flxr/Simple List/$instances

Parameters

Parameter Description
Report Full Path Specify the full path of the executing report.
For example: FlexCommonTasks.flxr/Simple List
Instance Id Specify the instance id of the executing report.

Response Messages

HTTP Status Code Reason
200 JSON string contains IReportInstanceInfo type object.
404 The report path or instance id does not exist.

Back to Top

[POST] Render a report

To render a report instance with the specified instance id, you need to use POST method. Report full path and instance id are specified in the request URL, as follows:

POST: http://<host>[:port]/api/report/{folder path}/{report name}/$instances/{instance id}/render

Example URL
Copy Code
http://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report/ReportsRoot/FlexCommonTasks
/FlexCommonTasks.flxr/Simple List$instances/21c2fa46-0a75-4708-acf2-454668eac4cb/render

Parameters

Parameter Description
Report Full Path Specify the full path of the executing report.
For example: FlexCommonTasks.flxr/MultiValue DataBound Parameters
Instance Id Specify the instance id of the executing report.
Report Parameters Check the response of action parameters. For example: parameters.pCategory=1
If the parameter is multi-value, set the parameters multiple times. For example: pCategory=1&pCustomers=3&...
Report Page Settings Set the page settings. For example: pageSettings.paperSize=custom&pageSettings.height=10in&pageSettings.width=20.5cm
Action String Specify the action string. Action string is only valid for SSRS reports. We recommend you to use AdventureWorks (SSRS)/Product Line Sales report. For example: actionString=Sort;33iT0;Ascending

Response Messages

HTTP Status Code Reason
200 (Render completed) JSON string contains IReportStatus type object.
202 (On Rendering) The render action is accepted.
404 The report path or instance id does not exist.

Back to Top

[GET] Get status of a report

To get the status of the report instance with the specified instance id, you need to use GET method. Report full path and instance id are specified in the request URL, as follows:

GET: http://<host>[:port]/api/report/{folder path}/{report name}$instances/{instance id}/status

Example URL
Copy Code
http://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report/ReportsRoot/FlexCommonTasks
/FlexCommonTasks.flxr/MultiValue DataBound Parameters$instances/20f8e7c7-ea84-4961-81f7-5b8ff662f588/status

Parameters

Parameter Description
Report Full Path Specify the full path of the executing report.
For example: FlexCommonTasks.flxr/Simple List
Instance Id Specify the instance id of the executing report.

Response Messages

HTTP Status Code Reason
200 JSON string contains IReportStatus type object.
404 The report path or instance id does not exist.

Back to Top

[DELETE] Delete an instance

To delete the instance, you need to use DELETE method. Report full path and instance id are specified in the request URL, as follows:

DELETE: http://<host>[:port]/api/report/{folder path}/{report name}/$instances/{instance id}

Example URL
Copy Code
http://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report/ReportsRoot/FlexCommonTasks
/FlexCommonTasks.flxr/Simple List$instances/21c2fa46-0a75-4708-acf2-454668eac4cb

Parameters

Parameter Description
Report Full Path Specify the full path of the executing report.
For example: FlexCommonTasks.flxr/Simple List
Instance Id Specify the instance id of the executing report.

Response Messages

HTTP Status Code Reason
204 Successfully deleted the instance.
404 The report path or instance id does not exist.

Back to Top

For more information about Report Instances. see WebApiExplorer Demo.

 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback