This project has retired. For details please refer to its Attic page.
Lens Server: SavedQueryResource

SavedQueryResource Resource

GET /queryapi/savedqueries/health

Response Body
media type data type
text/plain (custom)

GET /queryapi/savedqueries

Gets a list of saved queries matching the criteria (url parameters) windowed by count and start.

Request Parameters
name type description default constraints
count query Number of records to fetch from start    
sessionid query The sessionid in which user is working    
start query Offset to start from the search result 0 int
Response Body
media type data type description
application/json ListResponse (JSON) org.apache.lens.api.query.save.ListResponse ListResponse object
application/json ListResponse (JSON)
application/xml listResponse (XML)

GET /queryapi/savedqueries/{id}

Gets the saved query with the given id.

Request Parameters
name type description constraints
id path id of the saved query long
sessionid query The sessionid in which user is working  
Response Body
media type data type description
application/json SavedQuery (JSON) org.apache.lens.api.query.save.SavedQuery SavedQuery object
application/json SavedQuery (JSON)
application/xml savedQuery (XML)

DELETE /queryapi/savedqueries/{id}

Deletes the saved query with the given id.

Request Parameters
name type description constraints
id path id of the saved query long
sessionid query The sessionid in which user is working  
Response Body
media type data type description
application/json ResourceModifiedResponse (JSON) org.apache.lens.api.query.save.ResourceModifiedResponse ResourceModifiedResponse object
application/json ResourceModifiedResponse (JSON)
application/xml resourceModifiedResponse (XML)

POST /queryapi/savedqueries

Creates a new saved query.

Request Parameters
name type description
sessionid query The sessionid in which user is working
Request Body
media type data type description
application/json SavedQuery (JSON) Saved query object
application/json SavedQuery (JSON)
application/xml savedQuery (XML)
Response Body
media type data type description
application/json ResourceModifiedResponse (JSON) org.apache.lens.api.query.save.ResourceModifiedResponse ResourceModifiedResponse object
application/json ResourceModifiedResponse (JSON)
application/xml resourceModifiedResponse (XML)

PUT /queryapi/savedqueries/{id}

Updates the saved query {id} with the new payload.

Request Parameters
name type description constraints
id path long
sessionid query The sessionid in which user is working  
Request Body
media type data type description
application/json SavedQuery (JSON) Saved query object
application/json SavedQuery (JSON)
application/xml savedQuery (XML)
Response Body
media type data type description
application/json ResourceModifiedResponse (JSON) org.apache.lens.api.query.save.ResourceModifiedResponse ResourceModifiedResponse object
application/json ResourceModifiedResponse (JSON)
application/xml resourceModifiedResponse (XML)

POST /queryapi/savedqueries/parameters

Parses the query and returns parameters that are found in the query.

Request Parameters
name type description
query formdata The HQL query
sessionid query The sessionid in which user is working
Response Body
media type data type description
application/json ParameterParserResponse (JSON) org.apache.lens.api.query.save.ParameterParserResponse ParameterParserResponse object
application/json ParameterParserResponse (JSON)
application/xml parameterParserResponse (XML)

POST /queryapi/savedqueries/{id}

Runs the saved query with the given id and returns a query handle.

Request Parameters
name type description constraints
conf formdata Lens configuration overrides for the query  
sessionid formdata The sessionid in which user is working  
id path id of the saved query long
Response Body
media type data type description
application/json LensAPIResult (JSON) LensAPIResult containing the query handle
application/json LensAPIResult (JSON)
application/xml lensAPIResult (XML)