Skip to main content

QueryAsyncResults

Will retrieve all completed asynchronous jobs that were made using the Async API. This methed can be polled for jobs until there are no remaining jobs to process.
The Async API is used by setting up the OESIS Framework with the appropriate configuration value for WAAPI_CONFIG_ASYNC_API_MODE. Depending on that configuration setting the 'async_job' key may then be needed to perform asynchronous calls.
This call will return WAAPI_OK_MORE_RESULTS if there are still more async jobs to be processed.

Syntax​

Method ID​

#define WAAPI_MID_QUERY_ASYNC_RESULTS 5

JSON Input Structure​

{
"input": {
"method": 5
}
}

Input Properties​

This method does not require any additional parameters beyond the method ID.

JSON Output Structure​

{
"result": {
"method": 5,
"code": number,
"timing": number,
"timestamp": string,
"async_results": [
{
"async_job_id": string
},
...
]
}
}

Output Properties​

PropertyTypeDescription
result.methodnumberThe method ID that generated this result.
result.codenumberThe result code. See Result Codes.
result.timingnumberThe measured time for the method call in milliseconds.
result.timestampstringThe timestamp in seconds of when the call was made.
result.async_resultsarray<object>An array of results objects where each object in the array is the result from an async invoke call. Each object will be identical to the 'result' key's object, except it will contain one additional key, 'async_job_id'.
result.async_results.async_job_idstringThe asynchronous job identifier. This key corresponds to the 'async_job_id' returned from the async invoke call. If desired, this allows a mapping to be created between the invoke and result. Any mapping will only be valid until wa_api_teardown is called since ids are not unique across sessions.

Result Codes​

CodeNameDescription
0WAAPI_OKThe operation completed successfully.
note

Other codes may be returned. See the full Result Codes reference for the complete list.

Remarks​

Error Handling​

The results of this function are determined by the error code returned by the call. If successful, WAAPI_OK or a special success code will be returned. Always check both the function return value and the result.code field in the output JSON.

Examples​

Examples will be added here demonstrating the usage of this method.

See Also​


Last updated: 2026-10-01