/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.
{
	"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:

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.

  • No labels