You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/search-connectors/api-tutorial.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Learn how to set up a self-managed connector using the [{{es}} connector APIs]({
16
16
For this example we’ll use the [PostgreSQL connector](/reference/search-connectors/es-connectors-postgresql.md) to sync data from a PostgreSQL database to {{es}}. We’ll spin up a simple PostgreSQL instance in Docker with some example data, create a connector, and sync the data to {{es}}. You can follow the same steps to set up a connector for another data source.
17
17
18
18
::::{tip}
19
-
This tutorial focuses on running a self-managed connector on your own infrastructure, and managing syncs using the Connector APIs.
19
+
This tutorial focuses on running a self-managed connector on your own infrastructure, and managing syncs using the connector APIs.
20
20
21
21
If you’re just getting started with {{es}}, this tutorial might be a bit advanced. Refer to [quickstart](docs-content://solutions/search/get-started.md) for a more beginner-friendly introduction to {{es}}.
22
22
@@ -143,7 +143,7 @@ Now it’s time for the real fun! We’ll set up a connector to create a searcha
143
143
144
144
## Create a connector [es-connectors-tutorial-api-create-connector]
145
145
146
-
We’ll use the [Create connector API]({{es-apis}}operation/operation-connector-put) to create a PostgreSQL connector instance.
146
+
We’ll use the [create connector API]({{es-apis}}operation/operation-connector-put) to create a PostgreSQL connector instance.
147
147
148
148
Run the following API call, using the [Dev Tools Console](docs-content://explore-analyze/query-filter/tools/console.md) or `curl`:
149
149
@@ -267,7 +267,7 @@ GET _connector/my-connector-id
267
267
268
268
Now our connector instance is up and running, but it doesn’t yet know *where* to sync data from. The final piece of the puzzle is to configure our connector with details about our PostgreSQL instance. When setting up a connector in the Elastic Cloud or Serverless UIs, you’re prompted to add these details in the user interface.
269
269
270
-
But because this tutorial is all about working with connectors *programmatically*, we’ll use the [Update connector configuration API]({{es-apis}}operation/operation-connector-update-configuration) to add our configuration details.
270
+
But because this tutorial is all about working with connectors *programmatically*, we’ll use the [update connector configuration API]({{es-apis}}operation/operation-connector-update-configuration) to add our configuration details.
271
271
272
272
::::{tip}
273
273
Before configuring the connector, ensure that the configuration schema is registered by the service. For self-managed connectors, the schema registers on service startup (once the `config.yml` is populated).
@@ -314,13 +314,13 @@ POST _connector/_sync_job
314
314
To store data in {{es}}, the connector needs to create an index. When we created the connector, we specified the `music` index. The connector will create and configure this {{es}} index before launching the sync job.
315
315
316
316
::::{tip}
317
-
In the approach we’ve used here, the connector will use [dynamic mappings](docs-content://manage-data/data-store/mapping.md#mapping-dynamic) to automatically infer the data types of your fields. In a real-world scenario you would use the {{es}} [Create index API](operation/operation-indices-create) to first create the index with the desired field mappings and index settings. Defining your own mappings upfront gives you more control over how your data is indexed.
317
+
In the approach we’ve used here, the connector will use [dynamic mappings](docs-content://manage-data/data-store/mapping.md#mapping-dynamic) to automatically infer the data types of your fields. In a real-world scenario you would use the {{es}} [create index API]({{es-apis}}operation/operation-indices-create) to first create the index with the desired field mappings and index settings. Defining your own mappings upfront gives you more control over how your data is indexed.
318
318
319
319
::::
320
320
321
321
### Check sync status [es-connectors-tutorial-api-check-sync-status]
322
322
323
-
Use the [Get sync job API]({{es-apis}}operation/operation-connector-sync-job-get) to track the status and progress of the sync job. By default, the most recent job statuses are returned first. Run the following API call to check the status of the sync job:
323
+
Use the [get sync job API]({{es-apis}}operation/operation-connector-sync-job-get) to track the status and progress of the sync job. By default, the most recent job statuses are returned first. Run the following API call to check the status of the sync job:
324
324
325
325
```console
326
326
GET _connector/_sync_job?connector_id=my-connector-id&size=1
@@ -389,6 +389,6 @@ Congratulations! You’ve successfully set up a self-managed connector using the
389
389
390
390
Here are some next steps to explore:
391
391
392
-
* Learn more about the [Connector APIs]({{es-apis}}group/endpoint-connector).
392
+
* Learn more about the [connector APIs]({{es-apis}}group/endpoint-connector).
393
393
* Learn how to deploy {{es}}, {{kib}}, and the connectors service using Docker Compose in our [quickstart guide](https://github.com/elastic/connectors/tree/main/scripts/stack#readme).
0 commit comments