Run APIs in Batches
post
/api/core/Batch/execute
Runs the batch of APIs specified in the body as elements in an array.
Request
There are no request parameters for this operation.
Supported Media Types
- application/json
Root Schema : schema
Type:
Show Source
object
-
Actions: array
Actions
Array of objects having API requests defined in them
Nested Schema : Actions
Type:
array
Array of objects having API requests defined in them
Show Source
Nested Schema : items
Type:
Show Source
object
-
api: string
API endpoint to be executedExample:
/broker/services
-
data: object
data
Request body for the API
-
dynamicData: object
dynamicData
Variables whose values change dynamically as the batch file is executed
-
forEach: object
forEach
Object denoting a loop over an array of variables to call an API for each of them
-
method: string
The particular method in the API to be calledExample:
read
-
response: array
response
Array of variables whose values need to be populated from the API response
Nested Schema : data
Type:
object
Request body for the API
Example:
{
"ExampleKey":"ExampleValue"
}
Nested Schema : dynamicData
Type:
object
Variables whose values change dynamically as the batch file is executed
Example:
{
"ExampleKey":"ExampleValue"
}
Nested Schema : forEach
Type:
object
Object denoting a loop over an array of variables to call an API for each of them
Example:
{
"from":"jobIDs",
"varName":"jobID"
}
Nested Schema : response
Type:
array
Array of variables whose values need to be populated from the API response
Show Source
Example:
[
{
"varName":"serverID",
"fieldName":"ServerID"
}
]
Response
Supported Media Types
- application/json
200 Response
Successful operation
Nested Schema : SuccessfulGetOperation
Type:
Show Source
object
-
message: string
The response message.Example:
Loaded 1 entries
-
success: boolean
Whether the operation was a success (true) or a failure (false).Example:
true
Nested Schema : coreBatchExecuteResponseBody
Type:
Show Source
object
-
api: string
API endpoint from which the response is returnedExample:
/broker/services
-
method: string
The particular method in the API that was calledExample:
read
-
request: object
request
A combined object having properties of both data and dynamicData from the request body
-
response: object
response
Response object from the API called
Nested Schema : request
Type:
object
A combined object having properties of both data and dynamicData from the request body
Example:
{
"fromData":"value1",
"fromDynamicData":"value2"
}
Nested Schema : response
Type:
object
Response object from the API called
Example:
{
"success":true,
"message":"example",
"data":[
]
}
Default Response
Failed operation
Root Schema : schema
Type:
Show Source
object
-
errors: array
errors
The list of errors reported. Validation errors will be keyed by record field.
-
message: string
The response message.Example:
Exception thrown
-
success: boolean
Whether the operation was a success (true) or a failure (false).Example:
false
Nested Schema : errors
Type:
array
The list of errors reported. Validation errors will be keyed by record field.
Show Source
Nested Schema : items
Type:
object