<style>
table th:first-of-type {
	width: 10%;
}
table th:nth-of-type(2) {
	width: 90%;
}
</style>

# restReportService Element Overview

The `restReportService` element specifies the configuration settings for the Reporting REST Service. For this element to be respected, the corresponding Reports service implementation should pass a [ConfigSectionReportServiceConfiguration](https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.services.configsectionreportserviceconfiguration) instance instead of a [ReportServiceConfiguration](https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.services.reportserviceconfiguration) instance.

For example, initializing the [ReportServiceConfiguration](https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.services.webapi.reportscontrollerbase#Telerik_Reporting_Services_WebApi_ReportsControllerBase_ReportServiceConfiguration) for the [ReportsControllerBase](https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.services.webapi.reportscontrollerbase) instance would look like this:

```C#
configurationInstance = new ConfigSectionReportServiceConfiguration
{
    HostAppId = "Html5DemoApp",
    ReportSourceResolver = new UriReportSourceResolver("PATH_TO_REPORTS_FOLDER")
      .AddFallbackResolver(new TypeReportSourceResolver())
};
```

```VB.NET
configurationInstance = New ConfigSectionReportServiceConfiguration With {
    .HostAppId = "Html5DemoApp",
    .ReportSourceResolver = New UriReportSourceResolver("PATH_TO_REPORTS_FOLDER") _
        .AddFallbackResolver(New TypeReportSourceResolver())
}
```

> note The initialization block does not have the [Storage](https://www.telerik.com/products/reporting/documentation/api/telerik.reporting.services.ireportserviceconfiguration#Telerik_Reporting_Services_IReportServiceConfiguration_Storage) property set, because it would override the values obtained from the configuration file.

## Attributes and Elements

**`<restReportService>` element**

| Category       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Attributes     | <ul><li>**hostAppId** – optional string attribute. Specifies a unique constant name among the applications hosting a reports service and reusing the same storage destination. The ID is used as a prefix when composing the storage keys to avoid data overlap between apps. When not set, the report service utilizes the [AppDomainSetup.ApplicationName property](https://learn.microsoft.com/en-us/dotnet/api/system.appdomainsetup.applicationname?view=netframework-4.8#System_AppDomainSetup_ApplicationName) of the current application domain. In some cases, this default value might not be unique enough.</li><li>**workerCount** – optional integer attribute. Specifies the count of the worker threads that render report documents. The default value is equal to the logical processors available on the server machine.</li><li>**clientSessionTimeout** – optional integer attribute. Specifies the value in minutes indicating how long a client session will be preserved in the service storage after the last interaction from this client. The value must be greater than zero. The default value is 15 minutes.</li><li>**reportSharingTimeout** – optional integer attribute. Specifies the value in minutes indicating how long a rendered report document will be viable for reuse for all clients. The value must be greater than or equal to zero. A zero value will prevent rendered report document reuse by other clients. The client that has rendered the report originally will still reuse it. The default value is zero.</li><li>**exceptionsVerbosity** – optional string attribute. Specifies the verbosity level of the exception information returned in the response when an exception occurs during report rendering. The supported values are *normal* and *detailed*. When set to *normal*, the response will contain only the exception message. When set to *detailed*, the response will contain the exception type and stack trace. The default value is *normal*.</li></ul> |
| Child elements | <ul><li>**reportResolver** – specifies the report source resolver implementation that will be used for report resolving from the service.</li><li>**storage** – specifies the storage implementation that will be used for internal storage from the report service.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Parent element | **Telerik.Reporting** – specifies the root element of the Telerik Reporting configuration settings. Only a single restReportService child element can be used inside the Telerik.Reporting root element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

**`<reportResolver>` element**

| Category       | Description                                                                                                                                                                                                                                              |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Attributes     | <ul><li>**provider**<ul><li>**file**<ul><li>**directory** - string parameter. Specifies the physical directory where reports are located. Used as path prefix when relative path is passed for resolving.</li></ul></li><li>**type**</li></ul></li></ul> |
| Child elements | **parameters** – specifies a collection of parameters for the current provider. Only one **parameters** child element can be used in the **provider** parent element.                                                                                    |
| Parent element | **restReportService**                                                                                                                                                                                                                                    |

**`<storage>` element**

| Category       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Attributes     | <ul><li>**provider**<ul><li>**redis**<ul><li>**configuration** - string parameter. The [Redis configuration string](https://stackexchange.github.io/StackExchange.Redis/Configuration). </li><li>**databaseNumber** - optional integer parameter. Determines the number of the database that should be used.</li></ul></li><li>**msSqlServer**<ul><li>**connectionString** - string parameter. The connection string to the backend storage.</li><li>**commandTimeout** - optional integer parameter. Determines the CommandTimeout that will be used when executing database commands, in seconds. The default value is 30.</li></ul></li><li>**file**<ul><li>**directory** - optional string parameter. The directory which will contain the files representing the stored values.</li></ul></li><li>**database**<ul><li>**backendName** - string parameter. Specifies which database engine should be used.</li><li>**connectionString** - string parameter. A connection string that should be used to connect to the cache database.</li></ul></li></ul></li></ul> |
| Child elements | **parameters** – specifies a collection of parameters for the current provider. Only one **parameters** child element can be used in the **provider** parent element.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Parent element | **restReportService**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

## Examples

```XML
<configuration>
	<configSections>
		<section name="Telerik.Reporting"
		         type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting"
		         allowLocation="true"
		         allowDefinition="Everywhere"/>
	</configSections>
	<Telerik.Reporting>
		<restReportService hostAppId="Application1"
		                   workerCount="4"
		                   reportSharingTimeout="10"
		                   clientSessionTimeout="10"
		                   exceptionsVerbosity="detailed">
			<reportResolver provider="type"/>
			<storage provider="file">
				<parameters>
					<parameter name="directory"
					           value="C:\Temp\RestServiceStorage"/>
				</parameters>
			</storage>
			
			
		</restReportService>
	</Telerik.Reporting>
</configuration>
```

```JSON
"telerikReporting": {
    "restReportService": {
        "hostAppId": "Application1",
        "workerCount": 4,
        "reportSharingTimeout": 10,
        "clientSessionTimeout": 10,
        "exceptionsVerbosity": "detailed",
        "reportResolver": {
            "provider": "type"
        },
        "storage": {
            "provider": "file",
            "parameters": [
                {
                    "name": "directory",
                    "value": "c:\\temp"
                }
            ]
        }
    }
}
```

## See Also

* [How to implement the ReportsController in an application](https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/asp.net-web-api-implementation/how-to-implement-the-reportscontroller-in-an-application)
* [How to Add Telerik Reporting REST ServiceStack to Web Application](https://www.telerik.com/products/reporting/documentation/embedding-reports/host-the-report-engine-remotely/servicestack-implementation/add-rest-servicestack-to-web-application)
