文档

支持的开源API

Elasticsearch Serverless服务支持开源的API,本文介绍7.10版本应用支持的开源API URI和对应的Method。

注意事项

  • 时序日志场景的应用,GET _cat/indicesGET {index} 等获取元信息的接口的返回结果可能与开源7.10版本ES不一致,后续会逐步优化。

  • 时序日志场景的应用和配额为12、24 CU的企业版应用,在使用API查询应用索引时存在限制。如果写入设置refresh为true或wait_for,需要在查询时通过指定参数preference=_primary实现,否则refresh将不生效。

  • 请谨慎使用本文列表之外的API接口。ES Serverless应用可能对部分未开放的API采用mock返回方式,返回结果非真实业务数据,例如 /_cluster/health/{index}/_ilm/explain/_xpack等。

检索场景的应用支持的API

Compact and aligned text (CAT) APIs

API URI

适用Method

/_cat/aliases

GET

/_cat/aliases/{alias}

GET

/_cat/count

GET

/_cat/count/{index}

GET

/_cat/indices

GET

/_cat/indices/{index}

GET

/_cat/recovery

GET

/_cat/recovery/{index}

GET

/_cat/segments

GET

/_cat/segments/{index}

GET

/_cat/shards

GET

/_cat/shards/{index}

GET

/_cat/templates

GET

/_cat/templates/{name}

GET

Document APIs

API URI

适用Method

/_bulk

PUT、POST

/_mget

POST、GET

/_mtermvectors

POST、GET

/{index}/_bulk

PUT、POST

/{index}/_create/{id}

PUT、POST

/{index}/_doc

POST

/{index}/_doc/{id}

PUT、POST、GET、HEAD、DELETE

/{index}/_mget

POST、GET

/{index}/_mtermvectors

POST、GET

/{index}/_source/{id}

GET、HEAD

/{index}/_termvectors

POST、GET

/{index}/_termvectors/{id}

POST、GET

/{index}/_update/{id}

POST

/{index}/{type}

POST

/{index}/{type}/_bulk

PUT、POST

/{index}/{type}/_mget

POST、GET

/{index}/{type}/_mtermvectors

POST、GET

/{index}/{type}/_termvectors

POST、GET

/{index}/{type}/{id}

PUT、POST、GET、HEAD、DELETE

/{index}/{type}/{id}/_create

PUT、POST

/{index}/{type}/{id}/_source

GET、HEAD

/{index}/{type}/{id}/_termvectors

POST、GET

/{index}/{type}/{id}/_update

POST

Index APIs

API URI

适用Method

/_alias

PUT、GET

/_alias/{name}

PUT、POST、GET、HEAD

/_aliases

POST、GET

/_aliases/{name}

PUT、POST

/_analyze

POST、GET

/_close

POST

/_component_template

GET

/_component_template/{name}

PUT、POST、GET、HEAD、DELETE

/_flush

POST、GET

/_flush/synced

POST、GET

/_index_template

GET

/_index_template/_simulate

POST

/_index_template/_simulate_index/{name}

POST

/_index_template/_simulate/{name}

POST

/_index_template/{name}

PUT、POST、GET、HEAD、DELETE

/_mapping

GET

/_mapping/{type}

PUT、POST、GET

/_mapping/{type}/field/{fields}

GET

/_mapping/field/{fields}

GET

/_mappings

GET

/_mappings/{type}

PUT、POST

/_open

POST

/_refresh

POST、GET

/_resolve/index/{name}

GET

/_settings

PUT、GET

/_settings/{name}

GET

/_stats

GET

/_stats/{metric}

GET

/_template

GET

/_template/{name}

PUT、POST、GET、HEAD、DELETE

/{index}

PUT、GET、HEAD、DELETE

/{index}/_close

POST

/{index}/_alias

PUT、GET、HEAD

/{index}/_alias/{name}

PUT、POST、GET、HEAD、DELETE

/{index}/_aliases

PUT

/{index}/_aliases/{name}

PUT、POST、DELETE

/{index}/_analyze

POST、GET

/{index}/_block/{block}

PUT

/{index}/_flush

POST、GET

/{index}/_flush/synced

POST、GET

/{index}/_mapping

GET

/{index}/_mapping/

PUT、POST

/{index}/_mapping/{type}

PUT、POST、GET、HEAD

/{index}/_mapping/{type}/field/{fields}

GET

/{index}/_mapping/field/{fields}

GET

/{index}/_mappings

GET

/{index}/_mappings/

PUT、POST

/{index}/_mappings/{type}

PUT、POST、GET

/{index}/_open

POST

/{index}/_refresh

POST、GET

/{index}/_segments

GET

/{index}/_setting/{name}

GET

/{index}/_settings

PUT、GET

/{index}/_settings/{name}

GET

/{index}/_stats

GET

/{index}/_stats/{metric}

GET

/{index}/{type}/_mapping

PUT、POST、GET

/{index}/{type}/_mapping/field/{fields}

GET

/{index}/{type}/_mappings

PUT、POST

Search APIs

API URI

适用Method

/_async_search

POST

/_async_search/{id}

GET、DELETE

/_count

POST、GET

/_field_caps

POST、GET

/_msearch

POST、GET

/_scripts/{id}

GET

/_search

POST、GET

/_search/scroll

POST、GET

/_search/scroll/{scroll_id}

POST、GET、DELETE

/_validate/query

POST、GET

/{index}/_async_search

POST

/{index}/_count

POST、GET

/{index}/_explain/{id}

POST、GET

/{index}/_field_caps

POST、GET

/{index}/_msearch

POST、GET

/{index}/_search

POST、GET

/{index}/_validate/query

POST、GET

/{index}/{type}/_count

POST、GET

/{index}/{type}/_msearch

POST、GET

/{index}/{type}/_search

POST、GET

/{index}/{type}/_validate/query

POST、GET

/{index}/{type}/{id}/_explain

POST、GET

其他

API URI

适用Method

/_ingest/pipeline

GET

/_ingest/pipeline/_simulate

POST、GET

/_ingest/pipeline/{id}

PUT、GET、DELETE

/_ingest/pipeline/{id}/_simulate

POST、GET

/_tasks/{task_id}

GET

/_tasks/{task_id}/_cancel

POST

/_xpack/security/_authenticate

GET

/_xpack/security/privilege/

POST

/_xpack/security/user/_has_privileges

POST、GET

时序日志场景的应用支持的API

Compact and aligned text (CAT) APIs

API URI

适用Method

/_cat/count

GET

/_cat/count/{index}

GET

/_cat/indices

GET

/_cat/indices/{index}

GET

Document APIs

API URI

适用Method

/_bulk

PUT、POST

/{index}/_bulk

PUT、POST

/{index}/_doc

POST

/{index}/_termvectors

POST、GET

/{index}/{type}

POST

/{index}/{type}/_bulk

PUT、POST

/{index}/{type}/_mtermvectors

POST、GET

Index APIs

API URI

适用Method

/_analyze

POST、GET

/_mapping

GET

/_mapping/{type}

PUT、POST

/_mappings

GET

/_mappings/{type}

PUT、POST

/_resolve/index/{name}

GET

/_settings

PUT、GET

/{index}

PUT、GET、HEAD、DELETE

/{index}/_analyze

POST、GET

/{index}/_mapping

GET

/{index}/_mapping/

PUT、POST

/{index}/_mapping/{type}

PUT、POST、HEAD

/{index}/_mappings

GET

/{index}/_mappings/

PUT、POST

/{index}/_mappings/{type}

PUT、POST

/{index}/_settings

PUT、GET

/{index}/{type}/_mapping

PUT、POST

/{index}/{type}/_mappings

PUT、POST

Search APIs

API URI

适用Method

/_async_search

POST

/_async_search/{id}

GET、DELETE

/_count

POST、GET

/_msearch

POST、GET

/_scripts/{id}

GET

/_search

POST、GET

/_search/scroll

POST、GET

/_search/scroll/{scroll_id}

POST、GET、DELETE

/_validate/query

POST、GET

/{index}/_async_search

POST

/{index}/_count

POST、GET

/{index}/_field_caps

POST、GET

/{index}/_msearch

POST、GET

/{index}/_search

POST、GET

/{index}/_validate/query

POST、GET

/{index}/{type}/_count

POST、GET

/{index}/{type}/_msearch

POST、GET

/{index}/{type}/_search

POST、GET

/{index}/{type}/_validate/query

POST、GET

其他

API URI

适用Method

/_tasks/{task_id}

GET

/_tasks/{task_id}/_cancel

POST

/_xpack/security/_authenticate

GET

/_xpack/security/privilege/

POST

/_xpack/security/user/_has_privileges

POST、GET

可白名单开放的API

如果您需要使用下表中的API,可以提交工单或通过ES Serverless用户群(钉钉群号:11205017670或72335013004)联系客服添加白名单,请说明需要使用的API并描述使用场景。

API URI

Method

/_reindex

POST

/{index}/_update_by_query

POST

/{index}/{type}/_update_by_query

POST

/{index}/_delete_by_query

POST

/{index}/{type}/_delete_by_query

POST