Batches and BatchRuns

{ApiServerUrl}/${namespace}/Batch/latest?...

Each Batch is identified by its id field.

A BatchRun represents each time a Batch is sent through the platform. For daily batches, this means a new BatchRun is created each day. A BatchRun has a batch field referencing the Batch being run, and an id field that uniquely identifies the BatchRun instance. BatchRun instances are accessible through the API using this URL:

{ApiServerUrl}/${namespace}/BatchRun/latest?...

The above URL returns all batch runs that have been sent through the platform. To get recent batch runs, include a from parameter:

/${namespace}/Batch/latest?from=DATE&rangeField=asOf...

Where DATE is moment specified using ISO8601 syntax, such as 2017-03-04Z. In this case the above URL returns all batch runs that have been sent through the platform since 4 March 2017.

Tip: To retrieve batches as they are published, S&P Global recommends polling continuously for new BatchRuns. When a new BatchRun id appears, request the latest batch data using URLs similar to the following:

/${namespace}/${entity}/batchRunId/batchrun?...

The above /batchrun URL returns all ${entity} records for any given batch run, identified by the BatchRun id.

Important: The BatchRun entity field statusIdentifier is deprecated. Do not build application logic using this field.

Back to help overview