batch-definition

Stores the XML contents to a Batch definition on the Broker.

Example Request

POST http://example.com:8080/livecluster/rest/batch/batch-definition

Example Input

Parameters

Parameter Name

Data Type

Description

Sample Value

name

String

Name of Batch definition

NewCalculatorServiceExample
contents

String

XML contents of Batch definition

<?xml version="1.0" encoding="UTF-8"?>
<Batch class="com.datasynapse.
gridserver.batch.Batch">
<property name="name" value="CalculatorServiceExample" />
<property name="description" value="Batch Example that runs the Calculator Service" />
<property name="type" value="serial" />
<Schedule class="com.datasynapse.
gridserver.batch.Schedule">
<property name="type" value="Immediate" />
</Schedule>
<Command class="com.datasynapse.
gridserver.batch.command.
LogCommand"><property name="message" value="Starting Java Calculator Service Example" />
</Command>
<ServiceRunnerReference class="com.datasynapse.
gridserver.batch.
ServiceRunnerReference"><property name="name" value="JavaCalculatorRunnerExample" />
</ServiceRunnerReference>
<Command class="com.datasynapse.
gridserver.batch.command.
LogCommand"><property name="message" value="Done running Java Calculator Service Example" />
</Command>
</Batch>

Example Response

204 no content

Result: The Batch definition is added to the Broker.