/api/dataSets/:id/data

Updates existing row or inserts new row in data set.

Resource Information

Resource URL

https://service.belladati.com/api/dataSets/:id/data

HTTP Method

POST

Request Parameters

Parameters

Detail

Example
id
ID of the data set to modify data in. You can find the ID in the response to /api/dataSets.123

dataRow

One data row in JSON format with following definition:

NameDescription
id(Optional) UID of the data row. You can find the UID in the response to /api/dataSets/:id/data. If not present, new data row will be inserted, otherwise existing row with this UID will be updated.
L_*Attribute value. To keep original value while updating row, don't include attribute name in the request. To set empty value, provide either empty string or null as value.
M_*Indicator value. To keep original value while updating row, don't include indicator name in the request. To set empty value, provide either empty string or null as value.


{
  "id": "456",
  "L_COUNTRY""Great Britain",
  "M_REVENUE": "1234.5678"
}


Sample Request / Response

Using curl:

curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" -d "dataRow={\"id\":\"456\",\"L_COUNTRY\":\"Great Britain\",\"M_REVENUE\":\"1234.5678\"}" https://service.belladati.com/api/dataSets/123/data

When the row has been updated/added successfully, the response has the HTTP status code 200 and the content "OK".


When there is no attribute/indicator value to update or add, the response has the HTTP status code 200 and the content "Nothing to insert".