with
The with
parameter allows parameterization and alleviates quoting issues within queries.
rest-1 URL Syntax
In rest-1.v1/Data and rest-1.oauth.v1/Data, the with
parameter is a URL query parameter. The following shows how the with
is expressed in the query.
<Server Base URI>/rest.v1/Data/Story?sel=Name&where=Scope=$myScope&with=$myScope=Scope:1083
query.v1 Syntax
In query.v1 and query.legacy.v1, the filter
parameter is a sequence of VersionOne filter tokens as strings. The filter
tokens name an attribute (possible traversing relations) and give a comparison operator and either a comparison value or a context variable that will be defined in the with clause. For simple equality comparison, use the where
parameter.
YAML
from: Story
select:
- Name
where:
Scope: $myScope
with:
$myScope: Scope:1083
JSON
{
"from": "Story",
"select":
[
"Name"
],
"where":
[
"Scope": "$myScope"
],
"with":
[
"$myScope": "Scope:1083"
]
}