List records
/v0/collections/{collection_path}/records
curl --request GET \
--url https://testnet.polybase.xyz/v0/collections/polybase%2Fcore%2Fusers/records\
--header 'Accept: application/json'
Path Params
The path to the collection holding the record. This must be URL encoded, so a collection path of polybase/core/users
would be requested as polybase%2Fcore%2Fusers
.
Query Params
A JSON object which defines a filter to be applied to the list of records returned.
For simple equality based filters you can use the <field>:<value>
format, for example:
{
"name": "polybase",
"rating": 5
}
Additional filter operators can be applied using the format: <field>:{ [operator]: <value> }
, where operator can be one of the following:
$gt
to match values greather than the value provided$lt
to match values less than the value provided$gte
to match values greater than or equal to the value provided$lte
to match values less than or equal to the value provided$eq
to match values exactly equal to value provided
For example:
{
"name": { "$gte": "polybase" },
"rating": { "$gt": 4 }
}
It is recommended to provide the JSON object value in a minifed format such as: ?where={"name":"polybase"}
A JSON array in the format [string, "asc"|"desc"][]
which defines the sort order for the returned records.
For example, to sort by name (ascending) and age (descending) you would use the following filter.
[["name", "asc"], ["age", "desc"]]
It is recommended to provide the JSON array value in a minifed format such as: `?sort=[[“name”,“asc”]]
Limit the number of returned records. By default, 100 records are returned.
The cursor for the next set of records that should be returned when pagingating through a list of records.
You can take the cursor value from the cursor
property of the response object.
{
"data": [ ...record data ],
"cursor": {
"before": "AgFQEiAR3bqAGG4qimQ10/cIBQc4txP8JvMFtq4NmblXSbnFPAIAAQAVAAQwMDAxLTAxLTAxVDAwOjAwOjAwWgsABENvbGxlY3Rpb24=",
"after": "AgFQEiAR3bqAGG4qimQ10/cIBQc4txP8JvMFtq4NmblXSbnFPAIAAQACAAgAFgAEZGVtby9zb2NpYWwvZm9sbG93ZXJz"
}
}
Wait for changes since a given timestamp (for up to 60 seconds), useful for watching for changes in the data.
After your first request, you should use the response timestamp returned in the X-Polybase-Timestamp
header as the value for since
.
curl --request GET \
--url https://testnet.polybase.xyz/v0/collections/polybase%2Fcore%2Fusers/records\
--header 'Accept: application/json'