Skip to main content
System StatusContact Support
VersionOne Community

where

Without the where parameter, queries return the entire set of from assets. The where parameter filters the results to a subset that meet specific criteria. Whenever possible, use where or filter to explicitly choose specific assets, thereby reducing the load put on the application.

rest-1 URL Syntax

In rest-1.v1/Data, the where parameter is a URL query parameter with a list of filter tokens. Each filter token consists of an attribute definition, an comparison operation, and a single-quote delimited value. The list is separated by logical operators.

where-param         ::= where=<filter-token>[<logical-operator><filter-token>]*
filter-token        ::= <attribute definition><comparison-operator>'<value>'
logical-operator    ::= ';' | '|'
comparison-operator ::= '=' | '!=' | '<' | '<=' | '>' | '>='

The following shows how where is expressed in a query.

<Server Base URI>/rest-1.v1/Data/Story?sel=Name,Estimate&where=Estimate='0'

query.v1 Syntax

In query.v1, where is a simple map where the values of the mapping are taken as the value to compare against in an "equal" comparison. In order to apply the full range of comparison operators, see the filter parameter.

YAML

from: Story
select:
  - Name
  - Estimate
where:
  Estimate: 0

JSON

{
  "from": "Story",
  "select":
    [
      "Name",
      "Estimate"
    ],
  "where":
    {
      "Estimate": "0"
    }
}
  • Was this article helpful?