Table of Contents

Interface WorkspaceResources

Namespace
Smartsheet.Api
Assembly
smartsheet-csharp-sdk.dll

This interface provides methods to access Workspace resources.

Thread Safety: Implementation of this interface must be thread safe.

public interface WorkspaceResources

Properties

FolderResources

Return the WorkspaceFolderResources object that provides access to Folder resources associated with Workspace resources.

WorkspaceFolderResources FolderResources { get; }

Property Value

WorkspaceFolderResources

the workspace folder resources

ShareResources

Return the ShareResources object that provides access to Share resources associated with Workspace resources.

ShareResources ShareResources { get; }

Property Value

ShareResources

the share resources object

SheetResources

Return the WorkspaceFolderResources object that provides access to Folder resources associated with Workspace resources.

WorkspaceSheetResources SheetResources { get; }

Property Value

WorkspaceSheetResources

the workspace folder resources

Methods

CopyWorkspace(long, ContainerDestination, IEnumerable<WorkspaceCopyInclusion>?, IEnumerable<WorkspaceRemapExclusion>?)

Creates a copy of the specified Workspace.

It mirrors to the following Smartsheet REST API method:
POST /workspaces/{workspaceId}/copy

Workspace CopyWorkspace(long workspaceId, ContainerDestination destination, IEnumerable<WorkspaceCopyInclusion>? include = null, IEnumerable<WorkspaceRemapExclusion>? skipRemap = null)

Parameters

workspaceId long

the workspace Id

destination ContainerDestination

the destination to copy to

include IEnumerable<WorkspaceCopyInclusion>

the elements to copy. Note: Cell history will not be copied, regardless of which include parameter values are specified.

skipRemap IEnumerable<WorkspaceRemapExclusion>

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

Workspace

the created workspace

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

CreateWorkspace(Workspace)

Create a workspace.

It mirrors to the following Smartsheet REST API method: POST /Workspaces

Workspace CreateWorkspace(Workspace workspace)

Parameters

workspace Workspace

the workspace to create

Returns

Workspace

the created workspace

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

DeleteWorkspace(long)

Deletes the specified Workspace (and its contents).

It mirrors to the following Smartsheet REST API method: DELETE /workspaces{workspaceId}

void DeleteWorkspace(long workspaceId)

Parameters

workspaceId long

the Id of the workspace

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

GetWorkspace(long, bool?, IEnumerable<WorkspaceInclusion>?)

Gets the specified Workspace (and lists its contents).

It mirrors to the following Smartsheet REST API method: GET /workspaces/{workspaceid}

By default, this operation only returns the top-level items in the Workspace. To load all of the contents, including nested Folders, include the loadAll query string parameter with a value of true.

If no Folders, Sheets, Reports, or Templates are present in the Workspace, the corresponding attribute (e.g., "folders", "sheets") will not be present in the response object.

Workspace GetWorkspace(long workspaceid, bool? loadAll = null, IEnumerable<WorkspaceInclusion>? include = null)

Parameters

workspaceid long

the workspace id

loadAll bool?

Defaults to false. If true, loads all of the contents, including nested Folders.

include IEnumerable<WorkspaceInclusion>

When specified with a value of "source", response will include the source for any sheet that was created from another sheet or template

Returns

Workspace

the workspace (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

ListWorkspaces(PaginationParameters?)

List all Workspaces.

It mirrors to the following Smartsheet REST API method: GET /Workspaces

This operation supports pagination of results. For more information, see Paging.
PaginatedResult<Workspace> ListWorkspaces(PaginationParameters? paging = null)

Parameters

paging PaginationParameters

Returns

PaginatedResult<Workspace>

the list of Workspaces (note that an empty list will be returned if there are none)

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

UpdateWorkspace(Workspace)

Update a workspace.

It mirrors to the following Smartsheet REST API method: PUT /workspaces/{workspaceId}

Workspace UpdateWorkspace(Workspace workspace)

Parameters

workspace Workspace

the workspace to update

Returns

Workspace

the updated workspace (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