How to get Paging details from API Data Page request

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

}

@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.

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

},

@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.

@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.

@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

@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.

@VinodJ87

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

Thanks,

Ramesh