Get a connector

Use the _search endpoint to search for a connector.

To retrieve information about a connector, you can:

Get a connector by ID

This API retrieves a connector by its ID.

Path and HTTP methods

  1. GET /_plugins/_ml/connectors/<connector_id>

Example request

  1. GET /_plugins/_ml/connectors/N8AE1osB0jLkkocYjz7D

copy

Example response

  1. {
  2. "name" : "BedRock Claude-Instant v1",
  3. "version" : "1",
  4. "description" : "Bedrock connector for Claude Instant testing",
  5. "protocol" : "aws_sigv4",
  6. "parameters" : {
  7. "endpoint" : "bedrock.us-east-1.amazonaws.com",
  8. "content_type" : "application/json",
  9. "auth" : "Sig_V4",
  10. "service_name" : "bedrock",
  11. "region" : "us-east-1",
  12. "anthropic_version" : "bedrock-2023-05-31"
  13. },
  14. "actions" : [
  15. {
  16. "action_type" : "PREDICT",
  17. "method" : "POST",
  18. "url" : "https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-instant-v1/invoke",
  19. "headers" : {
  20. "x-amz-content-sha256" : "required",
  21. "content-type" : "application/json"
  22. },
  23. "request_body" : "{\"prompt\":\"${parameters.prompt}\", \"max_tokens_to_sample\":${parameters.max_tokens_to_sample}, \"temperature\":${parameters.temperature}, \"anthropic_version\":\"${parameters.anthropic_version}\" }"
  24. }
  25. ]
  26. }

Search for a connector

This API searches for matching connectors using a query.

Path and HTTP methods

  1. POST /_plugins/_ml/connectors/_search
  2. GET /_plugins/_ml/connectors/_search

Example request

  1. POST /_plugins/_ml/connectors/_search
  2. {
  3. "query": {
  4. "match_all": {}
  5. },
  6. "size": 1000
  7. }

copy

Example response

  1. {
  2. "took" : 1,
  3. "timed_out" : false,
  4. "_shards" : {
  5. "total" : 1,
  6. "successful" : 1,
  7. "skipped" : 0,
  8. "failed" : 0
  9. },
  10. "hits" : {
  11. "total" : {
  12. "value" : 3,
  13. "relation" : "eq"
  14. },
  15. "max_score" : 1.0,
  16. "hits" : [
  17. {
  18. "_index" : ".plugins-ml-connector",
  19. "_id" : "7W-d74sBPD67W0wkEZdE",
  20. "_version" : 1,
  21. "_seq_no" : 2,
  22. "_primary_term" : 1,
  23. "_score" : 1.0,
  24. "_source" : {
  25. "protocol" : "aws_sigv4",
  26. "name" : "BedRock claude Connector",
  27. "description" : "The connector to BedRock service for claude model",
  28. "version" : "1",
  29. "parameters" : {
  30. "endpoint" : "bedrock.us-east-1.amazonaws.com",
  31. "content_type" : "application/json",
  32. "auth" : "Sig_V4",
  33. "max_tokens_to_sample" : "8000",
  34. "service_name" : "bedrock",
  35. "temperature" : "1.0E-4",
  36. "response_filter" : "$.completion",
  37. "region" : "us-east-1",
  38. "anthropic_version" : "bedrock-2023-05-31"
  39. },
  40. "actions" : [
  41. {
  42. "headers" : {
  43. "x-amz-content-sha256" : "required",
  44. "content-type" : "application/json"
  45. },
  46. "method" : "POST",
  47. "request_body" : "{\"prompt\":\"${parameters.prompt}\", \"max_tokens_to_sample\":${parameters.max_tokens_to_sample}, \"temperature\":${parameters.temperature}, \"anthropic_version\":\"${parameters.anthropic_version}\" }",
  48. "action_type" : "PREDICT",
  49. "url" : "https://bedrock.us-east-1.amazonaws.com/model/anthropic.claude-v2/invoke"
  50. }
  51. ]
  52. }
  53. },
  54. {
  55. "_index" : ".plugins-ml-connector",
  56. "_id" : "9W-d74sBPD67W0wk4pf_",
  57. "_version" : 1,
  58. "_seq_no" : 3,
  59. "_primary_term" : 1,
  60. "_score" : 1.0,
  61. "_source" : {
  62. "protocol" : "aws_sigv4",
  63. "name" : "BedRock claude Connector",
  64. "description" : "The connector to BedRock service for claude model",
  65. "version" : "1",
  66. "parameters" : {
  67. "endpoint" : "bedrock.us-east-1.amazonaws.com",
  68. "content_type" : "application/json",
  69. "auth" : "Sig_V4",
  70. "max_tokens_to_sample" : "8000",
  71. "service_name" : "bedrock",
  72. "temperature" : "1.0E-4",
  73. "response_filter" : "$.completion",
  74. "region" : "us-east-1",
  75. "anthropic_version" : "bedrock-2023-05-31"
  76. },
  77. "actions" : [
  78. {
  79. "headers" : {
  80. "x-amz-content-sha256" : "required",
  81. "content-type" : "application/json"
  82. },
  83. "method" : "POST",
  84. "request_body" : "{\"prompt\":\"${parameters.prompt}\", \"max_tokens_to_sample\":${parameters.max_tokens_to_sample}, \"temperature\":${parameters.temperature}, \"anthropic_version\":\"${parameters.anthropic_version}\" }",
  85. "action_type" : "PREDICT",
  86. "url" : "https://bedrock.us-east-1.amazonaws.com/model/anthropic.claude-v2/invoke"
  87. }
  88. ]
  89. }
  90. },
  91. {
  92. "_index" : ".plugins-ml-connector",
  93. "_id" : "rm_u8osBPD67W0wkCpsG",
  94. "_version" : 1,
  95. "_seq_no" : 4,
  96. "_primary_term" : 1,
  97. "_score" : 1.0,
  98. "_source" : {
  99. "protocol" : "aws_sigv4",
  100. "name" : "BedRock Claude-Instant v1",
  101. "description" : "Bedrock connector for Claude Instant testing",
  102. "version" : "1",
  103. "parameters" : {
  104. "endpoint" : "bedrock.us-east-1.amazonaws.com",
  105. "content_type" : "application/json",
  106. "auth" : "Sig_V4",
  107. "service_name" : "bedrock",
  108. "region" : "us-east-1",
  109. "anthropic_version" : "bedrock-2023-05-31"
  110. },
  111. "actions" : [
  112. {
  113. "headers" : {
  114. "x-amz-content-sha256" : "required",
  115. "content-type" : "application/json"
  116. },
  117. "method" : "POST",
  118. "request_body" : "{\"prompt\":\"${parameters.prompt}\", \"max_tokens_to_sample\":${parameters.max_tokens_to_sample}, \"temperature\":${parameters.temperature}, \"anthropic_version\":\"${parameters.anthropic_version}\" }",
  119. "action_type" : "PREDICT",
  120. "url" : "https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-instant-v1/invoke"
  121. }
  122. ]
  123. }
  124. }
  125. ]
  126. }
  127. }