Interface SheetRowResources
- Namespace
- Smartsheet.Api
- Assembly
- smartsheet-csharp-sdk.dll
This interface provides methods to access row resources that are associated to a sheet object.
Thread Safety: Implementation of this interface must be thread safe.
public interface SheetRowResources
Properties
AttachmentResources
Returns the RowAttachmentResources object that provides access to attachment resources associated with Row Resources.
RowAttachmentResources AttachmentResources { get; }
Property Value
- RowAttachmentResources
the RowAttachmentResources
CellResources
Returns the RowColumnResources object that provides access to column resources associated with Row Resources (Cell Resources).
RowColumnResources CellResources { get; }
Property Value
- RowColumnResources
the RowColumnResources
DiscussionResources
Returns the RowDiscussionResources object that provides access to discussion resources associated with Row Resources.
RowDiscussionResources DiscussionResources { get; }
Property Value
- RowDiscussionResources
the RowDiscussionResources
Methods
AddRows(long, IEnumerable<Row>)
Inserts one or more rows into the Sheet specified in the URL.
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows
IList<Row> AddRows(long sheetId, IEnumerable<Row> rows)
Parameters
sheetId
longthe sheet Id
rows
IEnumerable<Row>one or more rows
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
AddRowsAllowPartialSuccess(long, IEnumerable<Row>)
Inserts one or more rows into the Sheet specified in the URL with allowPartialSuccess.
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows?allowPartialSuccess=true
BulkItemRowResult AddRowsAllowPartialSuccess(long sheetId, IEnumerable<Row> rows)
Parameters
sheetId
longthe sheet Id
rows
IEnumerable<Row>one or more rows
Returns
- BulkItemRowResult
the list of created Rows
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
CopyRowsToAnotherSheet(long, CopyOrMoveRowDirective, IEnumerable<CopyRowInclusion>?, bool?)
Copies Row(s) from the Sheet specified in the URL to (the bottom of) another sheet.
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/copy
CopyOrMoveRowResult CopyRowsToAnotherSheet(long sheetId, CopyOrMoveRowDirective directive, IEnumerable<CopyRowInclusion>? include = null, bool? ignoreRowsNotFound = null)
Parameters
sheetId
longthe sheet Id to copy from
directive
CopyOrMoveRowDirectivedirective
include
IEnumerable<CopyRowInclusion>objects to include
ignoreRowsNotFound
bool?default is false. If set to true, specifying row Ids that do not exist within the source sheet will not cause an error response. If omitted or set to false, specifying row Ids that do not exist within the source sheet will cause an error response (and no rows will be copied).
Returns
- CopyOrMoveRowResult
CopyOrMoveRowResult object
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
DeleteRows(long, IEnumerable<long>, bool?)
Deletes the Row specified in the URL.
It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/rows/{rowId}
IList<long> DeleteRows(long sheetId, IEnumerable<long> ids, bool? ignoreRowsNotFound = null)
Parameters
sheetId
longthe sheetId
ids
IEnumerable<long>the row IDs
ignoreRowsNotFound
bool?If set to true, specifying row Ids that do not exist within the source sheet will not cause an error response. If omitted or set to false, specifying row Ids that do not exist within the source sheet will cause an error response (and no rows will be copied).
Returns
- IList<long>
Row IDs corresponding to all rows that were successfully deleted (including any child rows of rows specified in the URL).
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
GetRow(long, long, IEnumerable<RowInclusion>?, IEnumerable<RowExclusion>?)
Gets the Row specified in the URL.
It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/rows/{rowId}
Row GetRow(long sheetId, long rowId, IEnumerable<RowInclusion>? include = null, IEnumerable<RowExclusion>? exclude = null)
Parameters
sheetId
longthe sheetId
rowId
longthe rowId
include
IEnumerable<RowInclusion>comma-separated list of elements to include in the response.
exclude
IEnumerable<RowExclusion>a comma-separated list of optional objects to exclude in the response.
Returns
- Row
the row object
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
MoveRowsToAnotherSheet(long, CopyOrMoveRowDirective, IEnumerable<MoveRowInclusion>?, bool?)
Moves Row(s) from the Sheet specified in the URL to (the bottom of) another sheet.
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/copy
Up to 5,000 row IDs can be specified in the request, but if the total number of rows in the destination sheet after the copy exceeds the Smartsheet row limit, an error response will be returned.
Any child rows of the rows specified in the request will also be moved. Parent-child relationships amongst rows will be preserved within the destination sheet.
CopyOrMoveRowResult MoveRowsToAnotherSheet(long sheetId, CopyOrMoveRowDirective directive, IEnumerable<MoveRowInclusion>? include = null, bool? ignoreRowsNotFound = null)
Parameters
sheetId
longthe sheet Id to move from
directive
CopyOrMoveRowDirectivedirective
include
IEnumerable<MoveRowInclusion>the elements to include
ignoreRowsNotFound
bool?default is false. If set to true, specifying row Ids that do not exist within the source sheet will not cause an error response. If omitted or set to false, specifying row Ids that do not exist within the source sheet will cause an error response (and no rows will be copied).
Returns
- CopyOrMoveRowResult
CopyOrMoveRowResult object
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
SendRows(long, MultiRowEmail)
Sends one or more Rows via email.
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/rows/emails
void SendRows(long sheetId, MultiRowEmail email)
Parameters
sheetId
longThe sheet Id
email
MultiRowEmailThe email. The columns included for each row in the email will be populated according to the following rules:
- If the columnIds attribute of the MultiRowEmail object is specified as an array of column IDs, those specific columns will be included.
- If the columnIds attribute of the MultiRowEmail object is omitted, all columns except hidden columns shall be included.
- If the columnIds attribute of the MultiRowEmail object is specified as empty, no columns shall be included. (Note: In this case, either includeAttachments:true or includeDiscussions:true must be specified.)
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
UpdateRows(long, IEnumerable<Row>)
Updates cell values in the specified row(s), expands/collapses the specified row(s), and/or modifies the position of specified rows (including indenting/outdenting).
It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/rows
IList<Row> UpdateRows(long sheetId, IEnumerable<Row> rows)
Parameters
sheetId
longthe sheetId
rows
IEnumerable<Row>the list of rows to update
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
UpdateRowsAllowPartialSuccess(long, IEnumerable<Row>)
Updates cell values in the specified row(s), expands/collapses the specified row(s), and/or modifies the position of specified rows (including indenting/outdenting).
It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/rows?allowPartialSuccess=true
BulkItemRowResult UpdateRowsAllowPartialSuccess(long sheetId, IEnumerable<Row> rows)
Parameters
sheetId
longthe sheetId
rows
IEnumerable<Row>the list of rows to update
Returns
- BulkItemRowResult
the row object
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