Table of Contents

Interface ShareResources

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

This interface provides methods to access Share resources.

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

[Obsolete("This interface is deprecated. Please use AssetSharingResources instead.")]
public interface ShareResources

Methods

DeleteShare(long, string)

Delete a share.

It mirrors to the following Smartsheet REST API method:
DELETE /workspaces/{workspaceId}/shares/{shareId}
DELETE /sheets/{sheetId}/shares/{shareId}
DELETE /reports/{reportId}/shares/{shareId}

[Obsolete("This method is deprecated. Use AssetSharingResources.DeleteAssetShare instead.")]
void DeleteShare(long objectId, string shareId)

Parameters

objectId long
shareId string

Remarks

Deprecated: Use AssetSharingResources.DeleteAssetShare instead with the appropriate AssetType.

GetShare(long, string)

Get a Share.

It mirrors to the following Smartsheet REST API method:
GET /workspaces/{workspaceId}/shares/{shareId}
GET /sheets/{sheetId}/shares/{shareId}
GET /reports/{reportId}/shares/{shareId}

[Obsolete("This method is deprecated. Use AssetSharingResources.GetAssetShare instead.")]
Share GetShare(long objectId, string shareId)

Parameters

objectId long

the ID of the object to share

shareId string

the ID of the share instance

Returns

Share

the share (note that if there is no such resource, this method will throw ResourceNotFoundException rather than returning null).

Remarks

Deprecated: Use AssetSharingResources.GetAssetShare instead with the appropriate AssetType.

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

ListShares(long, PaginationParameters?, ShareScope?)

List shares of a given object.

It mirrors to the following Smartsheet REST API method:
GET /workspaces/{workspaceId}/shares
GET /sheets/{sheetId}/shares
GET /reports/{reportId}/shares

[Obsolete("This method is deprecated. Use AssetSharingResources.ListAssetShares instead.")]
PaginatedResult<Share> ListShares(long objectId, PaginationParameters? paging = null, ShareScope? shareScope = null)

Parameters

objectId long

the object Id

paging PaginationParameters

the pagination request

shareScope ShareScope?

when specified with a value of Workspace, the response will contain both item-level shares (scope=‘ITEM’) and workspace-level shares (scope='WORKSPACE’).

Returns

PaginatedResult<Share>

the list of Share objects (note that an empty list will be returned if there is none).

Remarks

Deprecated: Use AssetSharingResources.ListAssetShares instead with the appropriate AssetType.

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

ShareTo(long, IEnumerable<Share>, bool?)

Shares a Sheet with the specified Users and Groups.

It mirrors to the following Smartsheet REST API method:
POST /workspaces/{workspaceId}/shares
POST /sheets/{sheetId}/shares
POST /reports/{reportId}/shares

[Obsolete("This method is deprecated. Use AssetSharingResources.ShareAsset instead.")]
IList<Share> ShareTo(long objectId, IEnumerable<Share> shares, bool? sendEmail = null)

Parameters

objectId long
shares IEnumerable<Share>
sendEmail bool?

Returns

IList<Share>

Remarks

Deprecated: Use AssetSharingResources.ShareAsset instead with the appropriate AssetType.

UpdateShare(long, Share)

Updates the access level of a User or Group for the specified Object.

It mirrors to the following Smartsheet REST API method:
PUT /workspaces/{workspaceId}/shares/{shareId}
PUT /sheets/{sheetId}/shares/{shareId}
PUT /reports/{reportId}/shares/{shareId}

[Obsolete("This method is deprecated. Use AssetSharingResources.UpdateAssetShare instead.")]
Share UpdateShare(long objectId, Share share)

Parameters

objectId long
share Share

Returns

Share

Remarks

Deprecated: Use AssetSharingResources.UpdateAssetShare instead with the appropriate AssetType.