public interface ShareResources
This interface provides methods to access Share resources.
Thread Safety: Implementation of this interface must be thread safe.
| Modifier and Type | Method and Description |
|---|---|
void |
deleteShare(long objectId,
String shareId)
Delete a share.
|
Share |
getShare(long objectId,
String shareId)
Get a Share.
|
PagedResult<Share> |
listShares(long objectId,
PaginationParameters parameters)
Deprecated.
|
PagedResult<Share> |
listShares(long objectId,
PaginationParameters parameters,
Boolean includeWorkspaceShares)
List shares of a given object.
|
List<Share> |
shareTo(long objectId,
List<Share> shares,
Boolean sendEmail)
Shares the object with the specified Users and Groups.
|
Share |
updateShare(long objectId,
Share share)
Update a share.
|
@Deprecated PagedResult<Share> listShares(long objectId, PaginationParameters parameters) throws SmartsheetException
List shares of a given object.
It mirrors to the following Smartsheet REST API method:
GET /workspace/{id}/shares
GET /sheet/{id}/shares
objectId - the object idparameters - the pagination parametersIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationPagedResult<Share> listShares(long objectId, PaginationParameters parameters, Boolean includeWorkspaceShares) throws SmartsheetException
List shares of a given object.
It mirrors to the following Smartsheet REST API method:
GET /workspace/{id}/shares
GET /sheet/{id}/shares
objectId - the object idparameters - the pagination parametersincludeWorkspaceShares - include workspace shares in enumerationIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationShare getShare(long objectId, String shareId) throws SmartsheetException
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
Exceptions: 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 can not be found ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operationobjectId - the ID of the object to shareshareId - the ID of the shareSmartsheetException - the smartsheet exceptionList<Share> shareTo(long objectId, List<Share> shares, Boolean sendEmail) throws SmartsheetException
Shares the object with the specified Users and Groups.
It mirrors to the following Smartsheet REST API method:
POST /workspaces/{id}/shares
POST /sheets/{id}/shares
POST /reports/{reportId}/shares
Exceptions: IllegalArgumentException : if multiShare is null 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 can not be found ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operationobjectId - the ID of the object to shareshares - list of share objectssendEmail - whether to send emailSmartsheetException - the smartsheet exceptionShare updateShare(long objectId, Share share) throws SmartsheetException
Update a share.
It mirrors to the following Smartsheet REST API method:
PUT /workspaces/{workspaceId}/shares/{shareId}
PUT /sheets/{sheetId}/shares/{shareId}
PUT /reports/{reportId}/shares/{shareId}
objectId - the ID of the object to shareshare - the shareIllegalArgumentException - if any argument is null or empty stringInvalidRequestException - if there is any problem with the REST API requestAuthorizationException - if there is any problem with the REST API authorization (access token)ResourceNotFoundException - if the resource cannot be foundServiceUnavailableException - if the REST API service is not available (possibly due to rate limiting)SmartsheetException - if there is any other error during the operationvoid deleteShare(long objectId,
String shareId)
throws SmartsheetException
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}
Exceptions: 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 can not be found ServiceUnavailableException : if the REST API service is not available (possibly due to rate limiting) SmartsheetRestException : if there is any other REST API related error occurred during the operation SmartsheetException : if there is any other error occurred during the operationobjectId - the ID of the object to shareshareId - the ID of the share to deleteSmartsheetException - the smartsheet exceptionCopyright © 2014–2019 Smartsheet. All rights reserved.