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 in a data set that match on given parameters.

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

dataRows

Array of data rows in JSON format with following definition:

NameDescription
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.


[

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

]

matchAttributesArray of attributes of a row to match on. These attributes will be used in WHERE query and won't be updated. All rows that have the same set of attributes will be updated by the row.[ "L_COUNTRY" ]


Sample Request / Response

Using curl:

Code Block
curl -X PATCH -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\"}],matchAttributes:[\"L_COUNTRY\"]}" https://service.belladati.com/api/dataSets/123/data

When the rows have been updated successfully, a response has the HTTP status code 200 and a content "OK".


Sv translation
languageja

/api/dataSets/:id/data

指定されたパラメーターに一致するデータセット内の既存の行を更新します。

リソース情報

リソースURL

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

HTTPメソッド

PATCH

リクエストパラメーター

パラメーター

詳細

id

データを変更するデータセットのID。IDは/api/dataSetsへのレスポンスで確認できます。

123

dataRows

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

説明
L_*

属性値。行の更新中に元の値を保持するには、リクエストに属性名を含めないでください。空の値を設定するには、値として空の文字列またはnullを指定します。

M_*

インジケータ値。行の更新中に元の値を保持するには、リクエストにインジケータ名を含めないでください。空の値を設定するには、値として空の文字列またはnullを指定します。


[

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

]

matchAttributes

一致する行の属性の配列。これらの属性はWHEREクエリで使用され、更新されません。同じ属性のセットを持つすべての行は、その行によって更新されます。

[ "L_COUNTRY" ]


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

curl使用:

Code Block
curl -X PATCH -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\"}],matchAttributes:[\"L_COUNTRY\"]}" https://service.belladati.com/api/dataSets/123/data

行が正常に更新されると、レスポンスにはHTTPステータスコード200と "OK" コンテンツが含まれます。