Interface ReportResources
- Namespace
- Smartsheet.Api
- Assembly
- smartsheet-csharp-sdk.dll
This interface provides methods to access Report resources.
Thread Safety: Implementation of this interface must be thread safe.
public interface ReportResources
Methods
AddReportColumns(long, IEnumerable<ReportColumn>)
Add columns to a report specified by a report ID. Note: all indexes of the columns must be equal.
It mirrors to the following Smartsheet REST API method: POST /reports/{reportId}/columns
IList<ReportColumn> AddReportColumns(long reportId, IEnumerable<ReportColumn> reportColumns)
Parameters
reportIdlongthe reportId
reportColumnsIEnumerable<ReportColumn>list of report columns to be added (minItems: 1, maxItems: 400)
Returns
- IList<ReportColumn>
list of report columns that were added
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- ArgumentException
if reportColumns list is empty or exceeds 400 items
- SmartsheetException
if there is any other error during the operation
AddReportColumnsAsync(long, IEnumerable<ReportColumn>, CancellationToken)
Asynchronously add columns to a report specified by a report ID. Note: all indexes of the columns must be equal.
It mirrors to the following Smartsheet REST API method: POST /reports/{reportId}/columns
Task<IList<ReportColumn>> AddReportColumnsAsync(long reportId, IEnumerable<ReportColumn> reportColumns, CancellationToken cancellationToken = default)
Parameters
reportIdlongthe reportId
reportColumnsIEnumerable<ReportColumn>list of report columns to be added (minItems: 1, maxItems: 400)
cancellationTokenCancellationTokenthe cancellation token
Returns
- Task<IList<ReportColumn>>
list of report columns that were added
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- ArgumentException
if reportColumns list is empty or exceeds 400 items
- SmartsheetException
if there is any other error during the operation
AddReportScope(long, IEnumerable<ReportScopeInclusion>)
Adds one or more specified sheet or workspace to the report scope.
void AddReportScope(long reportId, IEnumerable<ReportScopeInclusion> scopes)
Parameters
reportIdlongthe reportId
scopesIEnumerable<ReportScopeInclusion>an array of one or more objects denoting the sheets or workspaces associated with the report
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- ArgumentException
if scopes are empty
- SmartsheetException
if there is any other error during the operation
AddReportScopeAsync(long, IEnumerable<ReportScopeInclusion>, CancellationToken)
Asynchronously adds one or more specified sheet or workspace to the report scope.
Task AddReportScopeAsync(long reportId, IEnumerable<ReportScopeInclusion> scopes, CancellationToken cancellationToken = default)
Parameters
reportIdlongthe reportId
scopesIEnumerable<ReportScopeInclusion>an array of one or more objects denoting the sheets or workspaces associated with the report
cancellationTokenCancellationTokenthe cancellation token
Returns
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- ArgumentException
if scopes are empty
- SmartsheetException
if there is any other error during the operation
CreateReport(CreateReportRequest)
Create a new report by specifying name, destination, scope, columns and definition.
It mirrors to the following Smartsheet REST API method: POST /reports
CreateReportResult CreateReport(CreateReportRequest request)
Parameters
requestCreateReportRequestthe create report request containing name, destination, scope, columns, and optional definition
Returns
- CreateReportResult
the created report result containing id, name, accessLevel, and permalink
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
CreateReportAsync(CreateReportRequest, CancellationToken)
Asynchronously create a new report by specifying name, destination, scope, columns and definition.
It mirrors to the following Smartsheet REST API method: POST /reports
Task<CreateReportResult> CreateReportAsync(CreateReportRequest request, CancellationToken cancellationToken = default)
Parameters
requestCreateReportRequestthe create report request containing name, destination, scope, columns, and optional definition
cancellationTokenCancellationTokenthe cancellation token
Returns
- Task<CreateReportResult>
the created report result containing id, name, accessLevel, and permalink
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
DeleteReport(long)
Deletes a report.
Mirrors the following Smartsheet REST API method: DELETE /reports/{reportId}
void DeleteReport(long reportId)
Parameters
reportIdlongthe report Id
Exceptions
- InvalidOperationException
if any argument is null or an empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
DeleteReportAsync(long, CancellationToken)
Asynchronously deletes a report.
Mirrors the following Smartsheet REST API method: DELETE /reports/{reportId}
Task DeleteReportAsync(long reportId, CancellationToken cancellationToken = default)
Parameters
reportIdlongthe report Id
cancellationTokenCancellationTokenthe cancellation token
Returns
Exceptions
- InvalidOperationException
if any argument is null or an empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
DeleteReportColumn(long, long)
Deletes the specified column from the report.
It mirrors to the following Smartsheet REST API method: DELETE /reports/{reportId}/columns/{columnVirtualId}
void DeleteReportColumn(long reportId, long columnVirtualId)
Parameters
DeleteReportColumnAsync(long, long, CancellationToken)
Async version of DeleteReportColumn(long, long).
Task DeleteReportColumnAsync(long reportId, long columnVirtualId, CancellationToken cancellationToken = default)
Parameters
reportIdlongcolumnVirtualIdlongcancellationTokenCancellationToken
Returns
GetPublishStatus(long)
Get the publish status of a report.
It mirrors to the following Smartsheet REST API method: GET /reports/{id}/publish
ReportPublish GetPublishStatus(long reportId)
Parameters
reportIdlongthe reportId
Returns
- ReportPublish
The report publish status (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
GetPublishStatusAsync(long, CancellationToken)
Asynchronously get the publish status of a report.
It mirrors to the following Smartsheet REST API method: GET /reports/{id}/publish
Task<ReportPublish> GetPublishStatusAsync(long reportId, CancellationToken cancellationToken = default)
Parameters
reportIdlongthe reportId
cancellationTokenCancellationTokenthe cancellation token
Returns
- Task<ReportPublish>
The report publish status (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
GetReport(long, IEnumerable<ReportInclusion>?, int?, int?)
Gets the Report, including one page of Rows, and optionally populated with Discussions, Attachments, and source Sheets.
It mirrors to the following Smartsheet REST API method: GET /reports/{reportId}
Report GetReport(long reportId, IEnumerable<ReportInclusion>? include = null, int? pageSize = null, int? page = null)
Parameters
reportIdlongthe Id of the report
includeIEnumerable<ReportInclusion>used to specify the optional objects to include.
pageSizeint?(optional): Number of rows per page. If not specified, the default value is 100. This operation can return a maximum of 500 rows per page.
pageint?(optional): Which page number (1-based) to return. If not specified, the default value is 1. If a page number is specified that is greater than the number of total pages, the last page will be returned.
Returns
- Report
the report resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
Remarks
This method returns the top 100 rows. To get more or less rows please use the other overloaded versions of this method
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
GetReport(long, IEnumerable<ReportInclusion>?, int?, int?, int?)
Gets the Report, including one page of Rows, and optionally populated with Discussions, Attachments, and source Sheets.
It mirrors to the following Smartsheet REST API method: GET /reports/{reportId}
Report GetReport(long reportId, IEnumerable<ReportInclusion>? include = null, int? pageSize = null, int? page = null, int? level = null)
Parameters
reportIdlongthe Id of the report
includeIEnumerable<ReportInclusion>used to specify the optional objects to include.
pageSizeint?(optional): Number of rows per page. If not specified, the default value is 100. This operation can return a maximum of 500 rows per page.
pageint?(optional): Which page number (1-based) to return. If not specified, the default value is 1. If a page number is specified that is greater than the number of total pages, the last page will be returned.
levelint?(optional): compatiblity level
Returns
- Report
the report resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
Remarks
This method returns the top 100 rows. To get more or less rows please use the other overloaded versions of this method
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
GetReportAsCSV(long, BinaryWriter)
Get a report as a CSV file.
It mirrors to the following Smartsheet REST API method:
GET /reports/{reportId} with "text/csv" Accept HTTP header
void GetReportAsCSV(long reportId, BinaryWriter outputStream)
Parameters
reportIdlongthe Id of the report
outputStreamBinaryWriterthe output stream to which the Excel file will be written.
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
GetReportAsExcel(long, BinaryWriter)
Gets the Report in the format specified, based on the Report ID.
It mirrors to the following Smartsheet REST API method:
GET /reports/{reportId} with "application/vnd.ms-excel" Accept HTTP header
void GetReportAsExcel(long reportId, BinaryWriter outputStream)
Parameters
reportIdlongthe Id of the report
outputStreamBinaryWriterthe output stream to which the Excel file will be written.
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
GetReportAsync(long, IEnumerable<ReportInclusion>?, int?, int?, int?, CancellationToken)
Asynchronously gets the Report, including one page of Rows, and optionally populated with Discussions, Attachments, and source Sheets.
It mirrors to the following Smartsheet REST API method: GET /reports/{reportId}
Task<Report> GetReportAsync(long reportId, IEnumerable<ReportInclusion>? include = null, int? pageSize = null, int? page = null, int? level = null, CancellationToken cancellationToken = default)
Parameters
reportIdlongthe Id of the report
includeIEnumerable<ReportInclusion>used to specify the optional objects to include.
pageSizeint?(optional): Number of rows per page. If not specified, the default value is 100. This operation can return a maximum of 500 rows per page.
pageint?(optional): Which page number (1-based) to return. If not specified, the default value is 1. If a page number is specified that is greater than the number of total pages, the last page will be returned.
levelint?(optional): compatiblity level
cancellationTokenCancellationTokenthe cancellation token
Returns
- Task<Report>
the report resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
Remarks
This method returns the top 100 rows. To get more or less rows please use the other overloaded versions of this method
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
GetReportAsync(long, IEnumerable<ReportInclusion>?, int?, int?, CancellationToken)
Asynchronously gets the Report, including one page of Rows, and optionally populated with Discussions, Attachments, and source Sheets.
It mirrors to the following Smartsheet REST API method: GET /reports/{reportId}
Task<Report> GetReportAsync(long reportId, IEnumerable<ReportInclusion>? include = null, int? pageSize = null, int? page = null, CancellationToken cancellationToken = default)
Parameters
reportIdlongthe Id of the report
includeIEnumerable<ReportInclusion>used to specify the optional objects to include.
pageSizeint?(optional): Number of rows per page. If not specified, the default value is 100. This operation can return a maximum of 500 rows per page.
pageint?(optional): Which page number (1-based) to return. If not specified, the default value is 1. If a page number is specified that is greater than the number of total pages, the last page will be returned.
cancellationTokenCancellationTokenthe cancellation token
Returns
- Task<Report>
the report resource (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
Remarks
This method returns the top 100 rows. To get more or less rows please use the other overloaded versions of this method
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
GetReportColumn(long, long, int?)
Gets the specified column in the report.
It mirrors to the following Smartsheet REST API method: GET /reports/{reportId}/columns/{columnVirtualId}
ReportColumn GetReportColumn(long reportId, long columnVirtualId, int? level = null)
Parameters
Returns
GetReportColumnAsync(long, long, int?, CancellationToken)
Async version of GetReportColumn(long, long, int?).
Task<ReportColumn> GetReportColumnAsync(long reportId, long columnVirtualId, int? level = null, CancellationToken cancellationToken = default)
Parameters
reportIdlongcolumnVirtualIdlonglevelint?cancellationTokenCancellationToken
Returns
GetReportDefinition(long)
Gets the definition (filters, grouping, summarizing, and sorting criteria) for the specified report.
It mirrors to the following Smartsheet REST API method: GET /reports/{reportId}/definition
ReportDefinition GetReportDefinition(long reportId)
Parameters
reportIdlong
Returns
GetReportDefinitionAsync(long, CancellationToken)
Async version of GetReportDefinition(long).
Task<ReportDefinition> GetReportDefinitionAsync(long reportId, CancellationToken cancellationToken = default)
Parameters
reportIdlongcancellationTokenCancellationToken
Returns
GetReportPath(long)
Gets the path (workspace/folder hierarchy) of the specified report.
It mirrors to the following Smartsheet REST API method: GET /reports/{reportId}/path
ReportPathNode GetReportPath(long reportId)
Parameters
reportIdlongthe report Id
Returns
- ReportPathNode
a ReportPathNode representing the workspace root, with nested folders down to the target report
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
GetReportPathAsync(long, CancellationToken)
Gets the path (workspace/folder hierarchy) of the specified report asynchronously.
It mirrors to the following Smartsheet REST API method: GET /reports/{reportId}/path
Task<ReportPathNode> GetReportPathAsync(long reportId, CancellationToken cancellationToken = default)
Parameters
reportIdlongthe report Id
cancellationTokenCancellationTokenthe cancellation token
Returns
- Task<ReportPathNode>
a ReportPathNode representing the workspace root, with nested folders down to the target report
GetReportScope(long, TokenPaginationParameters?)
Lists the scope (source sheets and workspaces) for the specified report.
It mirrors to the following Smartsheet REST API method: GET /reports/{reportId}/scope
TokenPaginatedResult<ReportScopeInclusion> GetReportScope(long reportId, TokenPaginationParameters? tokenPaginationParameters = null)
Parameters
reportIdlongtokenPaginationParametersTokenPaginationParameters
Returns
GetReportScopeAsync(long, TokenPaginationParameters?, CancellationToken)
Async version of GetReportScope(long, TokenPaginationParameters?).
Task<TokenPaginatedResult<ReportScopeInclusion>> GetReportScopeAsync(long reportId, TokenPaginationParameters? tokenPaginationParameters = null, CancellationToken cancellationToken = default)
Parameters
reportIdlongtokenPaginationParametersTokenPaginationParameterscancellationTokenCancellationToken
Returns
ListReportColumns(long, TokenPaginationParameters?, int?)
Lists the columns for the specified report.
It mirrors to the following Smartsheet REST API method: GET /reports/{reportId}/columns
TokenPaginatedResult<ReportColumn> ListReportColumns(long reportId, TokenPaginationParameters? tokenPaginationParameters = null, int? level = null)
Parameters
reportIdlongtokenPaginationParametersTokenPaginationParameterslevelint?
Returns
ListReportColumnsAsync(long, TokenPaginationParameters?, int?, CancellationToken)
Async version of ListReportColumns(long, TokenPaginationParameters?, int?).
Task<TokenPaginatedResult<ReportColumn>> ListReportColumnsAsync(long reportId, TokenPaginationParameters? tokenPaginationParameters = null, int? level = null, CancellationToken cancellationToken = default)
Parameters
reportIdlongtokenPaginationParametersTokenPaginationParameterslevelint?cancellationTokenCancellationToken
Returns
ListReports(PaginationParameters?, DateTime?)
Gets the list of all Reports that the User has access to, in alphabetical order, by name.
It mirrors to the following Smartsheet REST API method: GET /reports
PaginatedResult<Report> ListReports(PaginationParameters? paging = null, DateTime? modifiedSince = null)
Parameters
pagingPaginationParametersthe pagination
modifiedSinceDateTime?restrict results to reports modified on or after the specified date
Returns
- PaginatedResult<Report>
A list of Report objects limited to the following attributes:
<ul><li>id</li><li>name</li><li>accessLevel</li><li>permalink</li></ul>
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
ListReportsAsync(PaginationParameters?, DateTime?, CancellationToken)
Asynchronously gets the list of all Reports that the User has access to, in alphabetical order, by name.
It mirrors to the following Smartsheet REST API method: GET /reports
Task<PaginatedResult<Report>> ListReportsAsync(PaginationParameters? paging = null, DateTime? modifiedSince = null, CancellationToken cancellationToken = default)
Parameters
pagingPaginationParametersthe pagination
modifiedSinceDateTime?restrict results to reports modified on or after the specified date
cancellationTokenCancellationTokenthe cancellation token
Returns
- Task<PaginatedResult<Report>>
A list of Report objects limited to the following attributes:
<ul><li>id</li><li>name</li><li>accessLevel</li><li>permalink</li></ul>
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
RemoveReportScope(long, IEnumerable<ReportScopeInclusion>)
Removes one or more specified sheet or workspace from the report scope.
void RemoveReportScope(long reportId, IEnumerable<ReportScopeInclusion> scopes)
Parameters
reportIdlongthe reportId
scopesIEnumerable<ReportScopeInclusion>an array of one or more objects denoting the sheets or workspaces associated with the report
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- ArgumentException
if scopes are empty
- SmartsheetException
if there is any other error during the operation
RemoveReportScopeAsync(long, IEnumerable<ReportScopeInclusion>, CancellationToken)
Asynchronously removes one or more specified sheet or workspace from the report scope.
Task RemoveReportScopeAsync(long reportId, IEnumerable<ReportScopeInclusion> scopes, CancellationToken cancellationToken = default)
Parameters
reportIdlongthe reportId
scopesIEnumerable<ReportScopeInclusion>an array of one or more objects denoting the sheets or workspaces associated with the report
cancellationTokenCancellationTokenthe cancellation token
Returns
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- ArgumentException
if scopes are empty
- SmartsheetException
if there is any other error during the operation
SendReport(long, SheetEmail)
Send a report as a PDF attachment via Email to the designated recipients.
It mirrors to the following Smartsheet REST API method: POST /reports/{reportId}/emails
void SendReport(long reportId, SheetEmail email)
Parameters
reportIdlongthe reportId
emailSheetEmailthe Email
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
SendReportAsync(long, SheetEmail, CancellationToken)
Asynchronously send a report as a PDF attachment via Email to the designated recipients.
It mirrors to the following Smartsheet REST API method: POST /reports/{reportId}/emails
Task SendReportAsync(long reportId, SheetEmail email, CancellationToken cancellationToken = default)
Parameters
reportIdlongthe reportId
emailSheetEmailthe Email
cancellationTokenCancellationTokenthe cancellation token
Returns
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
UpdatePublishStatus(long, ReportPublish)
Sets the publish status of a report and returns the new status, including the URLs of any enabled publishing.
It mirrors to the following Smartsheet REST API method: PUT /reports/{id}/publish
ReportPublish UpdatePublishStatus(long reportId, ReportPublish reportPublish)
Parameters
reportIdlongthe reportId
reportPublishReportPublishthe ReportPublish object
Returns
- ReportPublish
The report publish status (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
UpdatePublishStatusAsync(long, ReportPublish, CancellationToken)
Asynchronously sets the publish status of a report and returns the new status, including the URLs of any enabled publishing.
It mirrors to the following Smartsheet REST API method: PUT /reports/{id}/publish
Task<ReportPublish> UpdatePublishStatusAsync(long reportId, ReportPublish reportPublish, CancellationToken cancellationToken = default)
Parameters
reportIdlongthe reportId
reportPublishReportPublishthe ReportPublish object
cancellationTokenCancellationTokenthe cancellation token
Returns
- Task<ReportPublish>
The report publish status (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).
Exceptions
- InvalidOperationException
if any argument is null or empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
UpdateReportColumn(long, long, UpdateReportColumnRequest)
Updates the specified column in the report.
It mirrors to the following Smartsheet REST API method: PUT /reports/{reportId}/columns/{columnVirtualId}
ReportColumn UpdateReportColumn(long reportId, long columnVirtualId, UpdateReportColumnRequest request)
Parameters
reportIdlongcolumnVirtualIdlongrequestUpdateReportColumnRequest
Returns
UpdateReportColumnAsync(long, long, UpdateReportColumnRequest, CancellationToken)
Async version of UpdateReportColumn(long, long, UpdateReportColumnRequest).
Task<ReportColumn> UpdateReportColumnAsync(long reportId, long columnVirtualId, UpdateReportColumnRequest request, CancellationToken cancellationToken = default)
Parameters
reportIdlongcolumnVirtualIdlongrequestUpdateReportColumnRequestcancellationTokenCancellationToken
Returns
UpdateReportDefinition(long, ReportDefinition)
Update a Report's definition based on the specified ID
Note:
This endpoint supports partial updates only on root level properties of the report definition, such as filters, groupingCriteria and summarizingCriteria. For example, you can update the report's filters without affecting its grouping criteria. However, nested properties within these objects, such as a specific filter or grouping criterion, cannot be updated individually and require a full replacement of the respective section.
It mirrors to the following Smartsheet REST API method: PUT /reports/{reportId}/definition
void UpdateReportDefinition(long reportId, ReportDefinition reportDefinition)
Parameters
reportIdlongthe reportId
reportDefinitionReportDefinitionthe ReportDefinition object
UpdateReportDefinitionAsync(long, ReportDefinition, CancellationToken)
Asynchronously update a Report's definition based on the specified ID
Note:
This endpoint supports partial updates only on root level properties of the report definition, such as filters, groupingCriteria and summarizingCriteria. For example, you can update the report's filters without affecting its grouping criteria. However, nested properties within these objects, such as a specific filter or grouping criterion, cannot be updated individually and require a full replacement of the respective section.
It mirrors to the following Smartsheet REST API method: PUT /reports/{reportId}/definition
Task UpdateReportDefinitionAsync(long reportId, ReportDefinition reportDefinition, CancellationToken cancellationToken = default)
Parameters
reportIdlongthe reportId
reportDefinitionReportDefinitionthe ReportDefinition object
cancellationTokenCancellationTokenthe cancellation token