Download presentation
Presentation is loading. Please wait.
1
Query Verb Proposal Ashok Malhotra, Oracle ashok.malhotra@oracle.com
2
Query Verb Proposal The query specification is contained in the body of the request The request-uri indicates the resource to be queried Results are communicated in the response QUERY (return selected parts of the resource) is related to GET as PATCH – RFC 5789-- (update selected parts of the resource) is to PUT
3
Query Verb Proposal Queries can be specified using many different syntaxes Content header can be used to specify the media type of the query Accept headers can be used to specify the format of the response
4
Query Verb Proposal QUERY is safe and idempotent QUERY results are cachable using the RequestURI and query specification in the request body as key More intelligent caching is possible to improve performance but needs further discussion
5
Query Verb Proposal The OPTIONS request can be used to ascertain whether the QUERY verb is supported. If QUERY is supported, it must be included in the Allow header. If QUERY is supported a query header or link header with rel=“query-metadata” must be included in the header. The value of this header must be a non-empty list of URIs that point to the metadata for the media types that can be used to specify the query
6
Using a Stored Query The URL of a stored query can be included as the value of a Link header in a QUERY request with rel = “query” Optionally, the stored query URL can be included in the body of a QUERY request
7
Stored Queries Queries can be stored using a POST Queries can be retrieved using a GET Queries can be modified using a PUT or PATCH Queries can be deleted using a DELETE
8
Running Stored Queries Options using QUERY – Query URI is contained in the body of the request – Query URI is indicated in a link header with rel = “query” Using GET – Make a GET request on QueryURI/Results If the query is parametrized, the values for the parameters are specified as query parameters in the URI
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.