Skip to main content

Batch Service

The batch resource is a service to batch update objects

Batch REST API

The Batch REST API is a full CRUD API allowing you to batch update objects.

It is accessed through the following URL:

https://api.opendatadsl.com/api/batch
MethodPathExampleDescription
GETGet the build information for this service
GET{release}v1List all batch summaries
GET{release}/{id}v1/a757b7cc-ed3b-41f5-b5dd-30330b967416Get a specific batch summary
POST{release}v1Send an array of objects to be updated
DELETE{release}/{id}v1/a757b7cc-ed3b-41f5-b5dd-30330b967416Delete a batch summary

Batch Update

NameDescriptionType
_idUnique id for the batchString
_typeAlways 'VarBatch'String
elementsAn array of upjects to be updatedList

Example

{
"_id": "00006d91-0fa0-481a-8118-7d6c1f4dba8f",
"_type": "VarBatch",
"elements": [
{
"_id": "AAA",
"example": "property"
}
]
}

Batch Summary

NameDescriptionType
_idUnique id for the batch summaryString
userThe user who updated the batchString
environmentThe data environment the data was loaded toString
timestampThe date time the batch was updatedString
serviceThe name of the serviceString
nameThe name of the loaderString
reasonA reason why the batch was updatedString
sourceThe source the data was loaded toString
statusThe status of the uploaded batchString
messageAn information message about the uploaded batchString
summaryA summary of the loaded itemsObject

Example

{
"_id": "0000083d-ff3e-45f0-8ee5-b4442ef41355",
"user": "user@example.com",
"environment": "production",
"timestamp": "2024-01-06T16:20:27.433",
"service": "ETL",
"name": "AEMO_NEM_POWER_5MIN_PRICE_AND_DEMAND_EVENTS",
"reason": "Update Batch",
"source": "private",
"status": "success",
"message": "Completed Successfully",
"summary": {
"curves": {},
"failures": {},
"series": {},
"matrix": {},
"events": {
"2024-01-06": [
"AEMO.5MIN.PRICE_AND_DEMAND:FORECAST",
"AEMO.5MIN.PRICE_AND_DEMAND:ACTUAL"
]
}
}
}

Examples

In the following examples {{url}} is the batch REST URL:

https://api.opendatadsl.com/api/batch
### Get build info
GET {{url}}/batch
Authorization: Bearer {{token}}

### List batch summaries
GET {{url}}/batch/v1
Authorization: Bearer {{token}}

### List batch summaries for a named loader
GET {{url}}/batch/v1?name=AEMO_NEM_POWER_5MIN_PRICE_AND_DEMAND_EVENTS
Authorization: Bearer {{token}}

### Get a batch summary
GET {{url}}/batch/v1/0000083d-ff3e-45f0-8ee5-b4442ef41355
Authorization: Bearer {{token}}

### Send a batch of objects
POST {{url}}/batch/v1
Authorization: Bearer {{token}}

{
"_id": "00006d91-0fa0-481a-8118-7d6c1f4dba8f",
"_type": "VarBatch",
"elements": [
{
"_id": "AAA",
"example": "property"
}
]
}