QAS_GETQUERYRESULTS_REST_GET
This service operation is used only to retrieve the query results for the QAS_EXECUTEQRYPOLL_REST_GET service call. Query results are stored either in message segments or in a file. Segments can contain rows of data (nonrowset-based messages). When the query result is stored in a file, QAS will return the URL of the file location.
Request Message: QAS_GETQUERYRESULTS_TEMPL
| Element Name | Description |
|---|---|
|
BlockNumber |
The number of blocks to be retrieved. It is a required variable. Query result is retrieved starting from block 1 in sequential order until the final block is retrieved. Note: The block that contains status finalBlockRetrieved is the final block. |
|
QueryInstance |
Query instance ID. It is a required variable. |
|
json_response |
Enter true for JSON response type; enter false for standard XML response. If no value is provided, the default is standard XML response. |
Example 4-9 Example of an URI template
-
getresults?blocknumber={BlockNumber}&instanceid={QueryInstance}&json_resp={json_response} -
getresults?blocknumber={BlockNumber}&instanceid={QueryInstance}
Example Request:
https://<servername>:<port>/PSIGW/RESTListeningConnector/<defaultlocal
node>/QueryResults.v1/getresults?blocknumber=1&instanceid=acae80e8-2f99-11e3-95a9-8782b6a978ba
Response Message: QAS_GETQUERYRESULTS_RESP_MSG
| Element Name | Description |
|---|---|
|
FILEURL |
Returns FILE URL. |
|
status |
If the output format is file, the return status will be either success or failure. If the output format is non file the return status will be one of the following:
|
Example Response:
<?xml version="1.0"?>
<QAS_GETQUERYRESULTS_RESP_MSG xmlns="http://xmlns.oracle.com/Enterprise/
Tools/schemas/QAS_GETQUERYRESULTS_RESP_MSG.VERSION_2">
<query numrows="10" queryname="" xmlns="http://xmlns.oracle.com/
Enterprise/Tools/schemas/QAS_QUERYRESULTS_XMLP_RESP.VERSION_1">
<row rownumber="1">
<MESSAGE_SET_NBR>1</MESSAGE_SET_NBR>
<DESCR>
<![CDATA[PeopleTools Message Bar Items]]>
</DESCR>
</row>
<row rownumber="2">
<MESSAGE_SET_NBR>2</MESSAGE_SET_NBR>
<DESCR>
<![CDATA[PeopleCode]]>
</DESCR>
</row>
<row rownumber="3">
<MESSAGE_SET_NBR>3</MESSAGE_SET_NBR>
<DESCR>
<![CDATA[General Tools Messages]]>
</DESCR>
</row>
<row rownumber="4">
<MESSAGE_SET_NBR>4</MESSAGE_SET_NBR>
<DESCR>
<![CDATA[Help Processor]]>
</DESCR>
</row>
<row rownumber="5">
<MESSAGE_SET_NBR>5</MESSAGE_SET_NBR>
<DESCR>
<![CDATA[Help Text Manager]]>
</DESCR>
</row>
<row rownumber="6">
<MESSAGE_SET_NBR>6</MESSAGE_SET_NBR>
<DESCR>
<![CDATA[Import Definition Manager]]>
</DESCR>
</row>
<row rownumber="7">
<MESSAGE_SET_NBR>7</MESSAGE_SET_NBR>
<DESCR>
<![CDATA[Open Query API]]>
</DESCR>
</row>
<row rownumber="8">
<MESSAGE_SET_NBR>8</MESSAGE_SET_NBR>
<DESCR>
<![CDATA[PeopleCode Editor]]>
</DESCR>
</row>
<row rownumber="9">
<MESSAGE_SET_NBR>9</MESSAGE_SET_NBR>
<DESCR>
<![CDATA[Menu Definition Manager]]>
</DESCR>
</row>
<row rownumber="10">
<MESSAGE_SET_NBR>10</MESSAGE_SET_NBR>
<DESCR>
<![CDATA[Change Control]]>
</DESCR>
</row>
</query>
<QAS_QUERYRESULTS_STATUS_RESP xmlns="http://xmlns.oracle.com/Enterprise/
Tools/schemas/QAS_QUERYRESULTS_STATUS_RESP.VERSION_2">
<status>finalBlockRetrieved</status>
</QAS_QUERYRESULTS_STATUS_RESP>
</QAS_GETQUERYRESULTS_RESP_MSG>
Example Response using json_response=true:
Example Request following Query Poll Get Request to run a Query to HTML/FILE:
{"status": "success","data": {"fileurl": "http:\/\/myserver.example.com\/psreports\/Q8551093\/312\
/MESSAGES_FOR_MSGSET.html","status": "posted"}}