public interface AttachmentVersioningResources
This interface provides methods to access AttachmentVersioning resources.
Thread Safety: Implementation of this interface must be thread safe.
| Modifier and Type | Method and Description |
|---|---|
Attachment |
attachNewVersion(long sheetId,
long attachmentId,
File file,
String contentType)
Attach a new version of an attachment.
|
void |
deleteAllVersions(long sheetId,
long attachentId)
Deletes an attachment, including all of its versions.
|
PagedResult<Attachment> |
listAllVersions(long sheetId,
long attachmentId,
PaginationParameters parameters)
Get all versions of an attachment.
|
void deleteAllVersions(long sheetId,
long attachentId)
throws SmartsheetException
Deletes an attachment, including all of its versions.
It mirrors to the following Smartsheet REST API method:
DELETE /sheets/{sheetId}/attachments/{attachmentId}/versions
sheetId - the sheet idattachentId - the attachment idIllegalArgumentException - 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<Attachment> listAllVersions(long sheetId, long attachmentId, PaginationParameters parameters) throws SmartsheetException
Get all versions of an attachment.
It mirrors to the following Smartsheet REST API method:
GET /sheets/{sheetId}/attachments/{attachmentId}/versions
sheetId - the idattachmentId - the attachment idparameters - the pagination paramatersIllegalArgumentException - 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 operationAttachment attachNewVersion(long sheetId, long attachmentId, File file, String contentType) throws FileNotFoundException, SmartsheetException
Attach a new version of an attachment.
It mirrors to the following Smartsheet REST API method:
POST /attachment/{id}/versions
sheetId - the id of the sheetattachmentId - the id of the attachment to upload a new version.file - the file to attachcontentType - the content type of the fileFileNotFoundException - the file not found exceptionIllegalArgumentException - 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 operationCopyright © 2014–2017 Smartsheet. All rights reserved.