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/dataSources/:id/schedule

Posts a data source execution schedule to the data source with the specified ID.

Resource Information

Request Parameters

Parameters

Detail

Example

id

ID of the data source for which to schedule an execution. You can find the ID in the response to /api/dataSets/:id/dataSources.

123

params

Execution parameters in JSON format with following definition:

NameDescription
when

Date and time when first execution of import should run.

When set to "now", the import is executed immediately.

overwrite

(Optional) Action description to perform with existing data. If this element is not specified then existing data remains unchanged and new data rows will be appended.

NameDescription
policyOverwrite action to perform with existing data - please see list of supported values.
dateAttribute(Optional) Code of attribute that should be used for date compare.
dateFrom(Optional) Date specifying start date of data rows to overwrite. Format: "yyyy-MM-dd"
dateTo(Optional) Date specifying end date of data rows to overwrite. Format: "yyyy-MM-dd"
attributesAllBoolean flag indicating if data in for attributes should be overwritten.
attributes(Optional) Array containing codes of attributes that should be overwritten.


repeateInterval

(Optional) Period of import execution - please see list of supported values. If this element is not specified then import will be performed only once.

customRepeateIntervalMandatory only if "repeateInterval" has value "CUSTOM". Specifies custom repeat interval in minutes.



Code Block
{
	"when" : "Fri, 16 Aug 2013 12:56:50 GMT",
	"overwrite": {
		"policy": "DELETE_ALL",
		"dateAttribute": "L_DATE_ATTRIBUTE_CODE",
		"dateFrom": "2013-08-06",
		"dateTo": "2013-08-20",
		"attributesAll" : true,
		"attributes" : [
			"L_ATTRIBUTE_1",
			"L_ATTRIBUTE_2"
		]
	},
    "repeateInterval" : "CUSTOM",
    "customRepeateInterval" : 30
}


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 "params={\"when\" : \"Fri, 16 Aug 2013 12:56:50 GMT\", \"policy\" : \"DELETE_ALL\", \"overwriteFrom\" : \"Fri, 16 Aug 2013\", \"overwriteTo\" : \"Fri, 20 Aug 2013\", \"overwriteDateAttribute\" : \"L_DATE_ATTRIBUTE_CODE\", \"overwriteAttributes\" : [ { \"L_ATTRIBUTE\" }, { \"L_ATTRIBUTE_2\" } ], \"overwriteAttributesAll\" : \"true\", \"repeateInterval\" : \"CUSTOM\", "customRepeateInterval" : 30}" https://service.belladati.com/api/dataSets/dataSources/123/schedule

When the schedule has been posted successfully, the response has the HTTP status code 200 and the content is the ID of the execution.

Sv translation
languageja

/api/dataSets/dataSources/:id/schedule

指定されたIDを持つデータソースにデータソース実行スケジュールを投稿します。

リソース情報

リクエストパラメーター

パラメーター

詳細

id

実行をスケジュールするためのデータソースのID。/api/dataSets/:id/dataSourcesに応答して、IDを見つけることができます。

123

params

次の定義を持つJSON形式の実行パラメーター:

詳細
when実行必要にする最初の実行インポート日付と時間。
overwrite

(任意)既存のデータで実行するアクションの説明。この要素が指定されていない場合、既存のデータは変更されず、新しいデータ行が追加されます。

説明
policy既存のデータで実行するアクションを上書きする - サポートされる値のリストをご参照してください。
dateAttribute(オプション) 日付比較に使用される属性のコード。
dateFrom(オプション) 上書きするデータ行の開始日を指定する日付。フォーマット:"yyyy-MM-dd"
dateTo(オプション) 上書きするデータ行の終了日を指定する日付。フォーマット:"yyyy-MM-dd"
attributesAll属性のデータを上書き場合に示すブールフラグ。
attributes(オプション) 上書きすべき属性のコードを含む配列。


repeateInterval

(オプション) インポートの実行期間 - サポートされる値のリストをご参照してください。この要素が指定されていない場合、インポートは1回だけ実行されます。

customRepeateInterval"repeateInterval" の値が "CUSTOM" の場合にのみ必須です。カスタムリピート間隔を分単位で指定します。



Code Block
{
	"when" : "Fri, 16 Aug 2013 12:56:50 GMT",
	"overwrite": {
		"policy": "DELETE_ALL",
		"dateAttribute": "L_DATE_ATTRIBUTE_CODE",
		"dateFrom": "2013-08-06",
		"dateTo": "2013-08-20",
		"attributesAll" : true,
		"attributes" : [
			{ "L_ATTRIBUTE_1" },
			{ "L_ATTRIBUTE_2" }
		]
	},
    "repeateInterval" : "CUSTOM",
    "customRepeateInterval" : 30
}


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

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 "params={\"when\" : \"Fri, 16 Aug 2013 12:56:50 GMT\", \"overwritingPolicy\" : \"DELETE_ALL\", \"overwriteFrom\" : \"Fri, 16 Aug 2013\", \"overwriteTo\" : \"Fri, 20 Aug 2013\", \"overwriteDateAttribute\" : \"L_DATE_ATTRIBUTE_CODE\", \"overwriteAttributes\" : [ { \"L_ATTRIBUTE\" }, { \"L_ATTRIBUTE_2\" } ], \"overwriteAttributesAll\" : \"true\", \"repeateInterval\" : \"CUSTOM\", "customRepeateInterval" : 30}" https://service.belladati.com/api/dataSets/dataSources/123/schedule

スケジュールが正常に送信されると、レスポンスはHTTPステータスコードは200になり、コンテンツは実行IDになります。