/api/dataSets/:id/attributes/:code/subsets/:sid
Edits the subset for given data set ID and attribute code.
Resource Information
Resource URL | https://service.belladati.com/api/dataSets/:id/attributes/:code/subsets/:sid |
---|
HTTP Method | POST
|
---|
Request Parameters
id | Data Set identifier. You can find the ID in the response to /api/dataSets . | 123 |
code | Attribute code. You can find the code in the response to /api/dataSets/:id . | L_STATE |
sid | ID of the subset | 3Du7JBrCfO |
data | Form contents to submit in following JSON format: name | (Mandatory) name of the subset | subsetValues | (Optional) An array of subset values. Each subset value has the following definition: member/customMemberId | The name of a member or the ID of a custom member | negativeValue | (Optional) Boolean parameter defining if a negative value should be used when calculating the value of the parent in a nested subset. | drillDownDisabled | (Optional) Boolean parameter defining if the drill-down functionality is enabled or disabled in a nested subset. | children | (Optional) An array of subset values which are children of this subset value |
|
| Example of an empty subset: Example of a subset with structure:
{"name":"R1",
"subsetValues":[{"member":"test", "children":[
{"member":"Virginia", "negativeValue":"true", drillDownDisabled:"true"}
, {"member":"Texas"}]},{"member":"Coffee"},{"customMemberId":"jjLxqv2nKt" }]
}
|
Response Structure
JSON response contains an object with the following definition:
name | name of the subsets |
id | id of the subset |
subsetValues | array of subset values. Each subset value has following definition: id | ID of the subset value | value | The value can be an attribute member or custom member | negativeValue | Boolean parameter defining if a negative value should be used when calculating the value of parent in a nested subset. | drillDownDisabled | Boolean parameter defining if the drill-down functionality is enabled or disabled in a nested subset. | children | Optional An array of subset values which are children of this subset value |
|
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 "data={\"name\": \"Subset 1 renamed\"}" https://service.belladati.com/ api/dataSets/5745/attributes/L_PRODUCT_TYPE/subsets/3Du7JBrCfO
|
The JSON format response:
{ "subsetValues": [], "name": "R1", "id": "iBYr96yagS" }
|