update-connector-pipeline-api.asciidoc 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. [[update-connector-pipeline-api]]
  2. === Update connector pipeline API
  3. ++++
  4. <titleabbrev>Update connector pipeline</titleabbrev>
  5. ++++
  6. beta::[]
  7. .New API reference
  8. [sidebar]
  9. --
  10. For the most up-to-date API details, refer to {api-es}/group/endpoint-connector[Connector APIs].
  11. --
  12. Updates the `pipeline` configuration of a connector.
  13. When you create a new connector, the configuration of an <<ingest-pipeline-search-details-generic-reference, ingest pipeline>> is populated with default settings.
  14. To get started with Connector APIs, check out <<es-connectors-tutorial-api, our tutorial>>.
  15. [[update-connector-pipeline-api-request]]
  16. ==== {api-request-title}
  17. `PUT _connector/<connector_id>/_pipeline`
  18. [[update-connector-pipeline-api-prereq]]
  19. ==== {api-prereq-title}
  20. * To sync data using self-managed connectors, you need to deploy the <<es-connectors-deploy-connector-service,Elastic connector service>>. on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
  21. * The `connector_id` parameter should reference an existing connector.
  22. [[update-connector-pipeline-api-path-params]]
  23. ==== {api-path-parms-title}
  24. `<connector_id>`::
  25. (Required, string)
  26. [role="child_attributes"]
  27. [[update-connector-pipeline-api-request-body]]
  28. ==== {api-request-body-title}
  29. `pipeline`::
  30. (Required, object) The pipeline configuration of the connector. The pipeline determines how data is processed during ingestion into Elasticsearch.
  31. Pipeline configuration must include the following attributes:
  32. - `extract_binary_content` (Required, boolean) A flag indicating whether to extract binary content during ingestion.
  33. - `name` (Required, string) The name of the ingest pipeline.
  34. - `reduce_whitespace` (Required, boolean) A flag indicating whether to reduce extra whitespace in the ingested content.
  35. - `run_ml_inference` (Required, boolean) A flag indicating whether to run machine learning inference on the ingested content.
  36. [[update-connector-pipeline-api-response-codes]]
  37. ==== {api-response-codes-title}
  38. `200`::
  39. Connector `pipeline` field was successfully updated.
  40. `400`::
  41. The `connector_id` was not provided or the request payload was malformed.
  42. `404` (Missing resources)::
  43. No connector matching `connector_id` could be found.
  44. [[update-connector-pipeline-api-example]]
  45. ==== {api-examples-title}
  46. The following example updates the `pipeline` property for the connector with ID `my-connector`:
  47. ////
  48. [source, console]
  49. --------------------------------------------------
  50. PUT _connector/my-connector
  51. {
  52. "index_name": "search-google-drive",
  53. "name": "My Connector",
  54. "service_type": "google_drive"
  55. }
  56. --------------------------------------------------
  57. // TESTSETUP
  58. [source,console]
  59. --------------------------------------------------
  60. DELETE _connector/my-connector
  61. --------------------------------------------------
  62. // TEARDOWN
  63. ////
  64. [source,console]
  65. ----
  66. PUT _connector/my-connector/_pipeline
  67. {
  68. "pipeline": {
  69. "extract_binary_content": true,
  70. "name": "my-connector-pipeline",
  71. "reduce_whitespace": true,
  72. "run_ml_inference": true
  73. }
  74. }
  75. ----
  76. [source,console-result]
  77. ----
  78. {
  79. "result": "updated"
  80. }
  81. ----