opensearch-docs-cn/_ml-commons-plugin/api/connector-apis/get-connector.md

965 B

layout title parent grand_parent nav_order
default Get connector Connector APIs ML Commons API 20

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

GET /_plugins/_ml/connectors/<connector_id>

Example request

GET /_plugins/_ml/connectors/N8AE1osB0jLkkocYjz7D

{% include copy-curl.html %}

Search for a connector

This API searches for matching connectors using a query.

Path and HTTP methods

POST /_plugins/_ml/connectors/_search
GET /_plugins/_ml/connectors/_search

Example request

POST /_plugins/_ml/connectors/_search
{
  "query": {
    "match_all": {}
  },
  "size": 1000
}

{% include copy-curl.html %}