Run a User-Defined Query Synchronously
Use a synchronous request when the query completes quickly and the calling application requires the result immediately.
-
Identify the enabled user-defined query that you want to run.
-
If the query includes parameters, obtain the required parameter names and values.
-
Submit a
POSTrequest to therunExtractendpoint.POST /fscmRestApi/scm/redwood/11.13.18.05/runExtract
Request Example
{
"UserDefinedQueryName": "PendingInvoiceSync",
"Type": "ORA_SYNC",
"Parameters": {
"pOrgCode": "M1",
"pWoNumber": "M1-1100"
}
}
Response Example
{
"Type": "ORA_SYNC",
"ExecutionId": "300100679988222",
"ExtractDefinitionName": null,
"UserDefinedQueryName": "PendingInvoiceSync",
"CallbackFlag": null,
"OutputFormat": null,
"Parameters": {
"pOrgCode": "M1",
"pWoNumber": "M1-1100"
},
"RequestId": null,
"Status": "Success",
"Result": [
{
"woWorkOrderNumber": "M1-1100",
"woId": 2448,
"woOrganizationId": 207,
"woOrganizationCode": "M1",
"nextOperationNum": 400,
"releasedDate": "2017-02-28T17:02:10Z"
}
]
}
The response includes the query output in the Result attribute.