Attachment API

Add attachment

OVERVIEW


API method to add an attachment to a content in Collaborate. 

Request URI

POST /api/4/attachments?siteid={siteid}

Request body

The Media type should be set to multipart/form-data

 

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

siteid

int Site ID.

 

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, can see the status of attachment otherwise an error object is returned with the appropriate error code

To get the status of attachment based on progressive key

POST /api/{version}/progressivekeystatus/{progressive_key}

 

Name Type Description
progressive_key String

Key to check the status of your action.

 

Response

<attachment>

      <id>101</id>

</attachment>

If the operation is successful the API returns a progressive key resource object. Possible statuses are "in-progress",  "done" or "failed" otherwise, an error object is returned with the appropriate error code

 

Note: This API will insert an attachment/file into the system with a non-active state. The attachment ID you can use while adding/editing the content API such as task, blog, or event.

 

Comments


4 Comments

Last Updated: Jun 09,2023