public interface SheetAttachmentResources
| Modifier and Type | Method and Description |
|---|---|
Attachment |
attachFile(long sheetId,
File file,
String contentType)
Attach a file to a sheet with simple upload.
|
Attachment |
attachFile(long sheetId,
InputStream inputStream,
String contentType,
long contentLength,
String attachmentName)
Attach file for simple upload.
|
Attachment |
attachUrl(long sheetId,
Attachment attachment)
Attach a URL to a sheet.
|
void |
deleteAttachment(long sheetId,
long attachmentId)
Delete an attachment.
|
Attachment |
getAttachment(long sheetId,
long attachmentId)
Get an attachment.
|
PagedResult<Attachment> |
listAttachments(long sheetId,
PaginationParameters parameters)
Gets a list of all Attachments that are on the Sheet, including Sheet, Row, and Discussion level Attachments.
|
AttachmentVersioningResources |
versioningResources()
Creates an object of AttachmentVersioningResources for access to versioning through SheetAttachmentResources.
|
Attachment attachUrl(long sheetId, Attachment attachment) throws SmartsheetException
Attach a URL to a sheet.
The URL can be a normal URL (attachmentType "URL"), a Google Drive URL (attachmentType "GOOGLE_DRIVE") or a Box.com URL (attachmentType "BOX_COM").
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/attachments
sheetId - the sheet idattachment - the attachment objectIllegalArgumentException - 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 deleteAttachment(long sheetId,
long attachmentId)
throws SmartsheetException
Delete an attachment.
It mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/attachments/{attachmentId}
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 operationsheetId - the ID of the sheetattachmentId - the ID of the attachmentSmartsheetException - the smartsheet exceptionAttachment getAttachment(long sheetId, long attachmentId) throws SmartsheetException
Get an attachment.
It mirrors to the following Smartsheet REST API method: GET /attachment/{id}
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 operationsheetId - the sheet idattachmentId - the attachment idSmartsheetException - the smartsheet exceptionPagedResult<Attachment> listAttachments(long sheetId, PaginationParameters parameters) throws SmartsheetException
Gets a list of all Attachments that are on the Sheet, including Sheet, Row, and Discussion level Attachments.
It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/attachments
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 operationsheetId - the ID of the sheet to which the attachments are associatedparameters - the pagination parametersSmartsheetException - the smartsheet exceptionAttachment attachFile(long sheetId, File file, String contentType) throws FileNotFoundException, SmartsheetException
Attach a file to a sheet with simple upload.
It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/attachments
sheetId - the id of the sheetfile - 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 operationAttachment attachFile(long sheetId, InputStream inputStream, String contentType, long contentLength, String attachmentName) throws SmartsheetException
Attach file for simple upload.
sheetId - the sheet idinputStream - attachment data inputStreamcontentType - the content typecontentLength - the content lengthattachmentName - the name of the attachmentSmartsheetException - the smartsheet exceptionAttachmentVersioningResources versioningResources() throws SmartsheetException
Creates an object of AttachmentVersioningResources for access to versioning through SheetAttachmentResources.
SmartsheetException - if there is any other error during the operationCopyright © 2014–2019 Smartsheet. All rights reserved.