Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Data Tables - Paging Changes

    Posted 30 days ago

    Have there been any planned changes to the way paging works for Architect Data Tables?

    We used to use current/max page for this, but had issues with it some time ago, and switched over to checking nextUri in line with the tips and tricks:

    "Check for a value in the response property nextUri. If a value exists, it will be the path to the next page. If it does not exist, there are no more pages."

    However, after reports from a client of missing data, I've just tried this on the API explorer, requesting 60 items out of a total of 66. The paging json returned was:

      "pageSize": 60,
      "pageNumber": 1,
      "total": 64,
      "pageCount": 2

    So, no nextUri field, which causes our code to stop, but there is still data to process.

    Is this a bug or by design? We use the nextUri method pretty much across the board, do we need to revisit this?


    #Architect
    #PlatformSDK

    ------------------------------
    Austen Jackson
    Software Architect
    ------------------------------


  • 2.  RE: Data Tables - Paging Changes

    Posted 30 days ago
    Edited by Luiz Rosa 30 days ago

    Hi,

    I ran a test here and couldn't reproduce the issue. Could you confirm if you're using the same endpoint?

    Example:

    GET /api/v2/flows/datatables/2fb11a02-94b9-4df5-bee2-fc7bcbfa76eb/rows?pageNumber=1&pageSize=25&showbrief=true HTTP/1.1
    Host: api.mypurecloud.com
    Authorization: Bearer *******************
    Content-Type: application/json

    {
      "entities": [
        {
          "key": "1"
        },
        {
          "key": "10"
        },
        {
          "key": "11"
        },
        {
          "key": "12"
        },
        {
          "key": "13"
        },
        {
          "key": "14"
        },
        {
          "key": "15"
        },
        {
          "key": "16"
        },
        {
          "key": "17"
        },
        {
          "key": "18"
        },
        {
          "key": "19"
        },
        {
          "key": "2"
        },
        {
          "key": "20"
        },
        {
          "key": "21"
        },
        {
          "key": "22"
        },
        {
          "key": "23"
        },
        {
          "key": "24"
        },
        {
          "key": "25"
        },
        {
          "key": "26"
        },
        {
          "key": "3"
        },
        {
          "key": "4"
        },
        {
          "key": "5"
        },
        {
          "key": "6"
        },
        {
          "key": "7"
        },
        {
          "key": "8"
        }
      ],
      "pageSize": 25,
      "pageNumber": 1,
      "total": 26,
      "firstUri": "/api/v2/flows/datatables/2fb11a02-94b9-4df5-bee2-fc7bcbfa76eb/rows?pageSize=25&pageNumber=1&showbrief=true",
      "nextUri": "/api/v2/flows/datatables/2fb11a02-94b9-4df5-bee2-fc7bcbfa76eb/rows?pageSize=25&pageNumber=2&showbrief=true",
      "lastUri": "/api/v2/flows/datatables/2fb11a02-94b9-4df5-bee2-fc7bcbfa76eb/rows?pageSize=25&pageNumber=2&showbrief=true",
      "selfUri": "/api/v2/flows/datatables/2fb11a02-94b9-4df5-bee2-fc7bcbfa76eb/rows?pageSize=25&pageNumber=1&showbrief=true",
      "pageCount": 2
    }



    ------------------------------
    Luiz Rosa
    Full stack developer
    ------------------------------



  • 3.  RE: Data Tables - Paging Changes

    Posted 30 days ago

    Hi Luiz,

    Thanks for getting back to me. I'm actually calling the data table list method:



    ------------------------------
    Austen Jackson
    Software Architect
    ------------------------------



  • 4.  RE: Data Tables - Paging Changes

    Posted 30 days ago

    Sure, now it's clear, sorry for the confusion. Based on my tests, it seems to be specific behavior of this API. The documentation indicates that the field is part of the schema, but even when monitoring the service execution on the Genesys page, it doesn't appear in the response. In this case, only Genesys can confirm whether this is a bug or behavior by design. It might be worth opening a ticket to ask for clarification.



    ------------------------------
    Luiz Rosa
    Full stack developer
    ------------------------------



  • 5.  RE: Data Tables - Paging Changes

    Posted 29 days ago

    Hello,

    Please report this to Genesys Cloud Customer Care/Product Support, opening a ticket.

    I didn't understand if you were already using this endpoint and the nextUri in response. If so, and if the nextUri used to work properly on this endpoint (i.e. returned in response), then that is likely a bug.

    Regards,



    ------------------------------
    Jerome Saint-Marc
    Senior Development Support Engineer
    ------------------------------