Batch operation to overwrite the given scope with the specified records.
Path Elements
+table
string
|
The URI path to a specific table (whether
by ID
or
by name).
|
Extended description
The response's records
array will contain only the non-expired records from the request's
records
array.
Furthermore, the order of elements in the response's records
array is guaranteed to be exactly
the same as the
order of corresponding reference elements in the request's records
array.
The same restrictions apply to each record in the request, as would apply when calling the
non-batch create request
to the specified table.
Note that a single large batch is not necessarily the most optimal
request. Smaller batches that are sent in parallel on multiple connections will generally
perform better than a single maximally-sized request. Ideal performance optimization
needs to weigh the trade-off between batch size and request volume.
The response header pros-scope-expired-count
indicates the number of expired records that were part
of the request and omitted due to data retention limits.
This header is only returned when the status code is 200 and expired records are present in the request,
otherwise the header is omitted.
Example
- Batch Request to create multiple new records for a single scope in the same table
Request:
{
"records":[
{
"start": "2014-04-14T10:05:43",
"end": "2014-05-18T20:14:21",
"values" : [
{
"name" : "Forecasted Volume",
"value" : "17.26172",
"unit" : "cubic feet",
"perQuantity" : 1
},
{
"name" : "Historic Revenue",
"value" : "15.27181",
"currency" : "USD"
"perQuantity" : 0
},
{
"name" : "Product Cost",
"value" : "7.97181",
"unit" : "Each",
"currency" : "DKR",
"perQuantity" : 1
},
{
"name" : "Competitor Influence",
"value" : "High"
}
]
},
{
"start": "2014-06-01T12:05:43",
"end": "2014-09-18T22:14:21",
"values" : [
{
"name" : "Forecasted Volume",
"value" : "20.26172",
"unit" : "cubic feet",
"perQuantity" : 1
},
{
"name" : "Historic Revenue",
"value" : "6.27181",
"currency" : "USD",
"perQuantity" : 0
},
{
"name" : "Product Cost",
"value" : "8.97181",
"unit" : "Each",
"currency" : "DKR",
"perQuantity" : 1
},
{
"name" : "Competitor Influence",
"value" : "Medium"
}
]
}
]
}
Response:
HTTP/1.1
200
OK
{
"tableID" : "bb18498a-3228-425a-816c-481bac1030ca",
"key": [
{
"aspectID": "816022f0-8648-11ea-a21a-bf5ce690da27",
"aspectName": "CITY",
"dimID": "7f128970-8648-11ea-a21a-bf5ce690da27",
"dimName": "LARGE_CITIES",
"nodeID": "8e40f350-8648-11ea-a21a-bf5ce690da27",
"nodeName": "US-TX-Houston"
},
{
"aspectID": "913522f0-8648-11ea-a21a-455ce690da27",
"aspectName": "UPC",
"dimID" : "28484058-4ffc-329b-94ff-63e1ddbd7189",
"dimName" : "SAMPLE_PRODUCTS",
"nodeID" : "27de4ae8-61be-3fff-a397-16362cafeba2",
"nodeName" : "0011491975135"
}
],
"records":
[
{
"start": "2014-04-14T10:05:43",
"end": "2014-05-18T20:14:21",
"values" :
[
{
"name" : "Forecasted Volume",
"value" : "17.26172",
"unit" : "cubic feet",
"perQuantity" : 1
},
{
"name" : "Historic Revenue",
"value" : "15.27181",
"currency" : "USD",
"perQuantity" : 0
},
{
"name" : "Product Cost",
"value" : "7.97181",
"unit" : "Each",
"currency" : "DKR",
"perQuantity" : 1
},
{
"name" : "Competitor Influence",
"value" : "High"
}
]
},
{
"start": "2014-06-01T12:05:43",
"end": "2014-09-18T22:14:21",
"values" : [
{
"name" : "Forecasted Volume",
"value" : "20.26172",
"unit" : "cubic feet",
"perQuantity" : 1
},
{
"name" : "Historic Revenue",
"value" : "6.27181",
"currency" : "USD",
"perQuantity" : 0
},
{
"name" : "Product Cost",
"value" : "8.97181",
"unit" : "Each",
"currency" : "DKR",
"perQuantity" : 1
},
{
"name" : "Competitor Influence",
"value" : "Medium"
}
]
}
]
}
Example
- Batch Request to create a valid record and expired record
Request:
{
"records":[
{
"start": "2014-04-14T10:05:43",
"end": "2014-05-18T20:14:21",
"values" : [
{
"name" : "Forecasted Volume",
"value" : "17.26172",
"unit" : "cubic feet",
"perQuantity" : 1
},
{
"name" : "Historic Revenue",
"value" : "15.27181",
"currency" : "USD",
"perQuantity" : 0
},
{
"name" : "Product Cost",
"value" : "7.97181",
"unit" : "Each",
"currency" : "DKR",
"perQuantity" : 1
},
{
"name" : "Competitor Influence",
"value" : "High"
}
]
},
{
"start": "1970-06-01T12:05:43",
"end": "1970-09-18T22:14:21",
"values" : [
{
"name" : "Forecasted Volume",
"value" : "20.26172",
"unit" : "cubic feet",
"perQuantity" : 1
},
{
"name" : "Historic Revenue",
"value" : "6.27181",
"currency" : "USD",
"perQuantity" : 0
},
{
"name" : "Product Cost",
"value" : "8.97181",
"unit" : "Each",
"currency" : "DKR",
"perQuantity" : 1
},
{
"name" : "Competitor Influence",
"value" : "Medium"
}
]
}
]
}
Response:
HTTP/1.1
200
OK
{
"tableID" : "bb18498a-3228-425a-816c-481bac1030ca",
"key": [
{
"aspectID": "816022f0-8648-11ea-a21a-bf5ce690da27",
"aspectName": "CITY",
"dimID": "7f128970-8648-11ea-a21a-bf5ce690da27",
"dimName": "LARGE_CITIES",
"nodeID": "8e40f350-8648-11ea-a21a-bf5ce690da27",
"nodeName": "US-TX-Houston"
},
{
"aspectID": "913522f0-8648-11ea-a21a-455ce690da27",
"aspectName": "UPC",
"dimID" : "28484058-4ffc-329b-94ff-63e1ddbd7189",
"dimName" : "SAMPLE_PRODUCTS",
"nodeID" : "27de4ae8-61be-3fff-a397-16362cafeba2",
"nodeName" : "0011491975135"
}
],
"records":[
{
"start": "2014-04-14T10:05:43",
"end": "2014-05-18T20:14:21",
"values" :
[
{
"name" : "Forecasted Volume",
"value" : "17.26172",
"unit" : "cubic feet",
"perQuantity" : 1
},
{
"name" : "Historic Revenue",
"value" : "15.27181",
"currency" : "USD",
"perQuantity" : 0
},
{
"name" : "Product Cost",
"value" : "7.97181",
"unit" : "Each",
"currency" : "DKR",
"perQuantity" : 1
},
{
"name" : "Competitor Influence",
"value" : "High"
}
]
}
]
}