public interface RowAttachmentResources
This interface provides methods to access RowAttachment resources.
Thread Safety: Implementation of this interface must be thread safe.
| Modifier and Type | Method and Description |
|---|---|
Attachment |
attachFile(long sheetId,
long rowId,
File file,
String contentType)
Attach a file to a row with simple upload.
|
Attachment |
attachUrl(long sheetId,
long rowId,
Attachment attachment)
Attach a URL to a comment.
|
PagedResult<Attachment> |
getAttachments(long sheetId,
long rowId,
PaginationParameters parameters)
Get row attachment.
|
Attachment attachUrl(long sheetId, long rowId, Attachment attachment) throws SmartsheetException
Attach a URL to a comment.
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}/rows/{rowId}/attachments
sheetId - the sheet idrowId - the row 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 operationPagedResult<Attachment> getAttachments(long sheetId, long rowId, PaginationParameters parameters) throws SmartsheetException
sheetId - the sheet idrowId - the row idparameters - the pagination parametersSmartsheetException - the smartsheet exceptionAttachment attachFile(long sheetId, long rowId, File file, String contentType) throws FileNotFoundException, SmartsheetException
Attach a file to a row with simple upload.
It mirrors to the following Smartsheet REST API method:
POST /sheets/{sheetId}/rows/{rowId}/attachments
sheetId - the id of the sheetrowId - the id of the commentfile - 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.