Interface FolderResources
- Namespace
- Smartsheet.Api
- Assembly
- smartsheet-csharp-sdk.dll
This interface provides methods to access Folder resources.
Thread Safety: Implementation of this interface must be thread safe.
public interface FolderResources
Properties
SheetResources
Return the SheetResources object that provides access to Sheet resources associated with Folder resources.
FolderSheetResources SheetResources { get; }
Property Value
- FolderSheetResources
the SheetResources object
Methods
CopyFolder(long, ContainerDestination, IEnumerable<FolderCopyInclusion>?, IEnumerable<FolderRemapExclusion>?)
Creates a copy of the specified Folder.
It mirrors to the following Smartsheet REST API method:
POST /folders/{folderId}/copy
Folder CopyFolder(long folderId, ContainerDestination destination, IEnumerable<FolderCopyInclusion>? include, IEnumerable<FolderRemapExclusion>? skipRemap)
Parameters
folderId
longthe folder Id
destination
ContainerDestinationthe destination to copy to
include
IEnumerable<FolderCopyInclusion>the elements to copy. Note: Cell history will not be copied, regardless of which include parameter values are specified.
skipRemap
IEnumerable<FolderRemapExclusion>the references to NOT re-map for the newly created folder
If "cellLinks" is specified in the skipRemap parameter value, the cell links within the newly created folder will continue to point to the original source sheets. If "reports" is specified in the skipRemap parameter value, the reports within the newly created folder will continue to point to the original source sheets.
Returns
- Folder
the created folder
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
CreateFolder(long, Folder)
Creates a Folder in the specified Folder.
It mirrors to the following Smartsheet REST API method:
POST /folders/{folderId}/folders
Folder CreateFolder(long folderId, Folder folder)
Parameters
Returns
- Folder
the created folder
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
DeleteFolder(long)
Deletes a folder.
It mirrors to the following Smartsheet REST API method:
DELETE /folders/{folderId}
void DeleteFolder(long folderId)
Parameters
folderId
longthe folder Id
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
GetFolder(long, IEnumerable<FolderInclusion>?)
Gets the specified Folder (and lists its contents).
It mirrors to the following Smartsheet REST API method: GET /folders/{folderId}
Folder GetFolder(long folderId, IEnumerable<FolderInclusion>? include = null)
Parameters
folderId
longthe folder Id
include
IEnumerable<FolderInclusion>(optional) – comma-separated list of elements to include in the respons
Returns
- Folder
the folder (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
ListFolders(long, PaginationParameters?)
Gets a list of the top-level child Folders within the specified Folder.
It mirrors to the following Smartsheet REST API method:
GET /folders/{folderId}/folders
PaginatedResult<Folder> ListFolders(long folderId, PaginationParameters? paging = null)
Parameters
folderId
longthe folderId
paging
PaginationParametersthe pagination information
Returns
- PaginatedResult<Folder>
the child Folders (note that an empty list will be returned if no child folder is found), limited to the following attributes:
- id
- name
- 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
MoveFolder(long, ContainerDestination)
Moves the specified Folder to another location.
It mirrors to the following Smartsheet REST API method:
POST /folders/{folderId}/move
Folder MoveFolder(long folderId, ContainerDestination destination)
Parameters
folderId
longthe folder Id
destination
ContainerDestinationthe destination to copy to
Returns
- Folder
the moved folder
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
UpdateFolder(Folder)
Updates a folder.
It mirrors to the following Smartsheet REST API method: PUT /folders/{folderId}
Folder UpdateFolder(Folder folder)
Parameters
folder
Folderthe folder to update
Returns
- Folder
the updated folder (note that if there is no such folder, this method will throw Resource Not Found Exception 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