phillipleblanc opened a new pull request, #1097: URL: https://github.com/apache/iceberg-rust/pull/1097
## Which issue does this PR close? - Closes #1096 ## What changes are included in this PR? Implements pagination on the `GET /v1/namespaces` and `GET /v1/namespaces/my_namespace/tables` APIs by looking for a `next-page-token` and adding a `pageToken` query parameter on the next request with that token. This is allowed on the Iceberg Catalog REST API spec: ListTablesResponse: https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml#L3898 ListNamespacesResponse: https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml#L3909 PageToken: https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml#L2009C5-L2029C40 > PageToken: > description: > An opaque token that allows clients to make use of pagination for list APIs > (e.g. ListTables). Clients may initiate the first paginated request by sending an empty > query parameter `pageToken` to the server. > Servers that support pagination should identify the `pageToken` parameter and return a > `next-page-token` in the response if there are more results available. After the initial > request, the value of `next-page-token` from each response must be used as the `pageToken` > parameter value for the next request. The server must return `null` value for the > `next-page-token` in the last response. > Servers that support pagination must return all results in a single response with the value > of `next-page-token` set to `null` if the query parameter `pageToken` is not set in the > request. > Servers that do not support pagination should ignore the `pageToken` parameter and return > all results in a single response. The `next-page-token` must be omitted from the response. > Clients must interpret either `null` or missing response value of `next-page-token` as > the end of the listing results. ## Are these changes tested? Yes, unit tests have been added to cover pagination with one page and multiple pages for both APIs -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org