noobaa-core icon indicating copy to clipboard operation
noobaa-core copied to clipboard

bucket_api: Pagination support for list_bucket API

Open aspandey opened this issue 4 months ago • 0 comments

Explain the changes

This change provides support for the pagination of list_buckets.

GET /?continuation-token=ContinuationToken&max-buckets=MaxBuckets HTTP/1.1 Host: s3.amazonaws.com

Important links - https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#listBuckets-property

We can call list buckets using API like this- nb api bucket_api list_buckets '{ "max_buckets" : 10
}'

Or using S3 call like -

const input = { MaxBuckets: 20 }; const command = new ListBucketsCommand(input);

aspandey avatar Oct 19 '24 06:10 aspandey