Previous Page Arrow Next Page Arrow

2.5 Named Query URL

SData provides a special URL syntax for “named queries”, i.e. special service operations that implement parameterized queries. Here is typical SData named query URL:

 http://www.example.com/sdata/myApp/myContract/-/products/$queries/reorder
Example Component Name Description / Comments
$queries Queries keyword Special syntax to distinguish named queries from normal resources kind names
reorder Query Name This element identifies a named query The named query may be invoked via a GET or POST request, depending on the complexity of the parameters. The SData provider will return the results as an Atom feed. See [Named Queries section](12 Named Queries "12 Named Queries") for details.

The $queries component can be placed after the dataset segment, if it applies to the entire dataset. In that case it would go after the hyphen in the example URL. Or it can be placed after the resource kind segment, if it applies to resources of a specific kind as in the example.

SData providers MAY provide named queries. If they do so, they MUST use the above URL syntax to expose their named queries.

Previous Page Arrow Next Page Arrow