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

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