cancel
Showing results for 
Search instead for 
Did you mean: 

[REST API] Add attachment external resource

richardwilly98
Champ in-the-making
Champ in-the-making
Hi,

I am using Activiti 5.14 (also tested with 5.13).
I try to add a new attachment which is a link to an external resource using [1].
curl –user kermit:kermit -XPOST http://localhost:18080/activiti-rest/service/runtime/tasks/{taskId}/attachments -H "Content-Type: application/json" -d
'{
  "name":"Simple attachment",
  "description":"Simple attachment description",
  "type":"simpleType",
  "externalUrl":"http://activiti.org"
}'

The response code is 201 but I cannot find the new attachment in "Related content" section from Activiti Explorer instead it appears in "Events" section.

I compare entries created from activiti explorer and REST api in act_hi_attachment table and it looks like the difference is proc_inst_id_ being null when created from REST api.

I am pretty new with Activiti. I am missing something obvious?

[1] - http://activiti.org/userguide/index.html#N14BCF

Thanks,
   Richard.
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
That's indeed the issue, I'll fix this in the 5.15 release..