# REST API Response JSON Attribute Path

**URL:** <https://developer.sailpoint.com/discuss/t/rest-api-response-json-attribute-path/76684>\
**Category:** IIQ Discussion and Questions\
**Tags:** webservice-connector, apis, identityiq\
**Created:** [August 13, 2024, 9:32pm UTC](https://developer.sailpoint.com/discuss/t/rest-api-response-json-attribute-path/76684 "2024-08-13T21:32:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanO1](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@DanO1](https://developer.sailpoint.com/discuss/u/DanO1)\
**Post date:** [August 13, 2024, 9:32pm UTC](https://developer.sailpoint.com/discuss/t/rest-api-response-json-attribute-path/76684/1 "2024-08-13T21:32:14Z")

</div>

## Which IIQ version are you inquiring about?

8.4p1

I’m trying to aggregate some data into SailPoint IIQ using the OOB Web Services connector from Cornerstone. I’ve set up a connector operation for Account Aggregation. Within that configuration screen I’ve configured a response with “$.data[\*]” as the root path as well the “Schema Attribute” and “Attribute Path” options. I’ve also set up a corresponding Schema attribute customAttribute5 on the application with the SailPoint Application → Configuration → Schema screen. From SOAPUI I know that the JSON returned is as follows (redacted to show just the attribute in question).

```auto
{
   "data": {
      "customFields": [
                   {
            "id": 3,
            "value": 4
         },
                  {
            "id": 4,
            "value": ""
         },
                {
            "id": 5,
            "value": "CONTRACTOR"
         }
      ]
   }
}

```

Using [JSONPath.com](http://JSONPath.com) I’ve determined that either “customFields[?(@.id==‘5’)].value” or “customFields[2].value” in the SailPoint Attribute Path field should extract “CONTRACTOR” and pull it into Schema Attribute I’ve set up for it. Unfortunately neither approach seems to be working. Note that the aggregation of other data types works just fine (strings and lists), I’m only having issue with attributes of what appears to be an array type. Looking for some suggestions, thank you.

---

<div class="post-metadata">

**Author:** ![Arun-Kumar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/arun-kumar/32/15128_2.png) [@Arun-Kumar](https://developer.sailpoint.com/discuss/u/Arun-Kumar)\
**Post date:** [August 14, 2024, 12:46am UTC](https://developer.sailpoint.com/discuss/t/rest-api-response-json-attribute-path/76684/2 "2024-08-14T00:46:05Z")

</div>

> [@DanO1](#):
>
> customFields[?(@.id==‘5’)].value

Hi Dan,

Try with this path **customFields[?(@.id==5)].value**  
id value is a number not a string.

Regards,  
Arun

---

<div class="post-metadata">

**Author:** ![DanO1](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@DanO1](https://developer.sailpoint.com/discuss/u/DanO1)\
**Post date:** [August 14, 2024, 1:46am UTC](https://developer.sailpoint.com/discuss/t/rest-api-response-json-attribute-path/76684/3 "2024-08-14T01:46:17Z")

</div>

@Arun-Kumar Arun, thank you for the idea. Unfortunately, that change did not fix the issue.

---

<div class="post-metadata">

**Author:** ![rrachala](https://avatars.discourse-cdn.com/v4/letter/r/ccd318/32.png) [@rrachala](https://developer.sailpoint.com/discuss/u/rrachala)\
**Post date:** [August 14, 2024, 3:33am UTC](https://developer.sailpoint.com/discuss/t/rest-api-response-json-attribute-path/76684/4 "2024-08-14T03:33:44Z")

</div>

Hi Dan  
Try this

$[_].CustomFields[_].value

---

<div class="post-metadata">

**Author:** ![shekhardas1825](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/shekhardas1825/32/20889_2.png) [@shekhardas1825](https://developer.sailpoint.com/discuss/u/shekhardas1825)\
**Post date:** [August 14, 2024, 4:40am UTC](https://developer.sailpoint.com/discuss/t/rest-api-response-json-attribute-path/76684/5 "2024-08-14T04:40:42Z")

</div>

@DanO1  
Please change your root path to **$.data** instead **$.data[\*]**

Have **customFields[2].value** in Attribute Path of your response mapping.

Regards,  
Shekhar Das

---

<div class="post-metadata">

**Author:** ![Arun-Kumar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/arun-kumar/32/15128_2.png) [@Arun-Kumar](https://developer.sailpoint.com/discuss/u/Arun-Kumar)\
**Post date:** [August 14, 2024, 9:12am UTC](https://developer.sailpoint.com/discuss/t/rest-api-response-json-attribute-path/76684/6 "2024-08-14T09:12:30Z")

</div>

Hi Dan,

If the issue persists, please print the rawResponseObject and share a screenshot.

Regards,  
Arun

---

<div class="post-metadata">

**Author:** ![DanO1](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@DanO1](https://developer.sailpoint.com/discuss/u/DanO1)\
**Post date:** [August 14, 2024, 12:58pm UTC](https://developer.sailpoint.com/discuss/t/rest-api-response-json-attribute-path/76684/7 "2024-08-14T12:58:35Z")

</div>

@Arun-Kumar Thank you for your reply. It got me thinking that maybe there was a difference in the specified SCOPE between what I was doing in SOAPUI vs IIQ. While that wasn’t the issue I did review the response in SOAPUI for the particular end point (/services/api/x/users/v2/employees/) and noticed that the LIST and ARRAY attributes on the records were missing and all the string attributes were present. I then reviewed the another end point that Cornerstone provides (/services/api/x/users/v2/employees/{id} - where id is the Cornerstone unique identifier). This endpoint exposed all the attributes regardless of type (STRING, LIST (address, workerStatus, settings) and ARRAY(ous, customFields).

So now I’m off to figure out how to chain two queries together…the first to get all Cornerstone ids by using /services/api/x/users/v2/employees/ and then subsequently obtaining all the attributes (regardless of type) by iterating through all the collected ids using /services/api/x/users/v2/employees/{id}

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [October 13, 2024, 12:59pm UTC](https://developer.sailpoint.com/discuss/t/rest-api-response-json-attribute-path/76684/8 "2024-10-13T12:59:30Z")

</div>

Closed on October 13, 2024, 12:59pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
