Skip to content

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 ​

ParameterTypeDescription
clientClient-
parameters{ callbackUrl?: string | null; importSourceId: string; runInterval: string & object | "ONCE" | "DAILY" | "WEEKLY" | "MONTHLY"; startTime: unknown; }-
parameters.callbackUrl?string | nullOptional webhook URL to call after each scheduled import execution. The URL will receive a POST request with execution status.
parameters.importSourceId?stringThe 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?unknownThe 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; }>