Click or drag to resize

ShareResourcesShareTo Method

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

Namespace:  Smartsheet.Api
Assemblies:   smartsheet-csharp-sdk (in smartsheet-csharp-sdk.dll) Version: 2.126.0
  smartsheet-csharp-sdk (in smartsheet-csharp-sdk.dll) Version: 2.126.0
Syntax
IList<Share> ShareTo(
	long objectId,
	IEnumerable<Share> shares,
	Nullable<bool> sendEmail
)

Parameters

objectId
Type: SystemInt64
the Id of the object, (report, sheet, or workspace)
shares
Type: System.Collections.GenericIEnumerableShare
the share objects
sendEmail
Type: SystemNullableBoolean
(optional): Either true or false to indicate whether or not to notify the user by email. Default is false.

Return Value

Type: IListShare
the created share
Exceptions
ExceptionCondition
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
See Also