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/data

Updates existing row or inserts new row in data set.

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

dataRow

One data row in JSON format with following definition:

NameDescription
id(Optional) UID of the data row. You can find the UID in the response to /api/dataSets/:id/data. If not present, new data row will be inserted, otherwise existing row with this UID will be updated.
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.


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


Sample Request / Response

Using curl:

Code Block
curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" -d "dataRow={\"id\":\"456\",\"L_COUNTRY\":\"Great Britain\",\"M_REVENUE\":\"1234.5678\"}" https://service.belladati.com/api/dataSets/123/data

When the row has been updated/added successfully, the response has the HTTP status code 200 and the content "OK".


When there is no attribute/indicator value to update or add, the response has the HTTP status code 200 and the content "Nothing to insert".


Sv translation
languageja

/api/dataSets/:id/data

データセットの既存の行を更新または新しい行を追加します。

リソース情報

リソース URL

https://service.belladati.com/api/dataSets/:id/data

HTTP メソッド

POST

リクエストパラメーター

パラメーター

詳細

id
編集するデータセットのID。IDは/api/dataSetsのレスポンスから取得することができます。123

dataRow

次の定義を持つJSON形式の1つのデータ行:

NameDescription
id(任意) データ行のUID。UIDは/api/dataSets/:id/dataのレスポンスから取得することができます。指定が無い場合は新しい行として挿入され、指定がある場合はUIDが一致する既存の行が更新されます。
L_*属性の値。更新の際に元のデータを保持するために属性の名前をリクエストに入れないでください。空値を設定する場合は空文字列またはnullを値に設定します。
M_*インジケーターの値。更新の際に元のデータを保持するためにインジケーターの名前をリクエストに入れないでください。空値を設定する場合は空文字列またはnullを値に設定します。


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


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

curl使用:

Code Block
curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" -d "dataRow={\"id\":\"456\",\"L_COUNTRY\":\"Great Britain\",\"M_REVENUE\":\"1234.5678\"}" https://service.belladati.com/api/dataSets/123/data

行の更新/追加に成功すると、レスポンスのHTTPステータスコードは200になり、コンテンツは"OK"になります。


更新または追加する属性/インジケーターが無い場合、レスポンスのHTTPステータスコードは200になり、コンテンツは"Nothing to insert"になります。