Skip to content

rest-api #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: cn
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions docs/reference/rest-api/defs.asciidoc
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
[role="xpack"]
[[api-definitions]]
== Definitions
== 定义

These resource definitions are used in {ml} and {security} APIs and in {kib}
advanced {ml} job configuration options.
下面这些资源定义被用在 {ml} 和 {security} 相关的 API 以及 {kib} 高级 {ml} 作业配置选项中。

* <<ml-calendar-resource,Calendars>>
* <<ml-calendar-resource,日历>>
* <<ml-datafeed-resource,{dfeeds-cap}>>
* <<ml-datafeed-counts,{dfeed-cap} counts>>
* <<ml-filter-resource,Filters>>
* <<ml-job-resource,Jobs>>
* <<ml-jobstats,Job statistics>>
* <<ml-snapshot-resource,Model snapshots>>
* <<ml-results-resource,Results>>
* <<role-mapping-resources,Role mappings>>
* <<ml-event-resource,Scheduled Events>>
* <<ml-datafeed-counts,{dfeed-cap} 计数>>
* <<ml-filter-resource,过滤器>>
* <<ml-job-resource,作业>>
* <<ml-jobstats,作业统计>>
* <<ml-snapshot-resource,模型快照>>
* <<ml-results-resource,结果>>
* <<role-mapping-resources,角色映射>>
* <<ml-event-resource,预定事件>>

include::{es-repo-dir}/ml/apis/calendarresource.asciidoc[]
include::{es-repo-dir}/ml/apis/datafeedresource.asciidoc[]
21 changes: 10 additions & 11 deletions docs/reference/rest-api/index.asciidoc
Original file line number Diff line number Diff line change
@@ -4,18 +4,17 @@

[partintro]
--
{xpack} exposes REST APIs that are used by the UI components and can be called
directly to configure and access {xpack} features.
{xpack} 开放了用户界面组件使用的 REST API,可以直接调用这些 API 来配置和访问 {xpack} 的功能模块。

* <<info-api,Info API>>
* <<ccr-apis,Cross-cluster replication APIs>>
* <<graph-explore-api,Graph Explore API>>
* <<licensing-apis,Licensing APIs>>
* <<ml-apis,Machine Learning APIs>>
* <<security-api,Security APIs>>
* <<watcher-api,Watcher APIs>>
* <<rollup-apis,Rollup APIs>>
* <<migration-api,Migration APIs>>
* <<info-api,信息 API>>
* <<ccr-apis,跨集群复制 APIs>>
* <<graph-explore-api,图形探索 API>>
* <<licensing-apis,许可证 APIs>>
* <<ml-apis,机器学习 APIs>>
* <<security-api,安全 API>>
* <<watcher-api,监控 API>>
* <<rollup-apis,上卷 APIs>>
* <<migration-api,迁移 API>>
--


36 changes: 16 additions & 20 deletions docs/reference/rest-api/info.asciidoc
Original file line number Diff line number Diff line change
@@ -1,53 +1,49 @@
[role="xpack"]
[testenv="basic"]
[[info-api]]
== Info API
== 信息 API

The info API provides general information about the installed {xpack} features.
信息 API 提供了 {xpack} 已安装功能的概要信息。

[float]
=== Request
=== 请求

`GET /_xpack`

[float]
=== Description
=== 说明

The information provided by this API includes:
通过信息 API 可获取以下信息:

* Build Information - including the build number and timestamp.
* License Information - basic information about the currently installed license.
* Features Information - The features that are currently enabled and available
under the current license.
* 构建(Build)信息 - 包括内部版本号和时间戳。
* 许可证(License)信息 - 当前安装的许可证的基本信息。
* 功能(Features)信息 - 当前许可证下已启用和可用的功能。

[float]
=== Path Parameters
=== 路径参数

`categories`::
(list) A comma-separated list of the information categories to include in the
response. For example, `build,license,features`.
(list) 要包含在响应中的的信息类别列表,以逗号分隔。例如:`build,license,features`。

`human`::
(boolean) Defines whether additional human-readable information is included in
the response. In particular, it adds descriptions and a tag line. The
default value is `true`.
(boolean) 定义响应中是否包含附加的人类可读的信息,它将会添加描述项和标记行。该配置项的默认值为 `true`。

//=== Query Parameters

//=== Authorization

[float]
=== Examples
=== 示例

The following example queries the info API:
下面是信息 API 的查询示例:

[source,js]
------------------------------------------------------------
GET /_xpack
------------------------------------------------------------
// CONSOLE

Example response:
示例响应:
[source,js]
------------------------------------------------------------
{
@@ -114,15 +110,15 @@ Example response:
// TESTRESPONSE[s/"build_hash" : "3d394c6afe2fc5"/"build_hash": "$body.features.ml.native_code_info.build_hash"/]
// So much s/// but at least we test that the layout is close to matching....

The following example only returns the build and features information:
下面的示例仅返回构建和功能信息:

[source,js]
------------------------------------------------------------
GET /_xpack?categories=build,features
------------------------------------------------------------
// CONSOLE

The following example removes the descriptions from the response:
下面的示例移除了响应中的描述信息:

[source,js]
------------------------------------------------------------