This resource represents an attachment of a note.
Available HTTP-Methods for Attachment Resource
By sending a HTTP-POST request with all mandatory attributes, the server creates a new attachment resource and returns a list of current uploaded attachments.
Please notice the documentation for Resources Tunneling, if you encounter any problems invoking post requests on your server.
POST - Url
.../attachments/
POST - Parameters
Parameters are generally used to filter the result and are not part of the result set.
Type | Name | Description |
---|---|---|
string | attachmentUploadSessionId (mandatory) | Session identifier for session attribute. |
boolean | isBase64 | File attribute is base64 encoded. |
POST - Attributes
Attributes are part of the entity send or requested.
Type | Name | Description |
---|---|---|
string | fileName | This is the name of the file. |
string | fileType | Is the type of the file might be represented by a file extension. |
By sending a HTTP-GET request, the server returns the requested attachment resource with the following attributes. To get the attachment as binary, set parameter getAttachmentAsBinary=true.
Please notice the documentation for Resources Tunneling, if you encounter any problems invoking get requests on your server.
GET - Url
.../attachments/ID
GET - Parameters
Parameters are generally used to filter the result and are not part of the result set.
Type | Name | Description |
---|---|---|
boolean | getAttachmentAsBinary | Returns the attachment as binary file. Default Value is false. |
GET - Attributes
Attributes are part of the entity send or requested.
Type | Name | Description |
---|---|---|
long | attachmentId (mandatory) | Is the Id of the attachment. |
string | contentId | The content identifier. Depends on the associated repository identified by repositoryConnectorId. Since Communote version 3.3 |
long | contentLength | This is the size of the attachment messured in byte. |
date | crawlLastModificationDate | Convenience attribute which returns the same as the attribute crawlLastModificationDate of the associated note. Since Communote version 3.3 |
string | fileName | This is the name of the file. |
string | fileType | Is the type of the file might be represented by a file extension. |
long | noteId | The ID of the associated note. Since Communote version 3.3 |
string | repositoryConnectorId | The identifier of the repository the content is stored in. Since Communote version 3.3 |
LIST - Url
.../attachments/
LIST - Attributes
Attributes are part of the entity send or requested.
Type | Name | Description |
---|---|---|
date | crawlLastModificationDate | Convenience attribute which returns the same as the attribute crawlLastModificationDate of the associated note. Since Communote version 3.3 |
DELETE - Url
.../attachments/ID?_method=DELETE
DELETE - Attributes
Attributes are part of the entity send or requested.
Type | Name | Description |
---|---|---|
long | attachmentId | Is the Id of the attachment. |
This resource presents the preview for the given attachment
Available HTTP-Methods for Preview Resource
By sending a HTTP-GET request, the server returns a binary preview for the given attachment. Note, that currently only images supports previews.
Please notice the documentation for Resources Tunneling, if you encounter any problems invoking get requests on your server.
GET - Url
.../attachments/ID/previews/ID
GET - Attributes
Attributes are part of the entity send or requested.
Type | Name | Description |
---|---|---|
long | previewId (mandatory) | Is the Id of the attachment. |