インポート呼び出しサンプル
Varicent IncentivesAPIを使用して、テーブルインポートに関する情報の取得や保存されたインポートの実行など、データインポートに関連するアクションを実行します。
データインポート情報の取得
この呼び出しを使用して、Varicent Incentivesテーブルのインポートに関するすべての情報を取得します。
リクエスト
GET - api/v1/imports
サンプル呼び出し
curl -X GET -H "Authorization: Bearer API_KEY" -H "Model: YOUR_CLIENT_MODEL” -H "Content-Type: application/json" https:// YOUR_ICM10_API_SERVER_ADDRESS/api/v1/imports
サンプルレスポンス
[{ "name": "YOUR_IMPORT_NAME", "importType": "Text", "hasHeader": true, "table": "YOUR_TABLE_NAME", "columnMatchings": { "columns": [ "Text", "Date", "Numeric", "Email" ], "matched" [ "Text", "Date", "Numeric", "Email" ] }, "dateFormat": "MonthFirst", "listSubitems": [], "subitemMap": {}, "addMember": false, "updateExistingRows": true, "tableType": "Custom", "isLocal": false, "useIncrementalImport": false, "culture": "en-US", "tableEffectiveDated": false, "isODBCTextDriver": false, "version": { "rowVersion": 1705010 }, "importId": 52, "filename": "YOUR_IMPORT_FILE_NAME", "delimiter": "\t", "queryTimeout": 0, "userSelected": false, "sandbox": false, "codePage": 0, "ignoreFirst": false, "ignoreLast": false, "recordLength": 0 }]
保存したインポートを実行
この呼び出しを使用して、Varicent Incentivesで保存されたインポートを実行します。
リクエスト
POST - api/v1/rpc/imports/{YOUR_IMPORT_ID}/run
注記
インポートIDは、ImportId
フィールドのGET - api/v1/imports
呼び出しのレスポンスから取得できます。
サンプル呼び出し
curl -X GET -H "Authorization: Bearer API_KEY" -H "Model: YOUR_CLIENT_MODEL” -H "Content-Type: application/json" https:// YOUR_ICM10_API_SERVER_ADDRESS/api/v1/imports/{YOUR_IMPORT_ID}/run
サンプルレスポンス
{ "completedactivities": "api/v1/completedactivities/[ProgressId]", "liveactivities": "api/v1/liveactivities/[ProgressId]" }