Gets the attachments for a task.

Method

GET /task/{id}/attachment

Parameters

Path Parameters

Name Description
id The id of the task to retrieve the attachments for.

Result

A JSON object containing a list of task attachments.

Name Value 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.

Response Codes

Code Media type Description
200 application/json Request successful.
404 application/json No task exists for the given task id. See the Introduction for the error response format.

Example

Request

GET /task/aTaskId/attachment

Response

  1. [
  2. {
  3. "id": "attachmentId",
  4. "name": "attachmentName",
  5. "taskId": "aTaskId",
  6. "description": "attachmentDescription",
  7. "type": "attachmentType",
  8. "url": "http://my-attachment-content-url.de"
  9. },
  10. {
  11. "id": "anotherAttachmentId",
  12. "name": "anotherAttachmentName",
  13. "taskId": "aTaskId",
  14. "description": "anotherAttachmentDescription",
  15. "type": "anotherAttachmentType",
  16. "url": "http://my-another-attachment-content-url.de"
  17. },
  18. {
  19. "id": "yetAnotherAttachmentId",
  20. "name": "yetAnotherAttachmentName",
  21. "taskId": "aTaskId",
  22. "description": "yetAnotherAttachmentDescription",
  23. "type": "yetAnotherAttachmentType",
  24. "url": "http://yet-another-attachment-content-url.de"
  25. }
  26. ]

原文: https://docs.camunda.org/manual/7.9/reference/rest/task/attachment/get-task-attachments/