Realtime Cloud Storage

QueryFilter

Specification of the filter structure used by the queryItems operation. For query operations, all filters are applied to the secondary key.

Properties

String operator

The comparison operator. Can include one of the following types: 'equals', 'lessEqual', 'lessThan', 'greaterEqual', 'greaterThan', 'beginsWith' and 'between'.

Number|String value

Attribute values to be used with a comparison operator. Its type varies according with the operator used (i.e. 'between' requires two values, hence an array).

Sample

/* Below are examples of queryItems operation for all of the supported comparison operators. */

// equals
curl 'https://storage-backend-prd-useast1.realtime.co/queryItems' -H 'Content-Type: application/json; charset=UTF-8' -d '{ "applicationKey":"[YOUR_APP_KEY]", "authenticationToken":"[YOUR_TOKEN]", "table":"SampleUser", filter: { "operator": "equals", "value": "Debug" } }'

// lessEqual
curl 'https://storage-backend-prd-useast1.realtime.co/queryItems' -H 'Content-Type: application/json; charset=UTF-8' -d '{ "applicationKey":"[YOUR_APP_KEY]", "authenticationToken":"[YOUR_TOKEN]", "table":"SampleUser", filter: { "operator": "lessEqual", "value": 10 } }'

// lessThan
curl 'https://storage-backend-prd-useast1.realtime.co/queryItems' -H 'Content-Type: application/json; charset=UTF-8' -d '{ "applicationKey":"[YOUR_APP_KEY]", "authenticationToken":"[YOUR_TOKEN]", "table":"SampleUser", filter: { "operator": "lessThan", "value": 10 } }'

// greaterEqual
curl 'https://storage-backend-prd-useast1.realtime.co/queryItems' -H 'Content-Type: application/json; charset=UTF-8' -d '{ "applicationKey":"[YOUR_APP_KEY]", "authenticationToken":"[YOUR_TOKEN]", "table":"SampleUser", filter: { "operator": "greaterEqual", "value": 10 } }'

// greaterThan
curl 'https://storage-backend-prd-useast1.realtime.co/queryItems' -H 'Content-Type: application/json; charset=UTF-8' -d '{ "applicationKey":"[YOUR_APP_KEY]", "authenticationToken":"[YOUR_TOKEN]", "table":"SampleUser", filter: { "operator": "greaterThan", "value": 10 } }'

// beginsWith
curl 'https://storage-backend-prd-useast1.realtime.co/queryItems' -H 'Content-Type: application/json; charset=UTF-8' -d '{ "applicationKey":"[YOUR_APP_KEY]", "authenticationToken":"[YOUR_TOKEN]", "table":"SampleUser", filter: { "operator": "beginsWith", "value": "Code" } }'

// between
curl 'https://storage-backend-prd-useast1.realtime.co/queryItems' -H 'Content-Type: application/json; charset=UTF-8' -d '{ "applicationKey":"[YOUR_APP_KEY]", "authenticationToken":"[YOUR_TOKEN]", "table":"SampleUser", filter: { "operator": "between", "value": [0, 5] } }'