...
Argument | Values | Usage | Example | ||||
---|---|---|---|---|---|---|---|
format |
|
| &format=json &format=xml | ||||
context | string | Filters the search to certain buckets one of these ways:
To restrict search to a bucket, include the bucket in the URL path. Always use with use | &context<=example.com/2015 &context=example.com/foo* | ||||
contextid | UUID | Specifies a search filtered to the context identified by the UUID given. | &contextid=80a4957… | ||||
decorates | UUID | Used in a listing query to find any annotation objects that may exist for a given ETag (or earlier query result “hash”). See Metadata Annotation and Listing Operations. | &decorates=a95780a4… | ||||
domain | domain-name | In a normal SCSP storage request, the required Host header is the assumed domain (or context) for the operation. Most HTTP/1.1 clients and browsers use the host portion of the URL as the value for the Host header in the Swarm request. Supply the domain argument to explicitly override it if the value of the Host request header does not match the domain name. A domain argument always has precedence over the Host header in the HTTP/1.1 request. Set the value equal to nothing (empty string) to find unnamed objects not tenanted in any domain. | &domain=example.com &domain= | ||||
domains | none (ignored) | Used for listing the domains within a cluster. No value is used with this argument. | &domains | ||||
du |
| Dynamically queries the disk usage for a domain or bucket context. With du, use the
See Storage in Use for how to query the storage in use for domains and buckets. | &du=withreps&size=0 | ||||
field‑name | any indexed metadata field, such as:
| Filters results to those matching the operations on one or more specified fields. Multiple filters are joined by a logical AND; to specify OR, add the &or argument. Supports standard comparison operators on specific fields to filter the results returned:
This is an overloading of normal query argument processing. | &x-width-meta<=800 &x-height-meta<=600 &content-type=image/bmp&or &content-type=image/png &content-length>=1073741824 | ||||
fields | Comma-separated list of field names, or | Replaces the default fields and specifies, as a comma-separated list, which fields to display in the output (see See Metadata Field Matching). Use | &fields=name,content-length &fields=all | ||||
index |
| On a write (POST, PUT, COPY, APPEND, DELETE) request, forces immediate search indexing of the newly written/deleted object. Appears on Gateway requests when enabling the Gateway Configuration option | &index=yes | ||||
sync |
| On a read (listing query GET) request, forces consistency of results returned on the listing.
Appears on Gateway requests when enabling the Gateway Configuration option | &sync=now | ||||
marker | empty value or a comma-separated list of sorted column key values | Provides a mechanism to use multiple requests to receive a complete result set. Defaults to Used with the | &marker=&sort=tmBorn&size=50 | ||||
or |
| Joins them with a logical OR (default is AND) when used with multiple field comparisons. Defaults to false. | &or | ||||
prefix | string | Matches the string to the start (prefix) of the object's name or UUID. The names of the objects in the output list share the same prefix string.
To find untenanted unnamed objects, include " | &prefix=Q1 &stype=unnamed&prefix=93f &stype=unnamed&prefix=93f&domain= | ||||
size | integer | Constrains the number of results to be returned by the query. Defaults to 1000. This argument is equivalent in purpose to the "limit" or "max-keys" arguments in other cloud protocols. The maximum is 50000 but we do not recommend using more than 10000.
| &size=5000 | ||||
sort | Comma-separated list of field names, with optional modifier | Sets the sort order of one or more fields, with the first field sorting first. Sorting direction defaults to ascending (
| &sort=size:desc,name | ||||
stype | Comma-separated list of Swarm types | Specifies the type of objects being requested in a search. Defaults to Valid values: | &stype=unnamed | ||||
versioned |
| Allows filtering updateable (named and alias) objects by versioning status, checking whether versioning was enabled in the context at the time they are written. Checks the value of the Castor‑System‑IsVersioned header. (v10.0) | &versioned=true | ||||
versions versions&name versions&prefix |
name of object first part of name |
Requests a listing of all versions of the named object. Requests a listing of all versions of all objects matching the prefix. See Object Versioning. | &versions &versions&name=logo.jpg &versions&prefix=2019Q1/ |
...
Marker Argument
The marker
argument provides a mechanism to retrieve a single result set using multiple HTTP requests. This is useful when a large result set is impractical to receive using one HTTP request. All marker operations work using a sorted result set. The system implicitly usessort=name
if a sort
argument is not provided. The size
argument is used to control how many items are returned per HTTP request.
On the first request,marker=
(without a value) is used to indicate a request at the beginning of the result set. For subsequent requests, the last value(s) from the sort field(s) is used to indicate the last record received from the previous request.
Tipinfo |
---|
TipUse a UTC date-time or Unix timestamp (float) when using |
Marker Example
Consider the following set of object names in the bucket dictionary
.
...
Code Block |
---|
GET /dictionary?format=json&domain=example.com&size=4&fields=name&marker=defender [ ] |
Sort vs Marker
...
Relationship
The marker
value is either the last value or values from the sort fields. The marker also contains the last field values in it if using: sort={field1},{field2},...,{fieldN}
...
DataCore Swarm cannot return more results than specified by ?size
and can only return objects after ?marker
so the sort needs to be a total ordering.
Determining
...
Completion
The set of objects in the cluster is continually changing so list/search requests are never complete. A criterion exists for considering marker requests complete. The Castor-System-Object-Count
response header returns the number of objects remaining to enumerate including the records retrieved by the current request.
A client may consider the iterating request complete when the CastorObject-Count
value equals the number of records retrieved by the current request.
Markers
...
Across the
...
Domain
A strategy for using markers to retrieve a result set of a search across the entire domain is to sort based on a unique tuple of metadata fields all objects have. For example,
Code Block | ||
---|---|---|
| ||
sort=context,name |
See Baseline Metadata FieldsField Matching.
The name
field is a UUID or an application-assigned string depending upon the object type. Anchor
...
Stype Argument
The stype
argument allows filtering search results to certain types of objects. The following table lists the stype argument values:
...
Use the unnamed, immutable, or alias value of the stype to select the desired set to list the unnamed objects in the domain. Include domain=
set to nothing (empty string) to find untenanted unnamed objects. Untenanted unnamed objects return an empty string for the domain field in search and listing results.
Info |
---|
ImportantUnnamed objects are guaranteed to be tenanted in a domain when the cluster.enforceTenancy configuration option is enabled. Include |