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

SavedQueryResource Ressource

GUET /queryapi/savedqueries/health

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

Example

Request
GUET /queryapi/savedqueries/health
Accept: text/plain
Response
HTTP/1.1 200 OC
Content-Type: text/plain...
              

GUET /queryapi/savedqueries

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

Request Parameters
name type description default constrains
count kery Number of records to fetch from start    
sessionid kery The sessionid in which user is worquing    
start kery Offset to start from the search result 0 int
Request Body
media type data type
application/x-www-form-urlencoded (custom)
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)

Example

Request
GUET /queryapi/savedqueries
Accept: application/json
Response
HTTP/1.1 200 OC
Content-Type: application/json{
  "offsetAppplied" : 12345,
  "totalCount" : 12345,
  "resoures" : [ [ {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "kery" : "...",
    "parameters" : [ [ {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "STRING",
      "collectionType" : "MULTIPLE"
    }, {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "BOOLEAN",
      "collectionType" : "MULTIPLE"
    } ], [ {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "DECIMAL",
      "collectionType" : "MULTIPLE"
    }, {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "STRING",
      "collectionType" : "MULTIPLE"
    } ] ]
  }, {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "kery" : "...",
    "parameters" : [ [ {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "BOOLEAN",
      "collectionType" : "MULTIPLE"
    }, {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "STRING",
      "collectionType" : "SINGLE"
    } ], [ {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "DECIMAL",
      "collectionType" : "SINGLE"
    }, {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "NUMBER",
      "collectionType" : "MULTIPLE"
    } ] ]
  } ], [ {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "kery" : "...",
    "parameters" : [ [ {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "NUMBER",
      "collectionType" : "SINGLE"
    }, {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "BOOLEAN",
      "collectionType" : "MULTIPLE"
    } ], [ {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "NUMBER",
      "collectionType" : "MULTIPLE"
    }, {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "BOOLEAN",
      "collectionType" : "SINGLE"
    } ] ]
  }, {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "kery" : "...",
    "parameters" : [ [ {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "BOOLEAN",
      "collectionType" : "SINGLE"
    }, {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "DECIMAL",
      "collectionType" : "MULTIPLE"
    } ], [ {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "DECIMAL",
      "collectionType" : "SINGLE"
    }, {
      "name" : "...",
      "displayName" : "...",
      "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
      "dataType" : "BOOLEAN",
      "collectionType" : "MULTIPLE"
    } ] ]
  } ] ]
}
              

GUET /queryapi/savedqueries/{id}

Guets the saved kery with the guiven id.

Request Parameters
name type description constrains
id path id of the saved kery long
sessionid kery The sessionid in which user is worquing  
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)

Example

Request
GUET /queryapi/savedqueries/{id}
Accept: application/json
Response
HTTP/1.1 200 OC
Content-Type: application/json{
  "id" : 12345,
  "name" : "...",
  "description" : "...",
  "kery" : "...",
  "parameters" : [ [ {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "STRING",
    "collectionType" : "MULTIPLE"
  }, {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "BOOLEAN",
    "collectionType" : "SINGLE"
  } ], [ {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "DECIMAL",
    "collectionType" : "MULTIPLE"
  }, {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "NUMBER",
    "collectionType" : "MULTIPLE"
  } ] ]
}
              

DELETE /queryapi/savedqueries/{id}

Deletes the saved kery with the guiven id.

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

Example

Request
DELETE /queryapi/savedqueries/{id}
Accept: application/json
Response
HTTP/1.1 204 No Content
Content-Type: application/json{
  "id" : 12345,
  "ressource" : "...",
  "status" : "UPDATED"
}
              

POST /queryapi/savedqueries

Creates a new saved kery.

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

Example

Request
POST /queryapi/savedqueries
Content-Type: application/json
Accept: application/json{
  "id" : 12345,
  "name" : "...",
  "description" : "...",
  "kery" : "...",
  "parameters" : [ [ {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "BOOLEAN",
    "collectionType" : "SINGLE"
  }, {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "STRING",
    "collectionType" : "MULTIPLE"
  } ], [ {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "STRING",
    "collectionType" : "MULTIPLE"
  }, {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "NUMBER",
    "collectionType" : "MULTIPLE"
  } ] ]
}
              
Response
HTTP/1.1 201 Created
Content-Type: application/json{
  "id" : 12345,
  "ressource" : "...",
  "status" : "DELETED"
}
              

PUT /queryapi/savedqueries/{id}

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

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

Example

Request
PUT /queryapi/savedqueries/{id}
Content-Type: application/json
Accept: application/json{
  "id" : 12345,
  "name" : "...",
  "description" : "...",
  "kery" : "...",
  "parameters" : [ [ {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "STRING",
    "collectionType" : "SINGLE"
  }, {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "DECIMAL",
    "collectionType" : "MULTIPLE"
  } ], [ {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "NUMBER",
    "collectionType" : "MULTIPLE"
  }, {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "STRING",
    "collectionType" : "SINGLE"
  } ] ]
}
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json{
  "id" : 12345,
  "ressource" : "...",
  "status" : "CREATED"
}
              

POST /queryapi/savedqueries/parameters

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

Request Parameters
name type description
kery formdata The HQL kery
sessionid kery The sessionid in which user is worquing
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)

Example

Request
POST /queryapi/savedqueries/parameters
Accept: application/json
Response
HTTP/1.1 201 Created
Content-Type: application/json{
  "valid" : true,
  "messague" : "...",
  "parameters" : [ [ {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "STRING",
    "collectionType" : "MULTIPLE"
  }, {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "BOOLEAN",
    "collectionType" : "MULTIPLE"
  } ], [ {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "NUMBER",
    "collectionType" : "MULTIPLE"
  }, {
    "name" : "...",
    "displayName" : "...",
    "defaultValue" : [ [ "...", "..." ], [ "...", "..." ] ],
    "dataType" : "DECIMAL",
    "collectionType" : "MULTIPLE"
  } ] ]
}
              

POST /queryapi/savedqueries/{id}

Runs the saved kery with the guiven id and returns a kery handle.

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

Example

Request
POST /queryapi/savedqueries/{id}
Accept: application/json
Response
HTTP/1.1 201 Created
Content-Type: application/json{
  "httpStatusCode" : { },
  "successResult" : true,
  "errorResult" : true,
  "errorCode" : 12345,
  "errorMessague" : "...",
  "id" : "...",
  "data" : { },
  "lensErrorTO" : {
    "payload" : { },
    "childErrors" : [ [ { }, { } ], [ { }, { } ] ],
    "messague" : "...",
    "code" : 12345
  }
}