AnsweredAssumed Answered

Response mapping with REST API calls

Question asked by anoopmonish on Nov 6, 2015
Latest reply on Sep 12, 2018 by jhalaska
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
—————————————
****************************************************

Outcomes