cancel
Showing results for 
Search instead for 
Did you mean: 

Response mapping with REST API calls

anoopmonish
Champ on-the-rise
Champ on-the-rise
Pl suggest how to retrieve values from within the 'data' array.(given below)
Im able to view the 'size' value in a later form using 'display value' element.
But when i use method to display value of data[array_index].id or data[array_index].firstname the next task in the process does not show up in 'my tasks'

This is response after hitting the REST API "api/enterprise/users"
Response entity: {
    "size": 4,
    "total": 4,
    "start": 0,
   "data": [
        {
            "id": 1,
            "firstName": null,
            "lastName": "Administrator",
            "email": "admin@app.activiti.com"
        },
        {
            "id": 2,
            "firstName": "a",
            "lastName": "a",
            "email": "a@a"
        },
        {
            "id": 3,
            "firstName": "b",
            "lastName": "b",
            "email": "b@b"
        }
    ]

}

This is the response mapping used in REST CALL TASK:
****************************************************
CHANGE VALUE FOR RESPONSE MAPPING:
JSON PROPERTY   |   VARIABLE
—————————————
data[0].id      |   idVar
size              |   sizeVar
—————————————
****************************************************
3 REPLIES 3

vasile_dirla
Star Contributor
Star Contributor
Hi,
Accessing the array elements in a REST response is currently not supported;
This issue is in our backlog but it's not yet planned.

manoj_jadhav
Champ in-the-making
Champ in-the-making

Hi,

Is above issue for accessing the array elements in rest response fixed in alfresco enterprise addition v1.5.3?

Please confirm.

jhalaska
Champ in-the-making
Champ in-the-making

Hello,

Has this issue with JSON arrays been resolved?

Thanks