同期レコード検証
レイクにレコードをコミットする前に、開発モードでペイロードを迅速に同期検証します。
この方法では、API インテグレーションに関する即時フィードバックを提供するためにオブジェクトペイロードの同期検証が提供されます。この機能は開発段階での使用のみが意図されています。検証が失敗した要求では、要求ペイロードの修正に必要な詳細が API 応答により提供されます。検証を通過した要求では、ペイロードは下流で保持されません。
- URI
- /api/v1/ingest/sources/{name}/{object-name}/actions/test
- 適用開始バージョン
- Data Cloud v1.0、Salesforce v51.0
- 形式
- JSON
- HTTP のメソッド
- POST
- 認証
- Authorization: Bearer access_token
- リクエストボディ
-
1curl --location --request POST 'https://{instance_url}/api/v1/ingest/sources/ntotest/exercises/actions/test' \ 2--header 'Authorization: Bearer {access_token}' \ 3--header 'Content-Type: application/json' \ 4--data-raw '{ 5"data": [ 6{"id": "f19cae7e-5cdb-41ce-92ba-539afea04f9d","contact_name": "Joe Smith","created_date": "2021-07-22T08:57:08.118Z","tax_exempt": false,"ship_address": "9818 Main","total": 77506,"tax_rate": 84,"modified_date": "2021-07-05T09:31:44.457Z"},{"id": "48c8b6a6-8179-4a15-ba19-ec5c8206ce28","contact_name": "Tina Smith","created_date":"2021-07-08T22:57:02.008Z","tax_exempt": false,"ship_address": "245 Main","total": 16986,"tax_rate": 61,"modified_date": "2021-07-03T06:20:52.886Z"} 7 8] 9} 10' - 要求パラメータ
-
パラメータ 説明 Content-Type application/json name 取り込み API データコネクタの名前。 object-name Data Cloud に送信するリソース種別の名前。 - レスポンスボディ
-
1{ 2 "timestamp": "2021-08-20T16:34:26.047666Z", 3 "error": "Bad Request", 4 "message": "Bad Request: JSON is properly formatted but has a mismatch with Schema.", 5 "path": "uri=/api/v1/ingest/sources/ecomm/Orders/actions/test", 6 "tenantId": "{tenantId}", 7 "internalErrorCode": "COMMON_ERROR_GENERIC", 8 "details": { 9 "validationReport": [{ 10 "record": "{\"contact_name\":\"Joe Smith\",\"total\":77506,\"tax_exempt\":false,\"id\":\"f19cae7e-5cdb-41ce-92ba-539afea04f9d\",\"created_date\":\"2021-07-22T08:57:08.118Z\",\"ship_address\":\"9818 Main\",\"modified_date\":\"2021-07-05T09:31:44.457Z\",\"tax_rate\":84}", 11 "causingExceptions": ["#/id: expected type: Number, found: String"] 12 }, { 13 "record": "{\"contact_name\":\"Tina Smith\",\"total\":16986,\"tax_exempt\":false,\"id\":\"48c8b6a6-8179-4a15-ba19-ec5c8206ce28\",\"created_date\":\"2021-07-08T22:57:02.008Z\",\"ship_address\":\"245 Main\",\"modified_date\":\"2021-07-03T06:20:52.886Z\",\"tax_rate\":61}", 14 "causingExceptions": ["#/id: expected type: Number, found: String"] 15 }] 16 } 17}リクエストボディの検証が失敗した場合、レスポンスボディで validationReport を調べて、失敗したレコードと失敗の理由を確認します。