Function: createImportSchedule()
ts
function createImportSchedule(
client,
parameters,
options?
): Promise<{
[key: string]: unknown;
collectionId?: string;
created?: Date;
id?: string;
importSourceId?: string;
runInterval?: string & object | "ONCE" | "DAILY" | "WEEKLY" | "MONTHLY";
startTime?: Date;
updated?: Date;
}>;Defined in: src/assets/api/importSources.ts:285
Creates a new scheduled import configuration for the specified import source. Scheduled imports allow you to automate data imports on a recurring basis (daily, weekly, monthly) or run them once at a specific time.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { callbackUrl?: string | null; importSourceId: string; runInterval: string & object | "ONCE" | "DAILY" | "WEEKLY" | "MONTHLY"; startTime: unknown; } | - |
parameters.callbackUrl? | string | null | Optional webhook URL to call after each scheduled import execution. The URL will receive a POST request with execution status. |
parameters.importSourceId? | string | The ID of the import source to schedule |
parameters.runInterval? | string & object | "ONCE" | "DAILY" | "WEEKLY" | "MONTHLY" | The frequency of the scheduled import. ONCE: runs only at startTime. DAILY: runs every day at the specified time. WEEKLY: runs every 7 days. MONTHLY: runs on the same day of each month. |
parameters.startTime? | unknown | The date and time when the first import should execute, in ISO 8601 format (e.g., '2024-01-15T02:00:00Z'). Must be in the future. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; collectionId?: string; created?: Date; id?: string; importSourceId?: string; runInterval?: string & object | "ONCE" | "DAILY" | "WEEKLY" | "MONTHLY"; startTime?: Date; updated?: Date; }>