Resources

Attachment Resource

This resource represents an attachment of a note.

Available HTTP-Methods for Attachment Resource


POST - 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.

TypeNameDescription
stringattachmentUploadSessionId (mandatory)Session identifier for session attribute.
booleanisBase64File attribute is base64 encoded.

POST - Attributes

Attributes are part of the entity send or requested.

TypeNameDescription
stringfileNameThis is the name of the file.
stringfileTypeIs the type of the file might be represented by a file extension.

GET - Attachment Resource

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.

TypeNameDescription
booleangetAttachmentAsBinaryReturns the attachment as binary file. Default Value is false.

GET - Attributes

Attributes are part of the entity send or requested.

TypeNameDescription
longattachmentId (mandatory)Is the Id of the attachment.
stringcontentIdThe content identifier. Depends on the associated repository identified by repositoryConnectorId. Since Communote version 3.3
longcontentLengthThis is the size of the attachment messured in byte.
datecrawlLastModificationDateConvenience attribute which returns the same as the attribute crawlLastModificationDate of the associated note. Since Communote version 3.3
stringfileNameThis is the name of the file.
stringfileTypeIs the type of the file might be represented by a file extension.
longnoteIdThe ID of the associated note. Since Communote version 3.3
stringrepositoryConnectorIdThe identifier of the repository the content is stored in. Since Communote version 3.3

LIST - Attachment Resource

LIST - Url

.../attachments/

LIST - Attributes

Attributes are part of the entity send or requested.

TypeNameDescription
datecrawlLastModificationDateConvenience attribute which returns the same as the attribute crawlLastModificationDate of the associated note. Since Communote version 3.3

DELETE - Attachment Resource

DELETE - Url

.../attachments/ID?_method=DELETE

DELETE - Attributes

Attributes are part of the entity send or requested.

TypeNameDescription
longattachmentIdIs the Id of the attachment.

Preview Resource

This resource presents the preview for the given attachment

Available HTTP-Methods for Preview Resource


GET - 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.

TypeNameDescription
longpreviewId (mandatory)Is the Id of the attachment.