awslabs / aws-api-gateway-developer-portal

A Serverless Developer Portal for easily publishing and cataloging APIs
Apache License 2.0
927 stars 399 forks source link

Why are only 25 RestAPIs getting listed in Admin Panel? How can we change it so it shows all APIs #418

Open jinman opened 4 years ago

jinman commented 4 years ago

Hi Team,

I have 67 APIs in different stages deployed using the same configuration and I can see in AWS Console. But Dev Portal only shows 25 and I cannot see pagination nor any permission or filtering mechanism in code. Any idea what could be the reason one can see only a few APIs

jinman commented 4 years ago

Is this possibly related to usagePlan fix #257 ? Since the apiList is getting filtered, they are not being shown. Can someone confirm? Do we need something like in this file https://github.com/awslabs/aws-api-gateway-developer-portal/blob/master/lambdas/backend/routes/admin/catalog/visibility.js

const defaultParams = { limit: 500 }
            let response = await apigateway.getRestApis(defaultParams).promise()
            const apis = response.items

            while (response.position) {
              console.log(`Fetching next page of api, at position=[${response.position}]`)
              const nextParams = { ...defaultParams, position: response.position }
              response = await apiGateway.getRestApis(nextParams).promise()
              apis.push(...response.items)
            }

Please advice!