cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to retrieve content using REST API from Alfresco Activiti Trial Version

akashdhruvc
Champ in-the-making
Champ in-the-making
Hi All

After I am uploading my attachments in Task Forms using the Task App in Alfresco Activiti App Trial Version, I am unable to retrieve the attachments using REST API. (REST API Reference used: http://docs.alfresco.com/activiti/topics/bpm-content.html)

REST URLs I tried with, are given here: (Both used as GET Requests)

1. http://<username>:<password>@localhost:8080/activiti-app/api/enterprise/process-instances/17518/content

2. http://<username>:<password>@localhost:8080/activiti-app/api/api/enterprise/tasks/17523/content

I have checked from http://localhost:8080/activiti-admin/ as well and Process Instance ID = 17518 and TaskID (in which attachment was uploaded = 17523).

Response received on using either URL:

{
size: 0
total: 0
start: 0
data: [0]
}

1 REPLY 1

jbarrez
Star Contributor
Star Contributor
Those two API's you mention are for retrieving 'Related Content' from a task or process instance.

To get content that was attached to a task via a form, you need to know the variable in which it is stored in activiti (which is configured in the form field popup, typically it's the same as the label with whitespaces and funny characters removed).

Using that id, you can get the content via GET api/enterprise/content/{contentId}/raw