Running Batch Rules

Executes a batch of jobs that have been defined in Data Management .

Prerequisites

  • The batch must be defined in Data Management before it can be executed using the REST API.

  • You must have the required privileges to execute a specific batch.

REST Resource

POST /aif/rest/{api_version}/jobs

Required Roles

Service Administrator, Power User

Request

Supported Media Types: application/json

The following table summarizes the client request.

Table 16-7 Parameters

Name Description Type Required Default
api_version Version of the API you are working with, such as V1 Path Yes None
jobType should be set to "BATCH"   Yes None
jobName The name of a batch defined in Data Management.   Yes None

Example URL

https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/aif/rest/V1/jobs

Example of Request Body

{"jobType":"BATCH",
"jobName":"BatchDataLoad"
}

Response

The following table summarizes the response parameters.

Table 16-8 Parameters

Name Description

status

Status of the job: -1 = in progress; 0 = success; 1 = error; 2 = cancel pending; 3 = cancelled; 4 = invalid parameter

jobStatus

A text representation of the job status, with one of the following values "RUNNING", "SUCCESS". "FAILED"

jobId

The process Id generated in Data Management for the job

logFileName

Log File containing entries for this execution.

outputFileName

Name of the output file generated, if any.

processType

Type of the process executed. Will contain "COMM_BATCH" for all Data Rule executions

executedBy

Login name of the user used to execute the rule.

details

Returns the exception stack trace in case of an application error

Supported Media Types: application/json

Example of Response Body

The following shows an example of the response body in JSON format.

{
    "jobStatus": "SUCCESS"
"jobId": 2016
"logFileName": "\outbox\logs\BATCH1_7595.log"
"outputFileName": null
"processType": "COMM_BATCH"
"executedBy": "admin"
"status": -1
"links": [1]
    0:  {
    "rel": "self"
    "href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/aif/rest/V1/jobs/2016"
    "action": "GET"
}
"details": null
}

For sample code, see the code samples included in Running Data Rules in Data Management.