media type | data type |
---|---|
text/plain | (custom) |
GET /queryapi/savedqueries/health Accept: text/plain
HTTP/1.1 200 OK
Content-Type: text/plain
...
Gets a list of saved queries matching the criteria (url parameters) windowed by count and start.
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 |
media type | data type |
---|---|
application/x-www-form-urlencoded | (custom) |
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 Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
{
"offsetAppplied" : 12345,
"totalCount" : 12345,
"resoures" : [ [ {
"id" : 12345,
"name" : "...",
"description" : "...",
"query" : "...",
"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" : "...",
"query" : "...",
"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" : "...",
"query" : "...",
"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" : "...",
"query" : "...",
"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"
} ] ]
} ] ]
}
Gets the saved query with the given id.
name | type | description | constraints |
---|---|---|---|
id | path | id of the saved query | long |
sessionid | query | The sessionid in which user is working |
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) |
GET /queryapi/savedqueries/{id} Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
{
"id" : 12345,
"name" : "...",
"description" : "...",
"query" : "...",
"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"
} ] ]
}
Deletes the saved query with the given id.
name | type | description | constraints |
---|---|---|---|
id | path | id of the saved query | long |
sessionid | query | The sessionid in which user is working |
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) |
DELETE /queryapi/savedqueries/{id} Accept: application/json
HTTP/1.1 204 No Content
Content-Type: application/json
{
"id" : 12345,
"resource" : "...",
"status" : "UPDATED"
}
Creates a new saved query.
name | type | description |
---|---|---|
sessionid | query | The sessionid in which user is working |
media type | data type | description |
---|---|---|
application/json | SavedQuery (JSON) | Saved query object |
application/json | SavedQuery (JSON) | |
application/xml | savedQuery (XML) |
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
Content-Type: application/json
Accept: application/json
{
"id" : 12345,
"name" : "...",
"description" : "...",
"query" : "...",
"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"
} ] ]
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"id" : 12345,
"resource" : "...",
"status" : "DELETED"
}
Updates the saved query {id} with the new payload.
name | type | description | constraints |
---|---|---|---|
id | path | long | |
sessionid | query | The sessionid in which user is working |
media type | data type | description |
---|---|---|
application/json | SavedQuery (JSON) | Saved query object |
application/json | SavedQuery (JSON) | |
application/xml | savedQuery (XML) |
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}
Content-Type: application/json
Accept: application/json
{
"id" : 12345,
"name" : "...",
"description" : "...",
"query" : "...",
"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"
} ] ]
}
HTTP/1.1 204 No Content
Content-Type: application/json
{
"id" : 12345,
"resource" : "...",
"status" : "CREATED"
}
Parses the query and returns parameters that are found in the query.
name | type | description |
---|---|---|
query | formdata | The HQL query |
sessionid | query | The sessionid in which user is working |
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/parameters Accept: application/json
HTTP/1.1 201 Created
Content-Type: application/json
{
"valid" : true,
"message" : "...",
"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"
} ] ]
}
Runs the saved query with the given id and returns a query handle.
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 |
media type | data type | description |
---|---|---|
application/json | LensAPIResult (JSON) | LensAPIResult containing the query handle |
application/json | LensAPIResult (JSON) | |
application/xml | lensAPIResult (XML) |
POST /queryapi/savedqueries/{id} Accept: application/json
HTTP/1.1 201 Created
Content-Type: application/json
{
"httpStatusCode" : { },
"successResult" : true,
"errorResult" : true,
"errorCode" : 12345,
"errorMessage" : "...",
"id" : "...",
"data" : { },
"lensErrorTO" : {
"payload" : { },
"childErrors" : [ [ { }, { } ], [ { }, { } ] ],
"message" : "...",
"code" : 12345
}
}