Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed translated content for 'zh'
Sv translation
languageen

/api/dataSets/:id/attributes/:code/subsets/create

Create a new subset for given data set ID and attribute code.

Resource Information

Resource URL

https://service.belladati.com/api/dataSets/:id/attributes/:code/subsets/create

HTTP Method

POST

Request Parameters

idData Set identifier. You can find the ID in the response to /api/dataSets.123
codeAttribute code. You can find the code in the response to /api/dataSets/:id.L_STATE
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/customMemberIdThe 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:

Code Block
{"name":"Subset 1"}

Example of a subset with structure:

Code Block
{"name":"R1",
"subsetValues":[{"member":"test", "children":[
{"member":"Virginia", "negativeValue":"true", drillDownDisabled:"true"}
, {"member":"Texas"}]},{"member":"Coffee"},{"customMemberId":"jjLxqv2nKt" }]
}


Response Structure

JSON response contains one JSON object with the following element:


idID of the new subset


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\"}" https://service.belladati.com/api/dataSets/5745/attributes/L_PRODUCT_TYPE/subsets/create


The JSON format response:

{
    "id""j3KE8bj7jc"
}



Sv translation
languageja

/api/dataSets/:id/attributes/:code/subsets/create

指定されたデータセットIDと属性コードの新しいサブセットを作成します。

リソース情報

リソースURL

https://service.belladati.com/api/dataSets/:id/attributes/:code/subsets/create

HTTPメソッド

POST

リクエストパラメーター

パラメーター詳細
id

データセット識別子。 IDは、/api/dataSetsへのレスポンスで確認できます。

123
code

属性コード。このコードは、/api/dataSets/:idへのレスポンスで確認できます。

L_STATE
data

次のJSON形式で送信するフォームの内容:

説明
name(必須) サブセットの名前
subsetValues

(オプション)

サブセット値の配列。各サブセット値には、次の定義があります:

member/customMemberId

メンバーの名前またはカスタムメンバーのID

negativeValue

(オプション) nested subsetの親の値を計算するときに、負の値を使用する必要があるかどうかを定義するBooleanパラメーター。

drillDownDisabled

(オプション) nested subsetでドリルダウン機能を有効にするか無効にするかを定義するBooleanパラメーター。

children

(オプション) このサブセット値の子であるサブセット値の配列。



空のサブセットの例:

Code Block
{"name":"Subset 1"}

構造を持つサブセットの例:

Code Block
{"name":"R1",
"subsetValues":[{"member":"test", "children":[
{"member":"Virginia", "negativeValue":"true", drillDownDisabled:"true"}
, {"member":"Texas"}]},{"member":"Coffee"},{"customMemberId":"jjLxqv2nKt" }]
}


レスポンス構造

JSONレスポンスには、次の要素を持つ1つのJSONオブジェクトが含まれています:


説明
id新しいサブセットのID


サンプルリクエスト/レスポンス

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\"}" https://service.belladati.com/api/dataSets/5745/attributes/L_PRODUCT_TYPE/subsets/create


JSON形式のレスポンス:

{
    "id""j3KE8bj7jc"
}