# Webservice Pagination not working for NERM API

**URL:** <https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446>\
**Category:** SHF Discussion and Questions\
**Tags:** webservice-connector, nerm, connectors, sailpoint-identity-security\
**Created:** [May 11, 2026, 3:29pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446 "2026-05-11T15:29:16Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santhakumar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/santhakumar/32/17329_2.png) [@Santhakumar](https://developer.sailpoint.com/discuss/u/Santhakumar)\
**Post date:** [May 11, 2026, 3:29pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/1 "2026-05-11T15:29:16Z")

</div>

Hi All,

I’m working on pagination of NERM API where i used metadata=true to get the next set of accounts.

```auto
TERMINATE_IF $RECORDS_COUNT$ < $pageSize$ OR $response._metadata.next$ IS NULL OR $response._metadata.next$ == ""
$endpoint.fullUrl$ = $application.baseUrl$ + $response._metadata.next$

```

But when I try to aggregate, the count is 200, but the actual record came into SailPoint as 100, but I have 131 accounts total. Any idea how to resolve this?

---

<div class="post-metadata">

**Author:** ![jorgedeloittespain](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jorgedeloittespain](https://developer.sailpoint.com/discuss/u/jorgedeloittespain)\
**Post date:** [May 11, 2026, 3:38pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/2 "2026-05-11T15:38:42Z")

</div>

Check your API (response strcuture carefully) , and ensure thatSailpoint is mappings are: record path - accounts ; total count path - metadata.count; next page path -metadata.next; stop condition next == null

---

<div class="post-metadata">

**Author:** ![Santhakumar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/santhakumar/32/17329_2.png) [@Santhakumar](https://developer.sailpoint.com/discuss/u/Santhakumar)\
**Post date:** [May 11, 2026, 3:40pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/3 "2026-05-11T15:40:12Z")

</div>

Did I need to add the metadata in response mapping? Or what exactly you are saying?

---

<div class="post-metadata">

**Author:** ![jorgedeloittespain](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jorgedeloittespain](https://developer.sailpoint.com/discuss/u/jorgedeloittespain)\
**Post date:** [May 11, 2026, 3:42pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/4 "2026-05-11T15:42:46Z")

</div>

yes, mate SP must know where is the current account array is, where the next - page info is and where the total account is…BUT ONLY THE ACTUAL ARRAY (ACCOUNTS) SHOULD BE AGGREGATED

---

<div class="post-metadata">

**Author:** ![Santhakumar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/santhakumar/32/17329_2.png) [@Santhakumar](https://developer.sailpoint.com/discuss/u/Santhakumar)\
**Post date:** [May 11, 2026, 3:51pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/5 "2026-05-11T15:51:48Z")

</div>

I have added the profiles.\* in the root path of response information. But the metadata.next is coming from outside of these profiles.

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/5/c/5cf66e0000c4a624bc8914b22817b34fdb822ed6.png)

Can you help me with what exactly I need to do?

---

<div class="post-metadata">

**Author:** ![jorgedeloittespain](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jorgedeloittespain](https://developer.sailpoint.com/discuss/u/jorgedeloittespain)\
**Post date:** [May 11, 2026, 3:56pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/6 "2026-05-11T15:56:14Z")

</div>

Try this Response attribute mapping ( $.profiles (Root Path) ; Pagination Attribute $.\_metadata.next; Total account (Optional) $.\_metadata.total and the offset key offset

---

<div class="post-metadata">

**Author:** ![jorgedeloittespain](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jorgedeloittespain](https://developer.sailpoint.com/discuss/u/jorgedeloittespain)\
**Post date:** [May 11, 2026, 3:57pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/7 "2026-05-11T15:57:59Z")

</div>

so to fix this YOU MUST map the pagiantion variables relative to the absolute root ($) while the account attributes remain relative to the Root Path ($.profiles)

---

<div class="post-metadata">

**Author:** ![Santhakumar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/santhakumar/32/17329_2.png) [@Santhakumar](https://developer.sailpoint.com/discuss/u/Santhakumar)\
**Post date:** [May 11, 2026, 4:51pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/8 "2026-05-11T16:51:54Z")

</div>

Like this below, right? anything need to change in pagination script

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/9/0/9077b9b6cb0e7b442ee0b8e5fa3720e5e32892ca.png)

![image](https://global.discourse-cdn.com/sailpoint/original/3X/9/8/98a5c15b53298483e3457b5e9af2bd96b3d037d5.png)

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/9/1/915a3d4e9497e0e24eec7d30c72c742add79c09f.png)

```auto
TERMINATE_IF $RECORDS_COUNT$ < $pageSize$ OR $response._metadata.next$ IS NULL OR $response._metadata.next$ == ""
$endpoint.fullUrl$ = $application.baseUrl$ + $response._metadata.next$

```

---

<div class="post-metadata">

**Author:** ![srezzaki](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/srezzaki/32/22198_2.png) [@srezzaki](https://developer.sailpoint.com/discuss/u/srezzaki)\
**Post date:** [May 11, 2026, 5:12pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/9 "2026-05-11T17:12:51Z")

</div>

Hello

I don’t know why you are using metadata, but check this post to configure pagination in NERM [Push or Pulled IDN users into NERM via API - Identity Security Cloud (ISC) / ISC Discussion and Questions - SailPoint Developer Community](https://developer.sailpoint.com/discuss/t/push-or-pulled-idn-users-into-nerm-via-api/34856)

---

<div class="post-metadata">

**Author:** ![Santhakumar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/santhakumar/32/17329_2.png) [@Santhakumar](https://developer.sailpoint.com/discuss/u/Santhakumar)\
**Post date:** [May 11, 2026, 5:22pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/10 "2026-05-11T17:22:36Z")

</div>

Hi @srezzaki, I already tried this, resulting in same issue i faced earlier: aggregated count 200 but actual records 100

---

<div class="post-metadata">

**Author:** ![srezzaki](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/srezzaki/32/22198_2.png) [@srezzaki](https://developer.sailpoint.com/discuss/u/srezzaki)\
**Post date:** [May 11, 2026, 5:27pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/11 "2026-05-11T17:27:00Z")

</div>

The configuration should definitly work, can you share the configuration of the aggregate operation and results (screenshots)

---

<div class="post-metadata">

**Author:** ![Santhakumar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/santhakumar/32/17329_2.png) [@Santhakumar](https://developer.sailpoint.com/discuss/u/Santhakumar)\
**Post date:** [May 11, 2026, 5:49pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/12 "2026-05-11T17:49:57Z")

</div>

Sure here it is.

![image](https://global.discourse-cdn.com/sailpoint/original/3X/8/f/8f31768a1f3915899a832cb223d263d8b9b645f2.png)

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/a/7/a715cc037efa2eec87503f78aced011d0e24c533.png)

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/3/0/308d4f4029c8ca3cea4e2b80e0da8368eae2a8a9.png)

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/4/2/42262e6721ed80b0b5f858a679580764e4cc36d4.png)

---

<div class="post-metadata">

**Author:** ![srezzaki](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/srezzaki/32/22198_2.png) [@srezzaki](https://developer.sailpoint.com/discuss/u/srezzaki)\
**Post date:** [May 11, 2026, 6:09pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/13 "2026-05-11T18:09:37Z")

</div>

Use variables in context url “limit=$response.\_metadata.limit$&offset=$sysparm\_offset$” instead of limit=0&offset=100

---

<div class="post-metadata">

**Author:** ![Santhakumar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/santhakumar/32/17329_2.png) [@Santhakumar](https://developer.sailpoint.com/discuss/u/Santhakumar)\
**Post date:** [May 11, 2026, 6:28pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/14 "2026-05-11T18:28:58Z")

</div>

Changed to context url now the aggregation is is running for more than 20 min

![image](https://global.discourse-cdn.com/sailpoint/original/3X/3/e/3edb44bf87e0168fc67bef8145cdb4382159688f.png)

---

<div class="post-metadata">

**Author:** ![SivaLankapalli](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/sivalankapalli/32/22436_2.png) [@SivaLankapalli](https://developer.sailpoint.com/discuss/u/SivaLankapalli)\
**Post date:** [May 11, 2026, 8:53pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/15 "2026-05-11T20:53:19Z")

</div>

Hi @Santhakumar ,

Why don’t you use the direct NERM connector instead of the WebService-based?

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/d/d/dde1de03bc63f99aa49b24453ff72661ec486891.png)

Anyway, you need to use a webservice; use the following pagination configuration.

> Initial Page Offset = 0
> 
> Page Size = 50
> 
> Paging Steps
> 
> TERMINATE\_IF $RECORDS\_COUNT$ \< $limit$  
> $offset$ = $offset$ + $limit$  
> $endpoint.fullUrl$ = $application.baseUrl$ + $endpoint.relativeUrl$ + “&limit=” + $limit$ + “&offset=” + $offset$

Let me know how it’s worked.

Thanks,

@SivaLankapalli

---

<div class="post-metadata">

**Author:** ![Santhakumar](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/santhakumar/32/17329_2.png) [@Santhakumar](https://developer.sailpoint.com/discuss/u/Santhakumar)\
**Post date:** [May 12, 2026, 6:02am UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/16 "2026-05-12T06:02:28Z")

</div>

@SivaLankapalli @srezzaki @jorgedeloittespain Thanks for your inputs. I have tried the pagination script, but it is not working as expected for NERM APIs. At last I found the solution.

What have I tried so far?

- Set the root path as $ and add the pagination attributes to store metadata values like total, offset, and next.
- Tried different ways to configure the pagination script as below.

```auto
TERMINATE_IF $RECORDS_COUNT$ < $pageSize$ OR $NO_RECORDS$ == TRUE
$offset$ = $offset$ + $pageSize$
$endpoint.fullUrl$ = $application.baseUrl$ + "/api/profiles?metadata=true&limit=" + $pageSize$ + "&offset=" + $offset$ + "&profile_type_id=<profileid>"

```

```auto
TERMINATE_IF $RECORDS_COUNT$ < $pageSize$ OR $response._metadata.next$ IS NULL OR $response._metadata.next$ == ""
$endpoint.fullUrl$ = $application.baseUrl$ + $response._metadata.next$

```

```auto
$sysparm_final$ = $response._metadata.limit$ + $response._metadata.offset$
TERMINATE_IF $sysparm_final$ == $response._metadata.total$
$sysparm_offset$ = $response._metadata.limit$ + $response._metadata.offset$
$endpoint.fullUrl$ = $application.baseUrl$ + "/profiles?metadata=true&profile_type_id=<profileid>&limit=" + $response._metadata.limit$ + "&offset=" + $sysparm_offset$

```

- Mapped the variable in the context URL along with the pagination script as the 3rd one above.

```auto
/api/profiles?metadata=true&limit=$response._metadata.limit$&offset=$sysparm_offset$&profile_type_id=<profileid>

```

But none of them works for NERM APIs. The reason behind this is the NERM API with `metadata=true` as a parameter will give the response as below.

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/5/c/5cf66e0000c4a624bc8914b22817b34fdb822ed6.png)

Since the `metadata.next` keep goes on to 100,200, if we use it in a pagination script, it will be considered a loop, and the aggregation will run forever. The pagination script will never work even if you try with different settings.

**Solution**

- Remove the /api from baseUrl
- Add the /api in the context url of the Account Aggregation Operation as below

```auto
/api/profiles?&profile_type_id=<profileid>

```

- Now add the metadata, limit and offset to the context url as below

```auto
/api/profiles?metadata=true&limit=$response._metadata.limit$&offset=$response._metadata.offset$&profile_type_id=<profileid>

```

```auto
/api/profiles?metadata=true&limit=$response._metadata.limit$&offset=$sysparm_offset$&profile_type_id=<profileid>

```

You can use either one of the above codes; both will work.

Thanks.

---

<div class="post-metadata">

**Author:** ![sunildhawaleT](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@sunildhawaleT](https://developer.sailpoint.com/discuss/u/sunildhawaleT)\
**Post date:** [May 18, 2026, 8:10am UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/17 "2026-05-18T08:10:57Z")

</div>

This is not working for advanced search api for web service connector Saas.

---

<div class="post-metadata">

**Author:** ![coltonulmer](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/coltonulmer/32/23135_2.png) [@coltonulmer](https://developer.sailpoint.com/discuss/u/coltonulmer)\
**Post date:** [May 18, 2026, 6:14pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/18 "2026-05-18T18:14:18Z")

</div>

Metadata for the Advanced Search API hasn’t worked for years… Expected but not desirable, I suspect changes will eventually come for this.

---

<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:** [July 17, 2026, 6:14pm UTC](https://developer.sailpoint.com/discuss/t/webservice-pagination-not-working-for-nerm-api/207446/19 "2026-07-17T18:14:41Z")

</div>

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