Reporting Services API Reference
This section provides detailed documentation for the various APIs available for interacting with SQL Server Reporting Services. Explore the classes, methods, and properties to programmatically manage and deploy your reports.
Web Service API
The Reporting Services Web Service API provides a SOAP-based interface for managing Reporting Services. It allows you to perform operations such as creating, deleting, modifying, and retrieving report items, managing security, and configuring the report server.
ReportService2010
The primary SOAP endpoint for Report Server management operations. This version introduces significant enhancements for managing modern report deployments.
CreateReport(Name As String, ParentFolder As String, OverwriteSafety As OverwriteStateType, Contents As Byte(), Properties As Property()) As String()
Creates a new report on the report server.
Name
: The name of the report.
ParentFolder
: The path to the parent folder where the report will be created.
OverwriteSafety
: Specifies how to handle existing items with the same name.
Contents
: The XML definition of the report.
Properties
: Optional properties to associate with the report.
DeleteItem(ItemPath As String)
Deletes a specified item from the report server.
ItemPath
: The full path to the item to be deleted.
ReportingService
An older version of the Web Service API, primarily for backward compatibility. Prefer ReportService2010 for new development.
ListChildren(Item As String, Recursive As Boolean) As CatalogItem[]
Retrieves a list of items within a specified folder.
Report Server Management Object (RSManagement Object Model)
The RSManagement Object Model provides a .NET Framework interface for interacting with Reporting Services. It offers a more object-oriented approach compared to the Web Service API.
Microsoft.ReportingServices.Management
This namespace contains classes for managing the report server.
ReportServerManagement.CreateFolder(Name As String, ParentPath As String)
Creates a new folder on the report server.
ReportServerManagement.UploadReport(ReportName As String, ReportDefinition As Byte(), FolderPath As String)
Uploads a report definition to the specified folder.
REST API (for newer versions)
For newer versions of SQL Server Reporting Services, a RESTful API is available, offering a modern and lightweight way to interact with the report server. This API uses standard HTTP methods and JSON for data exchange.
GET /reports
Retrieves a list of all reports available on the report server.
GET https://your-report-server/reports/api/v2.0/reports
Response: JSON array of report objects.
POST /reports
Creates a new report on the report server.
POST https://your-report-server/reports/api/v2.0/reports
Content-Type: application/json
{
"Name": "MyNewReport",
"ParentFolder": "/Reports/Sales",
"Definition": "..." // Base64 encoded RDL content
}
Response: 201 Created with report details.
Common Tasks and Examples
- Managing Report Folders
- Deploying Reports
- Setting Security Permissions
- Executing Reports Programmatically
For specific details on data types, error handling, and advanced scenarios, please refer to the dedicated sections within the Reporting Services SDK.