I am able to fetch documents using this API:
curl -X GET "https://$ASTRA_DB_ID-$ASTRA_DB_REGION.apps.astra.datastax.com/api/rest/v2/namespaces/my_namespace/collections/my_collection?page-size=1" \ -H "X-Cassandra-Token: $ASTRA_AUTHORIZATION_TOKEN"
It gives me this result
{ "pageState": "JDI3ODgyZTUyLTc2YTQtNGEwNi05MGU3LWVjODFkN2MzNDQzZRL/VVVVVVVVVVQEZGF0YeFVVVXwf////vB////+", "data": { "27882e52-76a4-4a06-90e7-ec81d7c3443e": { "data": "{\"name\": \"jack\"}" } } }
As per the documentation, pagination can be done using 'page-state' query parameter. I tried using the 'pageState' value I obtained above, but am getting the below error. What is the correct way to paginate?
Illegal base64 character 20
Here's the CURL with 'page-state':
curl -X GET "https://$ASTRA_DB_ID-$ASTRA_DB_REGION.apps.astra.datastax.com/api/rest/v2/namespaces/my_namespace/collections/my_collection?page-size=1&page-state=JDI3ODgyZTUyLTc2YTQtNGEwNi05MGU3LWVjODFkN2MzNDQzZRL/VVVVVVVVVVQEZGF0YeFVVVXwf////vB////+" \ -H "X-Cassandra-Token: $ASTRA_AUTHORIZATION_TOKEN"