Connector
- class elasticsearch.client.ConnectorClient(client)
- Parameters:
client (BaseClient)
- check_in(*, connector_id, error_trace=None, filter_path=None, human=None, pretty=None)
Check in a connector. Update the last_seen field in the connector and set it to the current timestamp.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/check-in-connector-api.html
- delete(*, connector_id, delete_sync_jobs=None, error_trace=None, filter_path=None, human=None, pretty=None)
Delete a connector. Removes a connector and associated sync jobs. This is a destructive action that is not recoverable. NOTE: This action doesn’t delete any API keys, ingest pipelines, or data indices associated with the connector. These need to be removed manually.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-connector-api.html
- Parameters:
- Return type:
- get(*, connector_id, error_trace=None, filter_path=None, human=None, pretty=None)
Get a connector. Get the details about a connector.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-connector-api.html
- last_sync(*, connector_id, error_trace=None, filter_path=None, human=None, last_access_control_sync_error=None, last_access_control_sync_scheduled_at=None, last_access_control_sync_status=None, last_deleted_document_count=None, last_incremental_sync_scheduled_at=None, last_indexed_document_count=None, last_seen=None, last_sync_error=None, last_sync_scheduled_at=None, last_sync_status=None, last_synced=None, pretty=None, sync_cursor=None, body=None)
Update the connector last sync stats. Update the fields related to the last sync of a connector. This action is used for analytics and monitoring.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-last-sync-api.html
- Parameters:
connector_id (str) – The unique identifier of the connector to be updated
last_access_control_sync_error (str | None)
last_access_control_sync_status (str | Literal['canceled', 'canceling', 'completed', 'error', 'in_progress', 'pending', 'suspended'] | None)
last_deleted_document_count (int | None)
last_indexed_document_count (int | None)
last_sync_error (str | None)
last_sync_status (str | Literal['canceled', 'canceling', 'completed', 'error', 'in_progress', 'pending', 'suspended'] | None)
sync_cursor (Any | None)
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- list(*, connector_name=None, error_trace=None, filter_path=None, from_=None, human=None, index_name=None, pretty=None, query=None, service_type=None, size=None)
Get all connectors. Get information about all connectors.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/list-connector-api.html
- Parameters:
connector_name (str | Sequence[str] | None) – A comma-separated list of connector names to fetch connector documents for
from – Starting offset (default: 0)
index_name (str | Sequence[str] | None) – A comma-separated list of connector index names to fetch connector documents for
query (str | None) – A wildcard query string that filters connectors with matching name, description or index name
service_type (str | Sequence[str] | None) – A comma-separated list of connector service types to fetch connector documents for
size (int | None) – Specifies a max number of results to get
error_trace (bool | None)
from_ (int | None)
human (bool | None)
pretty (bool | None)
- Return type:
- post(*, description=None, error_trace=None, filter_path=None, human=None, index_name=None, is_native=None, language=None, name=None, pretty=None, service_type=None, body=None)
Create a connector. Connectors are Elasticsearch integrations that bring content from third-party data sources, which can be deployed on Elastic Cloud or hosted on your own infrastructure. Elastic managed connectors (Native connectors) are a managed service on Elastic Cloud. Self-managed connectors (Connector clients) are self-managed on your infrastructure.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/create-connector-api.html
- Parameters:
- Return type:
- put(*, connector_id=None, description=None, error_trace=None, filter_path=None, human=None, index_name=None, is_native=None, language=None, name=None, pretty=None, service_type=None, body=None)
Create or update a connector.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/create-connector-api.html
- Parameters:
connector_id (str | None) – The unique identifier of the connector to be created or updated. ID is auto-generated if not provided.
description (str | None)
index_name (str | None)
is_native (bool | None)
language (str | None)
name (str | None)
service_type (str | None)
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- sync_job_cancel(*, connector_sync_job_id, error_trace=None, filter_path=None, human=None, pretty=None)
Cancel a connector sync job. Cancel a connector sync job, which sets the status to cancelling and updates cancellation_requested_at to the current time. The connector service is then responsible for setting the status of connector sync jobs to cancelled.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cancel-connector-sync-job-api.html
- sync_job_check_in(*, connector_sync_job_id, error_trace=None, filter_path=None, human=None, pretty=None)
Check in a connector sync job. Check in a connector sync job and set the last_seen field to the current time before updating it in the internal index. To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/check-in-connector-sync-job-api.html
- sync_job_claim(*, connector_sync_job_id, worker_hostname=None, error_trace=None, filter_path=None, human=None, pretty=None, sync_cursor=None, body=None)
Claim a connector sync job. This action updates the job status to in_progress and sets the last_seen and started_at timestamps to the current time. Additionally, it can set the sync_cursor property for the sync job. This API is not intended for direct connector management by users. It supports the implementation of services that utilize the connector protocol to communicate with Elasticsearch. To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/claim-connector-sync-job-api.html
- Parameters:
connector_sync_job_id (str) – The unique identifier of the connector sync job.
worker_hostname (str | None) – The host name of the current system that will run the job.
sync_cursor (Any | None) – The cursor object from the last incremental sync job. This should reference the sync_cursor field in the connector state for which the job runs.
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- sync_job_delete(*, connector_sync_job_id, error_trace=None, filter_path=None, human=None, pretty=None)
Delete a connector sync job. Remove a connector sync job and its associated data. This is a destructive action that is not recoverable.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-connector-sync-job-api.html
- sync_job_error(*, connector_sync_job_id, error=None, error_trace=None, filter_path=None, human=None, pretty=None, body=None)
Set a connector sync job error. Set the error field for a connector sync job and set its status to error. To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/set-connector-sync-job-error-api.html
- Parameters:
- Return type:
- sync_job_get(*, connector_sync_job_id, error_trace=None, filter_path=None, human=None, pretty=None)
Get a connector sync job.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-connector-sync-job-api.html
- sync_job_list(*, connector_id=None, error_trace=None, filter_path=None, from_=None, human=None, job_type=None, pretty=None, size=None, status=None)
Get all connector sync jobs. Get information about all stored connector sync jobs listed by their creation date in ascending order.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/list-connector-sync-jobs-api.html
- Parameters:
connector_id (str | None) – A connector id to fetch connector sync jobs for
from – Starting offset (default: 0)
job_type (Sequence[str | Literal['access_control', 'full', 'incremental']] | str | ~typing.Literal['access_control', 'full', 'incremental'] | None) – A comma-separated list of job types to fetch the sync jobs for
size (int | None) – Specifies a max number of results to get
status (str | Literal['canceled', 'canceling', 'completed', 'error', 'in_progress', 'pending', 'suspended'] | None) – A sync job status to fetch connector sync jobs for
error_trace (bool | None)
from_ (int | None)
human (bool | None)
pretty (bool | None)
- Return type:
- sync_job_post(*, id=None, error_trace=None, filter_path=None, human=None, job_type=None, pretty=None, trigger_method=None, body=None)
Create a connector sync job. Create a connector sync job document in the internal index and initialize its counters and timestamps with default values.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/create-connector-sync-job-api.html
- sync_job_update_stats(*, connector_sync_job_id, deleted_document_count=None, indexed_document_count=None, indexed_document_volume=None, error_trace=None, filter_path=None, human=None, last_seen=None, metadata=None, pretty=None, total_document_count=None, body=None)
Set the connector sync job stats. Stats include: deleted_document_count, indexed_document_count, indexed_document_volume, and total_document_count. You can also update last_seen. This API is mainly used by the connector service for updating sync job information. To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/set-connector-sync-job-stats-api.html
- Parameters:
connector_sync_job_id (str) – The unique identifier of the connector sync job.
deleted_document_count (int | None) – The number of documents the sync job deleted.
indexed_document_count (int | None) – The number of documents the sync job indexed.
indexed_document_volume (int | None) – The total size of the data (in MiB) the sync job indexed.
last_seen (str | Literal[-1] | ~typing.Literal[0] | None) – The timestamp to use in the last_seen property for the connector sync job.
metadata (Mapping[str, Any] | None) – The connector-specific metadata.
total_document_count (int | None) – The total number of documents in the target index after the sync job finished.
error_trace (bool | None)
human (bool | None)
pretty (bool | None)
- Return type:
- update_active_filtering(*, connector_id, error_trace=None, filter_path=None, human=None, pretty=None)
Activate the connector draft filter. Activates the valid draft filtering for a connector.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-filtering-api.html
- update_api_key_id(*, connector_id, api_key_id=None, api_key_secret_id=None, error_trace=None, filter_path=None, human=None, pretty=None, body=None)
Update the connector API key ID. Update the api_key_id and api_key_secret_id fields of a connector. You can specify the ID of the API key used for authorization and the ID of the connector secret where the API key is stored. The connector secret ID is required only for Elastic managed (native) connectors. Self-managed connectors (connector clients) do not use this field.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-api-key-id-api.html
- Parameters:
- Return type:
- update_configuration(*, connector_id, configuration=None, error_trace=None, filter_path=None, human=None, pretty=None, values=None, body=None)
Update the connector configuration. Update the configuration field in the connector document.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-configuration-api.html
- Parameters:
- Return type:
- update_error(*, connector_id, error=None, error_trace=None, filter_path=None, human=None, pretty=None, body=None)
Update the connector error field. Set the error field for the connector. If the error provided in the request body is non-null, the connector’s status is updated to error. Otherwise, if the error is reset to null, the connector status is updated to connected.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-error-api.html
- update_features(*, connector_id, features=None, error_trace=None, filter_path=None, human=None, pretty=None, body=None)
Update the connector features. Update the connector features in the connector document. This API can be used to control the following aspects of a connector: * document-level security * incremental syncs * advanced sync rules * basic sync rules Normally, the running connector service automatically manages these features. However, you can use this API to override the default behavior. To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-features-api.html
- update_filtering(*, connector_id, advanced_snippet=None, error_trace=None, filter_path=None, filtering=None, human=None, pretty=None, rules=None, body=None)
Update the connector filtering. Update the draft filtering configuration of a connector and marks the draft validation state as edited. The filtering draft is activated once validated by the running Elastic connector service. The filtering property is used to configure sync rules (both basic and advanced) for a connector.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-filtering-api.html
- update_filtering_validation(*, connector_id, validation=None, error_trace=None, filter_path=None, human=None, pretty=None, body=None)
Update the connector draft filtering validation. Update the draft filtering validation info for a connector.
- update_index_name(*, connector_id, index_name=None, error_trace=None, filter_path=None, human=None, pretty=None, body=None)
Update the connector index name. Update the index_name field of a connector, specifying the index where the data ingested by the connector is stored.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-index-name-api.html
- update_name(*, connector_id, description=None, error_trace=None, filter_path=None, human=None, name=None, pretty=None, body=None)
Update the connector name and description.
- Parameters:
- Return type:
- update_native(*, connector_id, is_native=None, error_trace=None, filter_path=None, human=None, pretty=None, body=None)
Update the connector is_native flag.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-native-api.html
- update_pipeline(*, connector_id, pipeline=None, error_trace=None, filter_path=None, human=None, pretty=None, body=None)
Update the connector pipeline. When you create a new connector, the configuration of an ingest pipeline is populated with default settings.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-pipeline-api.html
- update_scheduling(*, connector_id, scheduling=None, error_trace=None, filter_path=None, human=None, pretty=None, body=None)
Update the connector scheduling.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-scheduling-api.html
- update_service_type(*, connector_id, service_type=None, error_trace=None, filter_path=None, human=None, pretty=None, body=None)
Update the connector service type.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-service-type-api.html
- update_status(*, connector_id, status=None, error_trace=None, filter_path=None, human=None, pretty=None, body=None)
Update the connector status.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/update-connector-status-api.html