update-connector-name-description-api.asciidoc 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. [[update-connector-name-description-api]]
  2. === Update connector name and description API
  3. ++++
  4. <titleabbrev>Update connector name and description</titleabbrev>
  5. ++++
  6. preview::[]
  7. Updates the `name` and `description` fields of a connector.
  8. [[update-connector-name-description-api-request]]
  9. ==== {api-request-title}
  10. `PUT _connector/<connector_id>/_name`
  11. [[update-connector-name-description-api-prereq]]
  12. ==== {api-prereq-title}
  13. * To sync data using self-managed connectors, you need to deploy the {enterprise-search-ref}/build-connector.html[Elastic connector service] on your own infrastructure. This service runs automatically on Elastic Cloud for native connectors.
  14. * The `connector_id` parameter should reference an existing connector.
  15. [[update-connector-name-description-api-path-params]]
  16. ==== {api-path-parms-title}
  17. `<connector_id>`::
  18. (Required, string)
  19. [role="child_attributes"]
  20. [[update-connector-name-description-api-request-body]]
  21. ==== {api-request-body-title}
  22. `name`::
  23. (Required, string) Name of the connector.
  24. `description`::
  25. (Optional, string) Description of the connector.
  26. [[update-connector-name-description-api-response-codes]]
  27. ==== {api-response-codes-title}
  28. `200`::
  29. Connector `name` and `description` fields were successfully updated.
  30. `400`::
  31. The `connector_id` was not provided or the request payload was malformed.
  32. `404` (Missing resources)::
  33. No connector matching `connector_id` could be found.
  34. [[update-connector-name-description-api-example]]
  35. ==== {api-examples-title}
  36. The following example updates the `name` and `description` fields for the connector with ID `my-connector`:
  37. ////
  38. [source, console]
  39. --------------------------------------------------
  40. PUT _connector/my-connector
  41. {
  42. "index_name": "search-google-drive",
  43. "name": "My Connector",
  44. "service_type": "google_drive"
  45. }
  46. --------------------------------------------------
  47. // TESTSETUP
  48. [source,console]
  49. --------------------------------------------------
  50. DELETE _connector/my-connector
  51. --------------------------------------------------
  52. // TEARDOWN
  53. ////
  54. [source,console]
  55. ----
  56. PUT _connector/my-connector/_name
  57. {
  58. "name": "Custom connector",
  59. "description": "This is my customized connector"
  60. }
  61. ----
  62. [source,console-result]
  63. ----
  64. {
  65. "result": "updated"
  66. }
  67. ----