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

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