スケジューラー呼び出しサンプル
Varicent IncentivesAPIを使用して、スケジューラータスクの実行など、スケジューラー・モジュールに関連するアクションを実行します。
スケジューラータスクのリストを取得する
この呼び出しを使用して、Varicent Incentivesのスケジューラータスクとサブタスクのリストを取得します。
リクエスト
GET /api/v1/scheduleitem
サンプル呼び出し
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/scheduleitem
サンプルレスポンス
[ { "id": 1, "name": "Nightly Tasks", "scheduleItemType": "Folder", "order": 0, "lastRun": "2012-09-06T05:01:10.177Z", "lastRunStatus": "Success", "activation": "Enabled", "nextRun": "0001-01-01T00:00:00", "childScheduleItems": [ { "id": 2, "name": "Optimize Model", "scheduleItemType": "Optimize", "order": 0, "lastRun": "2012-09-06T05:00:57.127Z", "lastRunStatus": "Success", "activation": "Enabled", "nextRun": "0001-01-01T00:00:00", "parent": 1, "settings": { "schedulerSettingsId": 0, "scheduleItemId": 2, "emailOnFailure": false, "emailOnSuccess": false, "stopOnFailure": false, "stopToolOnTimeout": false, "isGlobal": false, "overrideChildSettings": false, "successEmails": [], "failEmails": [], "externalToolTimeout": 0, "enableRetries": false, "version": { "rowVersion": 1801131 } }, "version": { "rowVersion": 1785024 } },
スケジューラータスクの実行
この呼び出しを使用して、Varicent Incentivesのスケジューラータスクまたはサブタスクを実行します。
リクエスト
POST api/v1/rpc/scheduleitem/{Scheduler item ID}/run
サンプル呼び出し
curl -X POST -H "Authorization: Bearer API_KEY" -H "Model: YOUR_CLIENT_MODEL” -H "Content-Type: application/json" https:// YOUR_ICM10_API_SERVER_ADDRESS/api/v1/rpc/scheduleitem/{Scheduler item ID}/run
サンプルレスポンス
{ "completedactivities": "api/v1/completedactivities/23845", "liveactivities": "api/v1/liveactivities/23845" }