QAS_EXECUTEQRYPOLL_REST_GET

This service operation runs the query request in the Process Scheduler. This service operation should be used for long running queries or queries with large result sets. The query is executed in batch mode through Integration Broker asynchronous servers (Pub/Sub) and the Process Schedulers.

When a client request for QAS_EXECUTEQRYPOLL_REST_GET is received by the Integration Broker, the following occurs:

  1. An asynchronous one way service operation which gets processed by Integration Broker.

  2. The query instance ID (transaction ID) is returned to the requester. The requester can use the query instance to poll for the status (QAS_QUERYSTATUS_REST_GET) and to retrieve the query results (QAS_GETQUERYRESULTS_REST_GET).

  3. The service operation schedules the application engine program QASEXEQRY in the Process Scheduler.

The user ID in the request header must have permission to execute the QASEXEQRY application engine program, as well as permission for the service operation. The PeopleSoft delivered role QAS Admin grants the necessary permissions.

Element Name Description

QueryName

Query name

It is a required variable.

OwnerType

Query owner type, public or private in either uppercase or lowercase.

It is a required variable.

OutResultType

Select the output type. Valid values are:

  • WEBROWSET

  • XMLP

  • EXCEL

  • HTML

It is a required variable.

OutResultFormat

Select the output format. Valid values are:

  • FILE

  • NONFILE

It is a required variable.

isConnectedQuery

Indicate whether this is a connected query. Valid values are Y or N in either upper or lower case.

It is a required variable.

MaxRow

The maximum number of rows to be fetched.

It is a required variable.

BlockSizeKB

If the output format is nonfile, indicate the block size to use for chunking the response. BlockSizeKB is a number of length 10 with a decimal position of 0. Block size is in bytes.

It is a required variable.

Prompt_PSQueryName

This field is used only for Connected Query. Enter the name of the query containing the prompt.

Prompt_UniquePromptName

Unique prompt name defined in the query. This value is case-sensitive.

Prompt_FieldValue

Field value for the prompt. This value is case-sensitive.

FilterFields

List of field names to be returned. This value is case sensitive and must be the unique field name as returned by the service operation QAS_LISTQUERYFIELDS.

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-8 Example of an URI template

{OwnerType}/{QueryName}/{OutResultType}/{OutResultFormat}?isconnectedquery=
{isConnectedQuery}&maxrows={MaxRow}&blocksize={BlockSizeKB}&prompt_psqueryname=
{Prompt_PSQueryName*}&prompt_uniquepromptname={Prompt_UniquePromptName*}
&prompt_fieldvalue={Prompt_FieldValue*}&filterfields={FilterFields*}
&json_resp={json_response}

Example Request:

https://<servername>:<port>/PSIGW/RESTListeningConnector/<defaultlocal node>/ExecuteQueryPoll.v1/public/MESSAGES_FOR_MSGSET/WEBROWSET/NONFILE?isconnectedquery=N&maxrows=1000&blocksize=500&prompt_uniquepromptname=MESSAGE_SET_NBR&prompt_fieldvalue=28&filterfields=A.MESSAGE_SET_NBR,A.MESSAGE_NBR,A.MSG_SEVERITY,A.MESSAGE_TEXT

Example Response:


<?xml version="1.0"?>
<QAS_EXEQRYSYNCPOLL_RESP_MSG xmlns="http://xmlns.oracle.com/Enterprise/
Tools/schemas/QAS_EXEQRYSYNCPOLL_RESP_MSG.VERSION_1">
    <QAS_EXEQRYSYNCPOLL_RESP>
        <PTQASWRK class="R" xmlns="http://xmlns.oracle.com/Enterprise/
         Tools/schemas/QAS_EXEQRYSYNCPOLL_RESP.VERSION_1">
            <QueryInstance>fbf8a6f3-f1b8-11e3-b37c-9e8b0079144b</QueryInstance>
        </PTQASWRK>
    </QAS_EXEQRYSYNCPOLL_RESP>
</QAS_EXEQRYSYNCPOLL_RESP_MSG>

Note:

Use the service operation QAS_QUERYSTATUS_REST_GET to get the status of the scheduled Query process, and QAS_GETQUERYRESULTS_REST_GET to retrieve the query results. These are detailed further below, under “Retrieving Query Results” section.

Example Response when json_response=true:

{"status": "success","data": {"queryInstance": "971968ee-032a-11e5-ae7b-e5e5391e9b13"}}