iSheets API version 2 - iSheet module - API - iSheet module - Add attachment
OVERVIEW
Add attachment for image (as attachment) and external attachment type fields.
POST /api/3/isheet/{isheetid}/attachment
isheetid |
number |
The ID of the iSheet |
Request body
The Media type should be set to multipart/form-data
Path Parameters
Parameter Name |
Value |
Description |
---|---|---|
isheetid |
number |
The ID of the iSheet |
Form Parameters
Parameter Name |
Value |
Description |
---|---|---|
filename |
String |
Name of the newly created file |
file |
Binary file data |
The parameter name should be called file and the value for it is the file to be uploaded |
The file should be added as multipart form data. Please note that the parameters are case sensitive.
Response
If the operation is successful, the API returns a progressive key resource object. And based on this progressive key, you can see the status of an iSheet attachment, otherwise an error object is returned with the appropriate error code.
To get the status of an iSheet attachment based on a progressive key
POST /api/{version}/progressivekeystatus/{progressive_key}
Name | Type | Description |
---|---|---|
progressive_key | String |
From here you can check the status of your progress. When the first request to delete is sent, we will send the progressive key back in response. |
Response
<attachment>
<id>101</id>
</attachment>
If the operation is successful, the API returns a progressive key resource object with a status of either 'in-progress', 'done', or 'failed'. If the operation has not been successful an error object is returned with the appropriate error code
Andre Cruz, I would assume they are held in "holding pen" of some kind (whilst scanned for viruses as per Collaborate UI??). There is no way I see to enumerate this list, nor would I expect to have visibility to this internal implementation. Having said that, it would be nice to know how long uploaded resources stay in this "pen", if for example the attachment id returned is never used. Is there any garbage collection? Are the resources uploaded to this pen subjected to encryption-at-rest?
For the
- Only works for Sys Admin tokens
- Have to create a static config map of the column folders for the iSheets
- Use the Get files list endpoint to enumerate the files within these mapped folders:
- `https://collaborate.highq.com/sitepoint/api/${version}/files?` + encodeURIComponent(`q="folderid=${folderID}"`
Get folder list endpoint doesn't seem to allow enumerating folders in the Attachments hierarchy of folders, so no auto-discovery.
Where do files uploaded using this API call go? They do not appear in the corresponding ISheet Attachment folder (Files -> Attachments -> ISheet ->
Comments
2 Comments