Layer 7 API Management

Expand all | Collapse all

Retrieving All OAuth Clients

Jump to Best Answer
  • 1.  Retrieving All OAuth Clients

    Posted 06-09-2017 07:45 AM

    We are writing a scheduled task policy to retrieve all OAuth clients from the API Gateway database. However we cannot find the right way to retrieve this information. We are trying to use the "OTK Client Get" assertion, however this assertion only returns the first 100 clients from the database. We do not seem to find a robust way to retrieve all the clients in case there are more than 100 client in the database. There seems to be no while loop mechanism in the assertions with which we can loop over all the clients with the offset. Currently we directly use a JDBC assertion on the OAuth database, but we are afraid that a future update of the Gateway can change this behavior.



  • 2.  Re: Retrieving All OAuth Clients
    Best Answer

    Posted 06-09-2017 09:23 AM

    Hi Leendert,

     

    Have you considered using the clientstore API?

     

    Clientstore API - CA API Management OAuth Toolkit - 3.6 - CA Technologies Documentation 

     

    Regards,

    Joe



  • 3.  Re: Retrieving All OAuth Clients

    Posted 06-09-2017 09:26 AM

    Yes we did, but the get_all_client method also returns only 100 clients at a time. In fact I think the "OTK Client Get" assertion uses this API under the hood for some cases.

    So this does not seem a solution.



  • 4.  Re: Retrieving All OAuth Clients

    Posted 06-09-2017 03:08 PM

    Hi @Dommicentl

     

    You are correct. I think the JDBC assertion you are currently using may be the best bet.


    We have the limit of hardcoded in our JDBC queries to the OTK database. I would not recommended making any changes to those but rather implement your own solution if you need to avoid using offsets for the total results.

     

    Regards,

    Joe