openwhisk-wskdeploy
openwhisk-wskdeploy copied to clipboard
Export command subject to List limits
The OpenWhisk REST API limits the number of assets that can be returned to 200. The export command might return a partial result.
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
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!
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 ahh yes, pagination... recall this being discussed when it was added. Good catch.
Making it a low priority and enhancement as haven't found a real use case with more than 200 actions in a package.