Search Examples
These examples of how to search Swarm are demonstrated through curl.Â
Queries for Buckets
Tip
For queries within a single bucket, include the bucket in the URL; the filter context=<domain>/<bucketname>
does not need to be added.
Query with fields, not involving context
curl -i -X GETÂ
"http://{cluster}?format=json&domain=example.com
&fields=name,content-length"
Query with fields, retrieving context as one of the fields
curl -i -X GETÂ
"http://{cluster}?format=json&domain=example.com
&fields=name,content-length,context"
Retrieving context as one of the fields and sorting on context
curl -i -X GETÂ
"http://{cluster}?format=json&domain=example.com
&fields=name,content-length,context&sort=context:asc"
curl -i -X GETÂ
"http://{cluster}?format=json&domain=example.com
&fields=name,content-length,contextid,context&sort=context:desc"