# How to get Paging details from API Data Page request

**URL:** <https://forums.pega.com/t/how-to-get-paging-details-from-api-data-page-request/8873>\
**Category:** General\
**Tags:** dx-api, 24-2, data-model, pega-platform\
**Created:** [January 17, 2025, 6:29am UTC](https://forums.pega.com/t/how-to-get-paging-details-from-api-data-page-request/8873 "2025-01-17T06:29:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![VinodJ87](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@VinodJ87](https://forums.pega.com/u/VinodJ87)\
**Post date:** [January 17, 2025, 6:29am UTC](https://forums.pega.com/t/how-to-get-paging-details-from-api-data-page-request/8873/1 "2025-01-17T06:29:13Z")

</div>

How to get paging details from the API Data page, when we are using

List type API Data Page and Source is not Report definition but Data transform or Activity.

Not able to use pagination in the scenario when source is not report definition.

POST /data\_views/{data\_view\_ID} → DX API is used to access the API Data page

Example JSON:

{

“dataViewParameters”: {

“Grade”: “”,

“Department”: “”,

“Profession”: “”

},

“paging”: {

“pageNumber”: 1,

“pageSize”: 5

},

“useExtendedTimeout”: false

}

---

<div class="post-metadata">

**Author:** ![Sairohith](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/sairohith/32/22323_2.png) [@Sairohith](https://forums.pega.com/u/Sairohith)\
**Post date:** [January 19, 2025, 8:58pm UTC](https://forums.pega.com/t/how-to-get-paging-details-from-api-data-page-request/8873/2 "2025-01-19T20:58:19Z")

</div>

@VinodJ87 To enable pagination for an API Data Page when the source is a Data Transform or Activity (instead of a Report Definition), you can use the `paging` parameter provided by the DX API. Include the `pageNumber` and `pageSize` properties in your JSON request payload to specify the desired page and the number of items per page. Within your Data Transform or Activity, implement custom logic to handle the paging parameters from the request. Extract `pageNumber` and `pageSize` from the parameter page or API input and apply them to limit the data returned. For example, use a loop or filter to fetch the appropriate subset of data based on the page and size values. By processing these parameters manually in the backend logic, you can achieve similar pagination behavior as a Report Definition-based source, ensuring the API Data Page supports the desired paging functionality.

---

<div class="post-metadata">

**Author:** ![VinodJ87](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@VinodJ87](https://forums.pega.com/u/VinodJ87)\
**Post date:** [January 21, 2025, 3:15pm UTC](https://forums.pega.com/t/how-to-get-paging-details-from-api-data-page-request/8873/3 "2025-01-21T15:15:09Z")

</div>

Hi @Sairohith ,

whatever we pass inside “dataViewParameters” it will be copied to parameters by default by Pega. But could not find where this “paging” information is getting set, when a request comes in -

“paging”: {

“pageNumber”: 1,

“pageSize”: 5

},

---

<div class="post-metadata">

**Author:** ![Sairohith](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/sairohith/32/22323_2.png) [@Sairohith](https://forums.pega.com/u/Sairohith)\
**Post date:** [January 22, 2025, 3:03am UTC](https://forums.pega.com/t/how-to-get-paging-details-from-api-data-page-request/8873/4 "2025-01-22T03:03:42Z")

</div>

@VinodJ87 In Pega, when you send a request with a `paging` object (containing `pageNumber` and `pageSize`) to a Data Page via the DX API, Pega automatically maps these values to standard clipboard properties, `pyPageNumber` and `pyPageSize`. While `dataViewParameters` are copied to the parameters section by default, `paging` details are handled separately. These `pyPageNumber` and `pyPageSize` values are accessible within the Data Page context. If your source is a Data Transform or Activity, you can retrieve these properties directly from the clipboard to implement custom pagination logic. Use these values to slice or limit the data returned, ensuring the response adheres to the requested page size and number. You can verify this behavior by checking the clipboard during runtime under `pxRequestor` or `pyWorkPage`. This approach ensures you can effectively handle pagination even when the source is not a Report Definition.

---

<div class="post-metadata">

**Author:** ![RameshSangili](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/rameshsangili/32/22508_2.png) [@RameshSangili](https://forums.pega.com/u/RameshSangili)\
**Post date:** [January 22, 2025, 9:02pm UTC](https://forums.pega.com/t/how-to-get-paging-details-from-api-data-page-request/8873/5 "2025-01-22T21:02:23Z")

</div>

@VinodJ87

This may not work if your source is Activity or Data transform. Ideally, the pagination is passed to your report definition(pyPagingParams) to limit the records and page number based on your crieria.

 ![pagesize.png](https://pega1.discourse-cdn.com/pega/original/2X/7/763434cf2259d34edcc18214c4d251f0f7c3a3af.png)

---

<div class="post-metadata">

**Author:** ![VinodJ87](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@VinodJ87](https://forums.pega.com/u/VinodJ87)\
**Post date:** [January 25, 2025, 6:18pm UTC](https://forums.pega.com/t/how-to-get-paging-details-from-api-data-page-request/8873/6 "2025-01-25T18:18:40Z")

</div>

@RameshSangili can we implement Join conditions with filter logic in DX API with Report definition as Source.

If i want to compare the result of Join class with the value i am passing in the Filter tag of the request.

Ex: **A.pxApplicationName = Param.Application**

Param.Application → should be the value coming from the filter in the request

A.pxApplicationName → Value from the joining class

---

<div class="post-metadata">

**Author:** ![VinodJ87](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@VinodJ87](https://forums.pega.com/u/VinodJ87)\
**Post date:** [January 25, 2025, 6:06pm UTC](https://forums.pega.com/t/how-to-get-paging-details-from-api-data-page-request/8873/7 "2025-01-25T18:06:31Z")

</div>

@Sairohith I checked we cannot get the paging info, if the source is not Report Definition. Only for RD it will work as commented by [RameshSangili](https://support.pega.com/users/RameshSangili).

---

<div class="post-metadata">

**Author:** ![RameshSangili](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/rameshsangili/32/22508_2.png) [@RameshSangili](https://forums.pega.com/u/RameshSangili)\
**Post date:** [January 27, 2025, 9:36pm UTC](https://forums.pega.com/t/how-to-get-paging-details-from-api-data-page-request/8873/8 "2025-01-27T21:36:11Z")

</div>

@VinodJ87

Yes, this should work! If you pass the parameters through DX API, add a filter to the Report definition rule.

Thanks,

Ramesh
