Forum Discussion

vishal_sharma's avatar
vishal_sharma
Occasional Contributor
4 years ago

Integration APIs not working

I am trying to list all the APIs from my ORG published/unpublished on swagger hub to a bespoke dashboard. I am not able to see all the APIs. 

This is the URL I am using, along with my API Key.

https://api.swaggerhub.com/apis/{owner}

 

What I am getting is a partial list only, not the entire list. I tried a couple of filters as well listed - https://app.swaggerhub.com/apis/swagger-hub/registry-api/1.0.62 

  • mhiggins's avatar
    mhiggins
    4 years ago

    You are 100% correct. Domains are not APIs. but if you look at your Organization via the My Hub page the count of "assets" is the sum of APIs plus Domains. So if your 126 count is taken from that page it high by 4 (the domains). 

     

    If the 126 is actually just APIs (use the built in filter below the search box for just APIs) then the GET call is not returning the correct count as you have already pointed out. 

     

    Could you also please try the GET for /specs and see what that returns.

     

    You can also open the support case and suggests. But I am very happy to keep trying to debug with you.  

     

    Pending questions from me:

    3) What Response do you receive to the GET /specs with limit=100 and no filters ?

    4) Are you using the API Key of the Organization owner or someone else ?

    5) In Organization Settings > Members, do you have "Allow Designers and Consumers to View all the Organization’s Private APIs" enabled ?

12 Replies

  • are you using the page and limit parameters of the GET ?

     

    by default the call will only return the first 10 APIs, you can change the limit to 100. If you have more then 100 then you need to increment page for each 100 next APIs.

     

    this is from my On-premise SwaggerHub:

    curl -X 'GET' \
      'https://swaggerhub.mwhiggins.com/v1/apis/SmartBear_Org?page=0&limit=100&sort=NAME&order=ASC' \
      -H 'accept: application/json' 

     

    • vishal_sharma's avatar
      vishal_sharma
      Occasional Contributor

      Yes, I tried that, but still I am not getting the complete list. I've tried a couple of other filters (query params) but no luck.

      • mhiggins's avatar
        mhiggins
        Staff

        are you using GET /apis/<org>    --or--    GET /apis

         

        /apis/<org> doesn't support query parameters. here is my SaaS account using /apis/<org>

         

        curl -X 'GET' \
          'https://api.swaggerhub.com/apis/mhiggins-sa?page=0&limit=100&sort=NAME&order=ASC' \
          -H 'accept: application/json'

         and here is the top few lines to the response:

         

        Response body
        Download
         
        {
          "name": "Default listing",
          "description": "Default registry listing",
          "url": "apis/mhiggins-sa",
          "offset": 0,
          "totalCount": 4,
          "apis": [
            {
              "name": "KEMP LoadMaster API.",
              "description": "## KEMP LoadMaster ADC Public API\n\nKemp’s Virtual LoadMaster is a fully
  • Hello,

     

    Could you please log this as a support ticket or through our Chat in the application so we can investigate this for you.

     

    Thks,

    Laura Kennedy