Genesys Cloud - Developer Community!

 View Only

Sign Up

Expand all | Collapse all

Issue with CLI command "gc oauth clients list" autopaginate/stream returns the entities twice

  • 1.  Issue with CLI command "gc oauth clients list" autopaginate/stream returns the entities twice

    Posted 04-28-2025 10:04

    Hello,

    Lauching "gc oauth clients list" returns me 61 results

    Lauching "gc oauth clients list --autopaginate" returns me 122 results (confirmed by a lazy counting "selfUri": "/api/v2/oauth/clients in notepad++)

    the same set of 61 results is copied twice, one set of 61 results followed by the second set of 61 results

    Lauching "gc oauth clients list --stream" returns me 122 results

    in the middle of the output, I can see 

      "pageCount": 1
    }
    {
      "entities": [
        {

    I did the test on the 28th of April running version 127.0.0 of the API CLI

    Can you please pass the info to the development team?

    Thanks in advance,

    Erik


    #PlatformCLI

    ------------------------------
    Erik Hanssens
    Senior TS Systems Integration Specialist
    ------------------------------


  • 2.  RE: Issue with CLI command "gc oauth clients list" autopaginate/stream returns the entities twice

    Posted 04-29-2025 11:22

    Hello,

    It's a side effect of the autopaginate/stream logic applied to the GET /api/v2/oauth/clients endpoint.

    The GET /api/v2/oauth/clients endpoint (i.e. "gc oauth clients list") does not implement paging parameters (pageSize, pageNumber). All clients are returned with "gc oauth clients list".

    Regards,



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