openwhisk-wskdeploy icon indicating copy to clipboard operation
openwhisk-wskdeploy copied to clipboard

Export command subject to List limits

Open lionelvillard opened this issue 7 years ago • 5 comments

The OpenWhisk REST API limits the number of assets that can be returned to 200. The export command might return a partial result.

lionelvillard avatar Feb 20 '18 22:02 lionelvillard

Now you have use the query parameter ?count=true and this will return the total number of entities for example total of actions, triggers, packages, rules. Then you can know if there are more than 200 items and then know how to paginate with skip= to get them all .

cc @rabbah

csantanapr avatar Feb 21 '18 04:02 csantanapr

thanks @csantanapr . To get all entities, this can also be done without ?count=true: when the number of returned entities is 200 then recursively get the next 200. But good to know, thanks!

lionelvillard avatar Feb 21 '18 14:02 lionelvillard

Lionel if you don’t do a count first you would see the first 200 only missing the rest. So you first do a fetch for 200 and if you get 200 then do another fetch with skip. Until the last fetch return nothing.

Either way I think you understand now there is a view to do total count

csantanapr avatar Feb 21 '18 15:02 csantanapr

@csantanapr ahh yes, pagination... recall this being discussed when it was added. Good catch.

mrutkows avatar Feb 21 '18 21:02 mrutkows

Making it a low priority and enhancement as haven't found a real use case with more than 200 actions in a package.

pritidesai avatar Apr 23 '18 17:04 pritidesai