Post Task Attachment

Creates an attachment for a task.


POST /task/{id}/attachment/create


Path Parameters

Name Description
id The id of the task to add the attachment to.

Request Body

A multipart form submit with the following parts:

Form Part Name Content Type Description
attachment-name text/plain The name of the attachment.
attachment-description text/plain The description of the attachment.
attachment-type text/plain The type of the attachment.
url text/plain The url to the remote content of the attachment.
content text/plain The content of the attachment.


A JSON object corresponding to the Attachment interface in the engine. Its properties are as follows:

Name Type Description
id String The id of the task attachment.
name String The name of the task attachment.
taskId String The id of the task to which the attachment belongs.
description String The description of the task attachment.
type String Indication of the type of content that this attachment refers to. Can be MIME type or any other indication.
url String The url to the remote content of the task attachment.
createTime String The time the variable was inserted. Default format* yyyy-MM-dd'T'HH:mm:ss.SSSZ.
removalTime String The time after which the attachment should be removed by the History Cleanup job. Default format* yyyy-MM-dd'T'HH:mm:ss.SSSZ.
rootProcessInstanceId String The process instance id of the root process instance that initiated the process containing the task.

* For further information, please see the documentation.

Response codes

Code Media type Description
200 application/json Request successful.
400 application/json The task does not exists or task id is null. No content or url to remote content exists. See the Introduction for the error response format.
403 application/json The history of the engine is disabled. See the Introduction for the error response format.



Post data for a new task attachment:

POST /task/aTaskId/attachment/create

Content-Disposition: form-data; name="url"
Content-Disposition: form-data; name="attachment-name"

Content-Disposition: form-data; name="attachment-description"

Content-Disposition: form-data; name="attachment-type"



Status 200.

  "links": [
      "method": "GET",
      "href": "http://localhost:38080/rest-test/task/aTaskId/attachment/aTaskAttachmentId",
      "rel": "self"
    "id": "attachmentId",
    "name": "attachmentName",
    "taskId": "aTaskId",
    "description": "attachmentDescription",
    "type": "attachmentType",
    "url": "",
    "rootProcessInstanceId": "aRootProcessInstanceId"

On this Page: