/api/dataSets/:id/data

Updates existing row in a data set that match on given parameters.

Resource Information

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

dataRows

Array of data rows in JSON format with following definition:

NameDescription
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.

[

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

]

matchAttributesArray of attributes of a row to match on. These attributes will be used in WHERE query and won't be updated. All rows that have the same set of attributes will be updated by the row.[ "L_COUNTRY" ]


Sample Request / Response

Using curl:

curl -X PATCH -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\", Content-Type=\"application/json\"" -d "{dataRows:[\"L_COUNTRY\":\"Great Britain\",\"M_REVENUE\":\"1234.5678\"}],matchAttributes:[\"L_COUNTRY\"]}" https://service.belladati.com/api/dataSets/123/data

When the rows have been updated successfully, a response has the HTTP status code 200 and a content "OK".


  • No labels