diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 1fab277d63..a40076b038 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -2270,6 +2270,276 @@ } } }, + "/_connector/_sync_job/{connector_sync_job_id}/_cancel": { + "put": { + "tags": [ + "connector.sync_job_cancel" + ], + "summary": "Cancels a connector sync job.", + "description": "Cancels a connector sync job.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/cancel-connector-sync-job-api.html" + }, + "operationId": "connector-sync-job-cancel", + "parameters": [ + { + "in": "path", + "name": "connector_sync_job_id", + "description": "The unique identifier of the connector sync job", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, + "/_connector/_sync_job/{connector_sync_job_id}": { + "get": { + "tags": [ + "connector.sync_job_get" + ], + "summary": "Returns the details about a connector sync job.", + "description": "Returns the details about a connector sync job.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-sync-job-api.html" + }, + "operationId": "connector-sync-job-get", + "parameters": [ + { + "in": "path", + "name": "connector_sync_job_id", + "description": "The unique identifier of the connector sync job", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connector._types:ConnectorSyncJob" + } + } + } + } + } + }, + "delete": { + "tags": [ + "connector.sync_job_delete" + ], + "summary": "Deletes a connector sync job.", + "description": "Deletes a connector sync job.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-sync-job-api.html" + }, + "operationId": "connector-sync-job-delete", + "parameters": [ + { + "in": "path", + "name": "connector_sync_job_id", + "description": "The unique identifier of the connector sync job to be deleted", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types:AcknowledgedResponseBase" + } + } + } + } + } + } + }, + "/_connector/_sync_job": { + "get": { + "tags": [ + "connector.sync_job_list" + ], + "summary": "Lists all connector sync jobs.", + "description": "Lists all connector sync jobs.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/{list}/list-connector-sync-jobs-api.html" + }, + "operationId": "connector-sync-job-list", + "parameters": [ + { + "in": "query", + "name": "from", + "description": "Starting offset (default: 0)", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "size", + "description": "Specifies a max number of results to get", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + }, + { + "in": "query", + "name": "status", + "description": "A sync job status to fetch connector sync jobs for", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/connector._types:SyncStatus" + }, + "style": "form" + }, + { + "in": "query", + "name": "connector_id", + "description": "A connector id to fetch connector sync jobs for", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "form" + }, + { + "in": "query", + "name": "job_type", + "description": "A comma-separated list of job types to fetch the sync jobs for", + "deprecated": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types:SyncJobType" + } + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types:ConnectorSyncJob" + } + } + }, + "required": [ + "count", + "results" + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "connector.sync_job_post" + ], + "summary": "Creates a connector sync job.", + "description": "Creates a connector sync job.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-sync-job-api.html" + }, + "operationId": "connector-sync-job-post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/_types:Id" + }, + "job_type": { + "$ref": "#/components/schemas/connector._types:SyncJobType" + }, + "trigger_method": { + "$ref": "#/components/schemas/connector._types:SyncJobTriggerMethod" + } + }, + "required": [ + "id" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/_types:Id" + } + }, + "required": [ + "id" + ] + } + } + } + } + } + } + }, "/_connector/{connector_id}/_api_key_id": { "put": { "tags": [ @@ -50055,6 +50325,129 @@ } ] }, + "connector._types:ConnectorSyncJob": { + "type": "object", + "properties": { + "cancelation_requested_at": { + "$ref": "#/components/schemas/_types:DateTime" + }, + "canceled_at": { + "$ref": "#/components/schemas/_types:DateTime" + }, + "completed_at": { + "$ref": "#/components/schemas/_types:DateTime" + }, + "connector": { + "$ref": "#/components/schemas/connector._types:SyncJobConnectorReference" + }, + "created_at": { + "$ref": "#/components/schemas/_types:DateTime" + }, + "deleted_document_count": { + "type": "number" + }, + "error": { + "type": "string" + }, + "id": { + "$ref": "#/components/schemas/_types:Id" + }, + "indexed_document_count": { + "type": "number" + }, + "indexed_document_volume": { + "type": "number" + }, + "job_type": { + "$ref": "#/components/schemas/connector._types:SyncJobType" + }, + "last_seen": { + "$ref": "#/components/schemas/_types:DateTime" + }, + "metadata": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "started_at": { + "$ref": "#/components/schemas/_types:DateTime" + }, + "status": { + "$ref": "#/components/schemas/connector._types:SyncStatus" + }, + "total_document_count": { + "type": "number" + }, + "trigger_method": { + "$ref": "#/components/schemas/connector._types:SyncJobTriggerMethod" + }, + "worker_hostname": { + "type": "string" + } + }, + "required": [ + "connector", + "created_at", + "deleted_document_count", + "id", + "indexed_document_count", + "indexed_document_volume", + "job_type", + "metadata", + "status", + "total_document_count", + "trigger_method" + ] + }, + "connector._types:SyncJobConnectorReference": { + "type": "object", + "properties": { + "configuration": { + "$ref": "#/components/schemas/connector._types:ConnectorConfiguration" + }, + "filtering": { + "$ref": "#/components/schemas/connector._types:FilteringConfig" + }, + "id": { + "$ref": "#/components/schemas/_types:Id" + }, + "index_name": { + "type": "string" + }, + "language": { + "type": "string" + }, + "pipeline": { + "$ref": "#/components/schemas/connector._types:IngestPipelineParams" + }, + "service_type": { + "type": "string" + } + }, + "required": [ + "configuration", + "filtering", + "id", + "index_name", + "service_type" + ] + }, + "connector._types:SyncJobType": { + "type": "string", + "enum": [ + "full", + "incremental", + "access_control" + ] + }, + "connector._types:SyncJobTriggerMethod": { + "type": "string", + "enum": [ + "on_demand", + "scheduled" + ] + }, "_types:WriteResponseBase": { "type": "object", "properties": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 6bfb8ac199..ab00978449 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -3355,6 +3355,204 @@ ], "visibility": "public" }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Cancels a connector sync job.", + "docId": "connector-sync-job-cancel", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cancel-connector-sync-job-api.html", + "name": "connector.sync_job_cancel", + "request": { + "name": "Request", + "namespace": "connector.sync_job_cancel" + }, + "requestBodyRequired": false, + "response": { + "name": "Response", + "namespace": "connector.sync_job_cancel" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/_sync_job/{connector_sync_job_id}/_cancel" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Deletes a connector sync job.", + "docId": "connector-sync-job-delete", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-connector-sync-job-api.html", + "name": "connector.sync_job_delete", + "request": { + "name": "Request", + "namespace": "connector.sync_job_delete" + }, + "requestBodyRequired": false, + "response": { + "name": "Response", + "namespace": "connector.sync_job_delete" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "DELETE" + ], + "path": "/_connector/_sync_job/{connector_sync_job_id}" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Returns the details about a connector sync job.", + "docId": "connector-sync-job-get", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-connector-sync-job-api.html", + "name": "connector.sync_job_get", + "request": { + "name": "Request", + "namespace": "connector.sync_job_get" + }, + "requestBodyRequired": false, + "response": { + "name": "Response", + "namespace": "connector.sync_job_get" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_connector/_sync_job/{connector_sync_job_id}" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Lists all connector sync jobs.", + "docId": "connector-sync-job-list", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{list}/list-connector-sync-jobs-api.html", + "name": "connector.sync_job_list", + "request": { + "name": "Request", + "namespace": "connector.sync_job_list" + }, + "requestBodyRequired": false, + "response": { + "name": "Response", + "namespace": "connector.sync_job_list" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_connector/_sync_job" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Creates a connector sync job.", + "docId": "connector-sync-job-post", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/create-connector-sync-job-api.html", + "name": "connector.sync_job_post", + "request": { + "name": "Request", + "namespace": "connector.sync_job_post" + }, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "connector.sync_job_post" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "POST" + ], + "path": "/_connector/_sync_job" + } + ], + "visibility": "public" + }, { "availability": { "serverless": { @@ -106399,6 +106597,221 @@ }, "specLocation": "connector/_types/Connector.ts#L130-L136" }, + { + "kind": "interface", + "name": { + "name": "ConnectorSyncJob", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "cancelation_requested_at", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateTime", + "namespace": "_types" + } + } + }, + { + "name": "canceled_at", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateTime", + "namespace": "_types" + } + } + }, + { + "name": "completed_at", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateTime", + "namespace": "_types" + } + } + }, + { + "name": "connector", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "SyncJobConnectorReference", + "namespace": "connector._types" + } + } + }, + { + "name": "created_at", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DateTime", + "namespace": "_types" + } + } + }, + { + "name": "deleted_document_count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "error", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + }, + { + "name": "indexed_document_count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "indexed_document_volume", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "job_type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "SyncJobType", + "namespace": "connector._types" + } + } + }, + { + "name": "last_seen", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateTime", + "namespace": "_types" + } + } + }, + { + "name": "metadata", + "required": true, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "user_defined_value" + } + } + }, + { + "name": "started_at", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateTime", + "namespace": "_types" + } + } + }, + { + "name": "status", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "SyncStatus", + "namespace": "connector._types" + } + } + }, + { + "name": "total_document_count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "trigger_method", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "SyncJobTriggerMethod", + "namespace": "connector._types" + } + } + }, + { + "name": "worker_hostname", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/_types/SyncJob.ts#L52-L71" + }, { "kind": "interface", "name": { @@ -107271,6 +107684,128 @@ ], "specLocation": "connector/_types/Connector.ts#L25-L28" }, + { + "kind": "interface", + "name": { + "name": "SyncJobConnectorReference", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "configuration", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ConnectorConfiguration", + "namespace": "connector._types" + } + } + }, + { + "name": "filtering", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "FilteringConfig", + "namespace": "connector._types" + } + } + }, + { + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + }, + { + "name": "index_name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "language", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "pipeline", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "IngestPipelineParams", + "namespace": "connector._types" + } + } + }, + { + "name": "service_type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/_types/SyncJob.ts#L31-L39" + }, + { + "kind": "enum", + "members": [ + { + "name": "on_demand" + }, + { + "name": "scheduled" + } + ], + "name": { + "name": "SyncJobTriggerMethod", + "namespace": "connector._types" + }, + "specLocation": "connector/_types/SyncJob.ts#L47-L50" + }, + { + "kind": "enum", + "members": [ + { + "name": "full" + }, + { + "name": "incremental" + }, + { + "name": "access_control" + } + ], + "name": { + "name": "SyncJobType", + "namespace": "connector._types" + }, + "specLocation": "connector/_types/SyncJob.ts#L41-L45" + }, { "kind": "interface", "name": { @@ -108159,6 +108694,382 @@ }, "specLocation": "connector/put/ConnectorPutResponse.ts#L22-L26" }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Cancels a connector sync job.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.sync_job_cancel" + }, + "path": [ + { + "description": "The unique identifier of the connector sync job", + "name": "connector_sync_job_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "connector/sync_job_cancel/SyncJobCancelRequest.ts#L22-L36" + }, + { + "body": { + "kind": "properties", + "properties": [ + { + "name": "result", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Result", + "namespace": "_types" + } + } + } + ] + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.sync_job_cancel" + }, + "specLocation": "connector/sync_job_cancel/SyncJobCancelResponse.ts#L22-L26" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Deletes a connector sync job.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.sync_job_delete" + }, + "path": [ + { + "description": "The unique identifier of the connector sync job to be deleted", + "name": "connector_sync_job_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "connector/sync_job_delete/SyncJobDeleteRequest.ts#L22-L36" + }, + { + "body": { + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.sync_job_delete" + }, + "specLocation": "connector/sync_job_delete/SyncJobDeleteResponse.ts#L22-L24" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Retrieves a connector sync job.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.sync_job_get" + }, + "path": [ + { + "description": "The unique identifier of the connector sync job", + "name": "connector_sync_job_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "connector/sync_job_get/SyncJobGetRequest.ts#L22-L36" + }, + { + "body": { + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "ConnectorSyncJob", + "namespace": "connector._types" + } + } + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.sync_job_get" + }, + "specLocation": "connector/sync_job_get/SyncJobGetResponse.ts#L22-L24" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Lists connector sync jobs.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.sync_job_list" + }, + "path": [], + "query": [ + { + "description": "Starting offset (default: 0)", + "name": "from", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Specifies a max number of results to get", + "name": "size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "A sync job status to fetch connector sync jobs for", + "name": "status", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SyncStatus", + "namespace": "connector._types" + } + } + }, + { + "description": "A connector id to fetch connector sync jobs for", + "name": "connector_id", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + }, + { + "description": "A comma-separated list of job types to fetch the sync jobs for", + "name": "job_type", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "SyncJobType", + "namespace": "connector._types" + } + } + } + } + ], + "specLocation": "connector/sync_job_list/SyncJobListRequest.ts#L25-L55" + }, + { + "body": { + "kind": "properties", + "properties": [ + { + "name": "count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "results", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "ConnectorSyncJob", + "namespace": "connector._types" + } + } + } + } + ] + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.sync_job_list" + }, + "specLocation": "connector/sync_job_list/SyncJobListResponse.ts#L23-L28" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "description": "The id of the associated connector", + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + }, + { + "name": "job_type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SyncJobType", + "namespace": "connector._types" + } + } + }, + { + "name": "trigger_method", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SyncJobTriggerMethod", + "namespace": "connector._types" + } + } + } + ] + }, + "description": "Creates a connector sync job.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.sync_job_post" + }, + "path": [], + "query": [], + "specLocation": "connector/sync_job_post/SyncJobPostRequest.ts#L23-L43" + }, + { + "body": { + "kind": "properties", + "properties": [ + { + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ] + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.sync_job_post" + }, + "specLocation": "connector/sync_job_post/SyncJobPostResponse.ts#L22-L26" + }, { "attachedBehaviors": [ "CommonQueryParameters" diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index a3cc933ef8..60c270fb5e 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -495,6 +495,12 @@ ], "response": [] }, + "connector.sync_job_delete": { + "request": [], + "response": [ + "response definition connector.sync_job_delete:Response / body / instance_of - Non-leaf type cannot be used here: '_types:AcknowledgedResponseBase'" + ] + }, "create": { "request": [], "response": [ diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 67fb1b317e..be1a9263bf 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9152,6 +9152,27 @@ export interface ConnectorConnectorScheduling { export type ConnectorConnectorStatus = 'created' | 'needs_configuration' | 'configured' | 'connected' | 'error' +export interface ConnectorConnectorSyncJob { + cancelation_requested_at?: DateTime + canceled_at?: DateTime + completed_at?: DateTime + connector: ConnectorSyncJobConnectorReference + created_at: DateTime + deleted_document_count: long + error?: string + id: Id + indexed_document_count: long + indexed_document_volume: long + job_type: ConnectorSyncJobType + last_seen?: DateTime + metadata: Record + started_at?: DateTime + status: ConnectorSyncStatus + total_document_count: long + trigger_method: ConnectorSyncJobTriggerMethod + worker_hostname?: string +} + export interface ConnectorCustomScheduling { configuration_overrides: ConnectorCustomSchedulingConfigurationOverrides enabled: boolean @@ -9267,6 +9288,20 @@ export interface ConnectorSelectOption { value: string } +export interface ConnectorSyncJobConnectorReference { + configuration: ConnectorConnectorConfiguration + filtering: ConnectorFilteringConfig + id: Id + index_name: string + language?: string + pipeline?: ConnectorIngestPipelineParams + service_type: string +} + +export type ConnectorSyncJobTriggerMethod = 'on_demand' | 'scheduled' + +export type ConnectorSyncJobType = 'full' | 'incremental' | 'access_control' + export interface ConnectorSyncRulesFeature { advanced?: ConnectorFeatureEnabled basic?: ConnectorFeatureEnabled @@ -9362,6 +9397,51 @@ export interface ConnectorPutResponse { result: Result } +export interface ConnectorSyncJobCancelRequest extends RequestBase { + connector_sync_job_id: Id +} + +export interface ConnectorSyncJobCancelResponse { + result: Result +} + +export interface ConnectorSyncJobDeleteRequest extends RequestBase { + connector_sync_job_id: Id +} + +export type ConnectorSyncJobDeleteResponse = AcknowledgedResponseBase + +export interface ConnectorSyncJobGetRequest extends RequestBase { + connector_sync_job_id: Id +} + +export type ConnectorSyncJobGetResponse = ConnectorConnectorSyncJob + +export interface ConnectorSyncJobListRequest extends RequestBase { + from?: integer + size?: integer + status?: ConnectorSyncStatus + connector_id?: Id + job_type?: ConnectorSyncJobType[] +} + +export interface ConnectorSyncJobListResponse { + count: long + results: ConnectorConnectorSyncJob[] +} + +export interface ConnectorSyncJobPostRequest extends RequestBase { + body?: { + id: Id + job_type?: ConnectorSyncJobType + trigger_method?: ConnectorSyncJobTriggerMethod + } +} + +export interface ConnectorSyncJobPostResponse { + id: Id +} + export interface ConnectorUpdateApiKeyIdRequest extends RequestBase { connector_id: Id body?: { diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index 64814d7eb3..d38b1efc78 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -78,6 +78,11 @@ cluster-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/c cluster-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster-update-settings.html cluster,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster.html common-options,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/common-options.html +connector-sync-job-cancel,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cancel-connector-sync-job-api.html +connector-sync-job-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-connector-sync-job-api.html +connector-sync-job-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-connector-sync-job-api.html +connector-sync-job-post,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/create-connector-sync-job-api.html +connector-sync-job-list,https://www.elastic.co/guide/en/elasticsearch/reference/{list}/list-connector-sync-jobs-api.html connector-checkin,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/check-in-connector-api.html connector-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-connector-api.html connector-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-connector-api.html diff --git a/specification/_json_spec/connector.sync_job_cancel.json b/specification/_json_spec/connector.sync_job_cancel.json new file mode 100644 index 0000000000..443ba76d0c --- /dev/null +++ b/specification/_json_spec/connector.sync_job_cancel.json @@ -0,0 +1,27 @@ +{ + "connector.sync_job_cancel": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/cancel-connector-sync-job-api.html", + "description": "Cancels a connector sync job." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/_sync_job/{connector_sync_job_id}/_cancel", + "methods": ["PUT"], + "parts": { + "connector_sync_job_id": { + "type": "string", + "description": "The unique identifier of the connector sync job to be canceled" + } + } + } + ] + } + } +} diff --git a/specification/_json_spec/connector.sync_job_delete.json b/specification/_json_spec/connector.sync_job_delete.json new file mode 100644 index 0000000000..32de4b18a1 --- /dev/null +++ b/specification/_json_spec/connector.sync_job_delete.json @@ -0,0 +1,27 @@ +{ + "connector.sync_job_delete": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-sync-job-api.html", + "description": "Deletes a connector sync job." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/_sync_job/{connector_sync_job_id}", + "methods": ["DELETE"], + "parts": { + "connector_sync_job_id": { + "type": "string", + "description": "The unique identifier of the connector sync job to be deleted." + } + } + } + ] + } + } +} diff --git a/specification/_json_spec/connector.sync_job_get.json b/specification/_json_spec/connector.sync_job_get.json new file mode 100644 index 0000000000..52c2285cd0 --- /dev/null +++ b/specification/_json_spec/connector.sync_job_get.json @@ -0,0 +1,27 @@ +{ + "connector.sync_job_get": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-sync-job-api.html", + "description": "Returns the details about a connector sync job." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/_sync_job/{connector_sync_job_id}", + "methods": ["GET"], + "parts": { + "connector_sync_job_id": { + "type": "string", + "description": "The unique identifier of the connector sync job to be returned." + } + } + } + ] + } + } +} diff --git a/specification/_json_spec/connector.sync_job_list.json b/specification/_json_spec/connector.sync_job_list.json new file mode 100644 index 0000000000..7a58ea257d --- /dev/null +++ b/specification/_json_spec/connector.sync_job_list.json @@ -0,0 +1,45 @@ +{ + "connector.sync_job_list": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-sync-jobs-api.html", + "description": "Lists all connector sync jobs." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/_sync_job", + "methods": ["GET"] + } + ] + }, + "params": { + "from": { + "type": "int", + "default": 0, + "description": "Starting offset (default: 0)" + }, + "size": { + "type": "int", + "default": 100, + "description": "specifies a max number of results to get (default: 100)" + }, + "status": { + "type": "string", + "description": "Sync job status, which sync jobs are fetched for" + }, + "connector_id": { + "type": "string", + "description": "Id of the connector to fetch the sync jobs for" + }, + "job_type": { + "type": "list", + "description": "A comma-separated list of job types" + } + } + } +} diff --git a/specification/_json_spec/connector.sync_job_post.json b/specification/_json_spec/connector.sync_job_post.json new file mode 100644 index 0000000000..2fd0eb5577 --- /dev/null +++ b/specification/_json_spec/connector.sync_job_post.json @@ -0,0 +1,26 @@ +{ + "connector.sync_job_post": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-sync-job-api.html", + "description": "Creates a connector sync job." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/_sync_job", + "methods": ["POST"] + } + ] + }, + "body": { + "description": "The connector sync job data.", + "required": true + } + } +} diff --git a/specification/connector/_types/SyncJob.ts b/specification/connector/_types/SyncJob.ts new file mode 100644 index 0000000000..c8ac3deed2 --- /dev/null +++ b/specification/connector/_types/SyncJob.ts @@ -0,0 +1,71 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { Id } from '@_types/common' +import { long } from '@_types/Numeric' +import { DateTime } from '@_types/Time' +import { Dictionary } from '@spec_utils/Dictionary' +import { UserDefinedValue } from '@spec_utils/UserDefinedValue' +import { + ConnectorConfiguration, + FilteringConfig, + IngestPipelineParams, + SyncStatus +} from './Connector' + +interface SyncJobConnectorReference { + configuration: ConnectorConfiguration + filtering: FilteringConfig + id: Id + index_name: string + language?: string + pipeline?: IngestPipelineParams + service_type: string +} + +export enum SyncJobType { + full, + incremental, + access_control +} + +export enum SyncJobTriggerMethod { + on_demand, + scheduled +} + +export interface ConnectorSyncJob { + cancelation_requested_at?: DateTime + canceled_at?: DateTime + completed_at?: DateTime + connector: SyncJobConnectorReference + created_at: DateTime + deleted_document_count: long + error?: string + id: Id + indexed_document_count: long + indexed_document_volume: long + job_type: SyncJobType + last_seen?: DateTime + metadata: Dictionary + started_at?: DateTime + status: SyncStatus + total_document_count: long + trigger_method: SyncJobTriggerMethod + worker_hostname?: string +} diff --git a/specification/connector/sync_job_cancel/SyncJobCancelRequest.ts b/specification/connector/sync_job_cancel/SyncJobCancelRequest.ts new file mode 100644 index 0000000000..49509568d6 --- /dev/null +++ b/specification/connector/sync_job_cancel/SyncJobCancelRequest.ts @@ -0,0 +1,36 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' + +/** + * Cancels a connector sync job. + * @rest_spec_name connector.sync_job_cancel + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + * @doc_id connector-sync-job-cancel + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector sync job + */ + connector_sync_job_id: Id + } +} diff --git a/specification/connector/sync_job_cancel/SyncJobCancelResponse.ts b/specification/connector/sync_job_cancel/SyncJobCancelResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/sync_job_cancel/SyncJobCancelResponse.ts @@ -0,0 +1,26 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { Result } from '@_types/Result' + +export class Response { + body: { + result: Result + } +} diff --git a/specification/connector/sync_job_delete/SyncJobDeleteRequest.ts b/specification/connector/sync_job_delete/SyncJobDeleteRequest.ts new file mode 100644 index 0000000000..3e70880363 --- /dev/null +++ b/specification/connector/sync_job_delete/SyncJobDeleteRequest.ts @@ -0,0 +1,36 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' + +/** + * Deletes a connector sync job. + * @rest_spec_name connector.sync_job_delete + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + * @doc_id connector-sync-job-delete + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector sync job to be deleted + */ + connector_sync_job_id: Id + } +} diff --git a/specification/connector/sync_job_delete/SyncJobDeleteResponse.ts b/specification/connector/sync_job_delete/SyncJobDeleteResponse.ts new file mode 100644 index 0000000000..7374da4a4c --- /dev/null +++ b/specification/connector/sync_job_delete/SyncJobDeleteResponse.ts @@ -0,0 +1,24 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { AcknowledgedResponseBase } from '@_types/Base' + +export class Response { + body: AcknowledgedResponseBase +} diff --git a/specification/connector/sync_job_get/SyncJobGetRequest.ts b/specification/connector/sync_job_get/SyncJobGetRequest.ts new file mode 100644 index 0000000000..877ffa9998 --- /dev/null +++ b/specification/connector/sync_job_get/SyncJobGetRequest.ts @@ -0,0 +1,36 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' + +/** + * Retrieves a connector sync job. + * @rest_spec_name connector.sync_job_get + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + * @doc_id connector-sync-job-get + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector sync job + */ + connector_sync_job_id: Id + } +} diff --git a/specification/connector/sync_job_get/SyncJobGetResponse.ts b/specification/connector/sync_job_get/SyncJobGetResponse.ts new file mode 100644 index 0000000000..d99c57ee7f --- /dev/null +++ b/specification/connector/sync_job_get/SyncJobGetResponse.ts @@ -0,0 +1,24 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { ConnectorSyncJob } from '../_types/SyncJob' + +export class Response { + body: ConnectorSyncJob +} diff --git a/specification/connector/sync_job_list/SyncJobListRequest.ts b/specification/connector/sync_job_list/SyncJobListRequest.ts new file mode 100644 index 0000000000..00f4f0254f --- /dev/null +++ b/specification/connector/sync_job_list/SyncJobListRequest.ts @@ -0,0 +1,55 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { integer } from '@_types/Numeric' +import { SyncJobType } from '../_types/SyncJob' +import { SyncStatus } from '../_types/Connector' + +/** + * Lists connector sync jobs. + * @rest_spec_name connector.sync_job_list + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + * @doc_id connector-sync-job-list + */ +export interface Request extends RequestBase { + query_parameters: { + /** + * Starting offset (default: 0) + */ + from?: integer + /** + * Specifies a max number of results to get + */ + size?: integer + /** + * A sync job status to fetch connector sync jobs for + */ + status?: SyncStatus + /** + * A connector id to fetch connector sync jobs for + */ + connector_id?: Id + /** + * A comma-separated list of job types to fetch the sync jobs for + */ + job_type?: SyncJobType[] + } +} diff --git a/specification/connector/sync_job_list/SyncJobListResponse.ts b/specification/connector/sync_job_list/SyncJobListResponse.ts new file mode 100644 index 0000000000..f695d6fab6 --- /dev/null +++ b/specification/connector/sync_job_list/SyncJobListResponse.ts @@ -0,0 +1,28 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { long } from '@_types/Numeric' +import { ConnectorSyncJob } from '../_types/SyncJob' + +export class Response { + body: { + count: long + results: ConnectorSyncJob[] + } +} diff --git a/specification/connector/sync_job_post/SyncJobPostRequest.ts b/specification/connector/sync_job_post/SyncJobPostRequest.ts new file mode 100644 index 0000000000..cccc2e59a8 --- /dev/null +++ b/specification/connector/sync_job_post/SyncJobPostRequest.ts @@ -0,0 +1,43 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { SyncJobType, SyncJobTriggerMethod } from '../_types/SyncJob' + +/** + * Creates a connector sync job. + * @rest_spec_name connector.sync_job_post + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + * @doc_id connector-sync-job-post + */ +export interface Request extends RequestBase { + /** + * The sync job to be created + */ + /** @codegen_name sync_job */ + body: { + /** + * The id of the associated connector + */ + id: Id + job_type?: SyncJobType + trigger_method?: SyncJobTriggerMethod + } +} diff --git a/specification/connector/sync_job_post/SyncJobPostResponse.ts b/specification/connector/sync_job_post/SyncJobPostResponse.ts new file mode 100644 index 0000000000..69e3a38113 --- /dev/null +++ b/specification/connector/sync_job_post/SyncJobPostResponse.ts @@ -0,0 +1,26 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { Id } from '@_types/common' + +export class Response { + body: { + id: Id + } +}