Skip to content

Retrieve Asynchronous MDL Script Results

After submitting a request to deploy an MDL script asynchronously, you can query Vault to determine the results of the request.

Before submitting this request:

  • You must have previously requested a submission export job (via the API) which is no longer active.
  • You must have a valid job_id field value returned from the Execute MDL Script Asynchronously request.
GET/api/mdl/execute_async/{job_id}/results
NameDescription
Acceptapplication/json (default) or application/xml
NameDescription
{job_id}The job_id field value returned from the Execute MDL Script Asynchronously request.
curl -X GET -H "Authorization: {SESSION_ID}" \
https://myvault.veevavault.com/api/mdl/execute_async/138016/results
{
   "responseStatus": "SUCCESS",
   "script_execution": {
       "code": "GEN-S-0",
       "message": "OK",
       "warnings": 0,
       "failures": 0,
       "exceptions": 0,
       "components_affected": 1,
       "execution_time": 1.585
   },
   "statement_execution": [
       {
           "vault": "dev10platform.vaultdev.com",
           "statement": 1,
           "command": "ALTER",
           "component": "Object.10k_raw__c",
           "message": "[SUCCESS] ALTER Object 10k_raw__c",
           "response": "SUCCESS"
       }
   ]
}

On SUCCESS, this endpoint returns the results of the asynchronous MDL script execution, including any errors.