List connectors API

List connectors API

This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.

New API reference

For the most up-to-date API details, refer to Connector APIs.

Returns information about all created connectors.

To get started with Connector APIs, check out our tutorial.

Request

GET _connector

Prerequisites

  • 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.

Path parameters

size

(Optional, integer) Maximum number of results to retrieve. Defaults to 100.

from

(Optional, integer) The offset from the first result to fetch. Defaults to 0.

index_name

(Optional, string) A comma-separated list of index names associated with connectors, used to filter search results.

connector_name

(Optional, string) A comma-separated list of connector names, used to filter search results.

service_type

(Optional, string) A comma-separated list of connector service types, used to filter search results.

Examples

The following example lists all connectors:

  1. resp = client.connector.list()
  2. print(resp)
  1. response = client.connector.list
  2. puts response
  1. const response = await client.connector.list();
  2. console.log(response);
  1. GET _connector

The following example lists the first two connectors:

  1. resp = client.connector.list(
  2. from_="0",
  3. size="2",
  4. )
  5. print(resp)
  1. const response = await client.connector.list({
  2. from: 0,
  3. size: 2,
  4. });
  5. console.log(response);
  1. GET _connector?from=0&size=2

An example to list a connector associated with the search-google-drive Elasticsearch index:

  1. resp = client.connector.list(
  2. index_name="search-google-drive",
  3. )
  4. print(resp)
  1. const response = await client.connector.list({
  2. index_name: "search-google-drive",
  3. });
  4. console.log(response);
  1. GET _connector?index_name=search-google-drive

An example to list all connectors with sharepoint_online service type:

  1. resp = client.connector.list(
  2. service_type="sharepoint_online",
  3. )
  4. print(resp)
  1. const response = await client.connector.list({
  2. service_type: "sharepoint_online",
  3. });
  4. console.log(response);
  1. GET _connector?service_type=sharepoint_online

An example to list all connectors with sharepoint_online or google_drive service type:

  1. resp = client.connector.list(
  2. service_type="sharepoint_online,google_drive",
  3. )
  4. print(resp)
  1. const response = await client.connector.list({
  2. service_type: "sharepoint_online,google_drive",
  3. });
  4. console.log(response);
  1. GET _connector?service_type=sharepoint_online,google_drive