/api/dataSets/:id/attributes/:code/customMembers/:cmidEdits an existing custom member for given data set ID and attribute code. Resource InformationResource URL | https://service.belladati.com/api/dataSets/:id/attributes/:code/customMembers/:cmid |
---|
HTTP Method | POST
|
---|
Request Parametersid | 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 | cmid | ID of the custom member | 22fyrmwIMY | data | Form contents to submit in following JSON format: name | name of the custom member | alias | alias of the custom member (optional) | formula | formula of the custom member (optional) |
|
Code Block |
---|
{"name": "custommember", "alias": "firstCM", "formula": "return firstValue('L_ABC')"} |
|
Response StructureJSON response contains one JSON object with following elements:
name | name of the custom member | alias | alias of the custom member (optional) | formula | formula of the custom member (optional) | id | id of the custom member |
Sample Request / ResponseUsing 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\": \"asd\", "\alias\": \"gghgh\", \"formula\": \"return 10000\}" https://service.belladati.com/ api/dataSets/5745/attributes/L_PRODUCT_TYPE/customMembers/22fyrmwIMY
|
The JSON format response: { "name": "custommember", "alias": "CM_alias", "formula": "", "id": "22fyrmwIMY" }
|
If the provided formula is not valid, the endpoint will return status 406 Not Acceptable with response "FORMULA_NOT_VALID". |