/api/dataSets/:id/replace
Deletes data based on a filter and then inserts new row in data set specified by ID.
Resource Information
Resource URL | |
---|---|
HTTP Method |
|
Consumes | application/json |
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 | ||||||
| One data row in JSON format with following definition:
|
| ||||||
filter | Filter used to delete data. Prefix (PT) can be used when join contains columns with the same names. See the complete list of Filter operation types. conditionType (optional) is used to define condition operator between conditions. Available values:
Searching part of String: use '%' wildcard to search selected String in data set values. E.g. "value": "%al%" | {"drilldown":{"L_COUNTRY":{"op":"EQ","value":"USA"}}} |
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\", Content-Type=\"application/json\"" -d "{dataRows:[\"L_COUNTRY\":\"Great Britain\",\"M_REVENUE\":\"1234.5678\"}],filter:{\"drilldown\":{\"L_COUNTRY\":{\"op\":\"EQ\",\"value\":\"USA\"}}}}" https://service.belladati.com/api/dataSets/123/replace
When data has been deleted and new rows added successfully, the response has the HTTP status code 200 and the content "OK".
Overview
Content Tools