POST v1/batches

Creates a new Batch. The Batch cotains a Naame and Description as well as optional properties such as the AppTag and Parameters that allow custom data to be sent to eh Api platform backend which can then take specific actions based on that data.<br/> The pattern to be followed is to first create a batch, send any Api commands and finally update the Batch, marking it's Status as 'defined'. The Batch status can be queried by getting the Batch based on its unique Id.

Request Information

URI Parameters

None.

Body Parameters

the detaiuls of the Batch to be created

Batch
NameDescriptionTypeAdditional information
Name

string

None.

AppTag

string

None.

Description

string

None.

Parameters

Dictionary of string [key] and string [value]

None.

ID

string

None.

Status

integer

None.

TimeoutMinutes

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "AppTag": "sample string 2",
  "Description": "sample string 3",
  "Parameters": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "ID": "sample string 4",
  "Status": 5,
  "TimeoutMinutes": 6
}

application/xml, text/xml

Sample:
<Batch xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AS.Models.API">
  <AppTag>sample string 2</AppTag>
  <Description>sample string 3</Description>
  <ID>sample string 4</ID>
  <Name>sample string 1</Name>
  <Parameters xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Parameters>
  <Status>5</Status>
  <TimeoutMinutes>6</TimeoutMinutes>
</Batch>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'Batch'.

Response Information

Resource Description

The newly created Batch along with a unique Id that can by used to track the Batch

PBPRReturnOfBatch
NameDescriptionTypeAdditional information
Data

Batch

None.

Success

Gets the success status of the API call

boolean

None.

Meta

Gets the optional meta-data

Dictionary of string [key] and string [value]

None.

Code

Get the http code of the API call e.g. 200, 202, 409

integer

None.

ErrorCode

Get the failure error code of the API call. This is available if Success is false

integer

None.

ErrorSubCode

Gets the error sub code if available

integer

None.

ErrorDescription

Gets a textual description of the error

string

None.

StatusUrl

Gets the status url for any ACCEPTed API commands. Any command (POST,DELETE,PATCh,PUT) to the API usually returns a 202 response code. The status of the command can be queried using the URL provided

string

None.

ContinuationToken

Gets the token to be used for paged queries

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "Meta": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "Code": 2,
  "ErrorCode": 3,
  "Data": {
    "Name": "sample string 1",
    "AppTag": "sample string 2",
    "Description": "sample string 3",
    "Parameters": {
      "sample string 1": "sample string 2",
      "sample string 3": "sample string 4"
    },
    "ID": "sample string 4",
    "Status": 5,
    "TimeoutMinutes": 6
  },
  "ErrorSubCode": 4,
  "ErrorDescription": "sample string 5",
  "StatusUrl": "sample string 6",
  "ContinuationToken": "wtSFmNDB7JC7iNbe35WDsQ%3D%3D"
}

application/xml, text/xml

Sample:
<PBPRReturnOfBatch7NMnQmOk xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AS.Models.API">
  <Code>2</Code>
  <ContinuationToken>wtSFmNDB7JC7iNbe35WDsQ%3D%3D</ContinuationToken>
  <ErrorCode>3</ErrorCode>
  <ErrorDescription>sample string 5</ErrorDescription>
  <ErrorSubCode>4</ErrorSubCode>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
  <StatusUrl>sample string 6</StatusUrl>
  <Success>true</Success>
  <Data>
    <AppTag>sample string 2</AppTag>
    <Description>sample string 3</Description>
    <ID>sample string 4</ID>
    <Name>sample string 1</Name>
    <Parameters xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 1</d3p1:Key>
        <d3p1:Value>sample string 2</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 3</d3p1:Key>
        <d3p1:Value>sample string 4</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Parameters>
    <Status>5</Status>
    <TimeoutMinutes>6</TimeoutMinutes>
  </Data>
</PBPRReturnOfBatch7NMnQmOk>