{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/algolia/main/json-schema/algolia-task-create-schema.json", "title": "TaskCreate", "description": "API request body for creating a task.", "x-generated": "2026-09-23", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/algolia-ingestion-api-openapi.yml#/components/schemas/TaskCreate", "type": "object", "additionalProperties": false, "properties": { "sourceID": { "$ref": "#/$defs/sourceID" }, "destinationID": { "$ref": "#/$defs/destinationID" }, "action": { "$ref": "#/$defs/ActionType" }, "subscriptionAction": { "$ref": "#/$defs/ActionType" }, "cron": { "$ref": "#/$defs/Cron" }, "enabled": { "type": "boolean", "description": "Whether the task is enabled." }, "failureThreshold": { "$ref": "#/$defs/failureThreshold" }, "input": { "$ref": "#/$defs/TaskInput" }, "cursor": { "$ref": "#/$defs/cursor" }, "notifications": { "$ref": "#/$defs/Notifications" }, "policies": { "$ref": "#/$defs/Policies" } }, "required": [ "sourceID", "destinationID", "action" ], "$defs": { "ActionType": { "type": "string", "description": "Action to perform on the Algolia index.", "enum": [ "replace", "save", "partial", "partialNoCreate", "append" ] }, "Cron": { "type": "string", "description": "Cron expression for the task's schedule." }, "DockerStreams": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the stream to fetch the data from (e.g. table name)." }, "properties": { "type": "array", "description": "The properties of the stream to select (e.g. column).", "items": { "type": "string" } }, "syncMode": { "$ref": "#/$defs/DockerStreamsSyncMode" } }, "required": [ "name", "syncMode" ] }, "DockerStreamsInput": { "title": "Docker streams", "description": "The selected streams of an airbyte connector.", "type": "object", "properties": { "streams": { "type": "array", "items": { "$ref": "#/$defs/DockerStreams" } } }, "required": [ "streams" ], "x-discriminator-fields": [ "streams" ] }, "DockerStreamsSyncMode": { "type": "string", "description": "The strategy to use to fetch the data.", "enum": [ "incremental", "fullTable" ] }, "MappingFieldDirective": { "type": "object", "additionalProperties": false, "description": "Describes how a field should be resolved by applying a set of directives.", "properties": { "fieldKey": { "description": "Destination field key.", "type": "string" }, "value": { "type": "object", "additionalProperties": true, "description": "How the destination field should be resolved from the source." } }, "required": [ "fieldKey", "value" ] }, "MappingFormatSchema": { "type": "string", "description": "Mapping format schema.", "enum": [ "mappingkit/v1" ] }, "MappingInput": { "type": "object", "additionalProperties": false, "description": "Transformations to apply to the source, serialized as a JSON string.", "properties": { "format": { "$ref": "#/$defs/MappingFormatSchema" }, "actions": { "type": "array", "items": { "$ref": "#/$defs/MappingKitAction" } } }, "required": [ "format", "actions" ], "x-discriminator-fields": [ "format", "actions" ] }, "MappingKitAction": { "type": "object", "additionalProperties": false, "description": "Describes how a destination object should be resolved by means of applying a set of directives.", "properties": { "id": { "description": "ID to uniquely identify this action.", "type": "string" }, "enabled": { "description": "Whether this action has any effect.", "type": "boolean" }, "trigger": { "description": "Condition which must be satisfied to apply the action. If this evaluates to false, the action is not applied, and the process attempts to apply the next action, if any.", "type": "string" }, "fieldDirectives": { "type": "array", "items": { "$ref": "#/$defs/MappingFieldDirective" } } }, "required": [ "enabled", "trigger", "fieldDirectives" ] }, "Notifications": { "type": "object", "additionalProperties": false, "description": "Notifications settings for a task.", "properties": { "email": { "title": "emailNotifications", "type": "object", "additionalProperties": false, "properties": { "enabled": { "description": "Whether to send email notifications, note that this doesn't prevent the task from being blocked.", "type": "boolean" } } } }, "required": [ "email" ] }, "Policies": { "type": "object", "additionalProperties": false, "description": "Set of rules for a task.", "properties": { "criticalThreshold": { "description": "The number of critical failures in a row before blocking the task and sending a notification.", "type": "integer", "minimum": 1, "maximum": 10 } } }, "ShopifyInput": { "title": "Shopify input", "type": "object", "additionalProperties": false, "description": "Represents the required elements of the task input when using a `shopify` source.", "properties": { "metafields": { "type": "array", "items": { "$ref": "#/$defs/ShopifyMetafield" } }, "market": { "$ref": "#/$defs/ShopifyMarket" } }, "required": [ "metafields", "market" ] }, "ShopifyMarket": { "type": "object", "additionalProperties": false, "description": "Represents a market in Shopify.", "properties": { "countries": { "type": "array", "items": { "type": "string" } }, "currencies": { "type": "array", "items": { "type": "string" } }, "locales": { "type": "array", "items": { "type": "string" } } }, "required": [ "countries", "currencies", "locales" ] }, "ShopifyMetafield": { "type": "object", "additionalProperties": false, "description": "Represents a metafield in Shopify.", "properties": { "namespace": { "type": "string" }, "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "namespace", "key", "value" ] }, "StreamingInput": { "title": "Streaming input", "type": "object", "additionalProperties": false, "description": "Input for a `streaming` task whose source is of type `ga4BigqueryExport` and for which extracted data is continuously streamed.", "properties": { "mapping": { "$ref": "#/$defs/MappingInput" } }, "required": [ "mapping" ], "x-discriminator-fields": [ "mapping" ] }, "TaskInput": { "description": "Configuration of the task, depending on its type.", "oneOf": [ { "$ref": "#/$defs/StreamingInput" }, { "$ref": "#/$defs/DockerStreamsInput" }, { "$ref": "#/$defs/ShopifyInput" } ] }, "cursor": { "type": "string", "description": "Date and time when the last cursor was created, in RFC 3339 format." }, "destinationID": { "type": "string", "description": "Universally unique identifier (UUID) of a destination resource." }, "failureThreshold": { "type": "integer", "minimum": 0, "maximum": 100, "description": "Maximum accepted percentage of failures for a task run to finish successfully." }, "sourceID": { "type": "string", "description": "Universally uniqud identifier (UUID) of a source." } } }