Skip to content

[DOCS] Adds descriptions for Enrich APIs #2215

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

Merged
merged 5 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
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
41 changes: 25 additions & 16 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ import { RequestBase } from '@_types/Base'
import { Name } from '@_types/common'

/**
* Deletes an existing enrich policy and its enrich index.
* @rest_spec_name enrich.delete_policy
* @availability stack since=7.5.0 stability=stable
* @availability serverless stability=stable visibility=public
*/
export interface Request extends RequestBase {
path_parts: {
/**
* Enrich policy to delete.
*/
name: Name
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,24 @@ import { RequestBase } from '@_types/Base'
import { Name } from '@_types/common'

/**
* Creates the enrich index for an existing enrich policy.
* @doc_id execute-enrich-policy-api
* @rest_spec_name enrich.execute_policy
* @availability stack since=7.5.0 stability=stable
* @availability serverless stability=stable visibility=public
*/
export interface Request extends RequestBase {
path_parts: {
/**
* Enrich policy to execute.
*/
name: Name
}
query_parameters: {
/**
* If `true`, the request blocks other enrich policy execution requests until complete.
* @server_default true
*/
wait_for_completion?: boolean
}
}
5 changes: 5 additions & 0 deletions specification/enrich/get_policy/GetEnrichPolicyRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ import { RequestBase } from '@_types/Base'
import { Names } from '@_types/common'

/**
* Returns information about an enrich policy.
* @rest_spec_name enrich.get_policy
* @availability stack since=7.5.0 stability=stable
* @availability serverless stability=stable visibility=public
*/
export interface Request extends RequestBase {
path_parts: {
/**
* Comma-separated list of enrich policy names used to limit the request.
* To return information for all enrich policies, omit this parameter.
*/
name?: Names
}
}
14 changes: 14 additions & 0 deletions specification/enrich/put_policy/PutEnrichPolicyRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,31 @@ import { RequestBase } from '@_types/Base'
import { Name } from '@_types/common'

/**
* Creates an enrich policy.
* @doc_id put-enrich-policy-api
* @rest_spec_name enrich.put_policy
* @availability stack since=7.5.0 stability=stable
* @availability serverless stability=stable visibility=public
*/
export interface Request extends RequestBase {
path_parts: {
/**
* Name of the enrich policy to create or update.
*/
name: Name
}
body: {
/**
* Matches enrich data to incoming documents based on a `geo_shape` query.
*/
geo_match?: Policy
/**
* Matches enrich data to incoming documents based on a `term` query.
*/
match?: Policy
/**
* Matches a number, date, or IP address in incoming documents to a range in the enrich index based on a `term` query.
*/
range?: Policy
}
}
1 change: 1 addition & 0 deletions specification/enrich/stats/EnrichStatsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import { RequestBase } from '@_types/Base'

/**
* Returns enrich coordinator statistics and information about enrich policies that are currently executing.
* @rest_spec_name enrich.stats
* @availability stack since=7.5.0 stability=stable
* @availability serverless stability=stable visibility=public
Expand Down
7 changes: 7 additions & 0 deletions specification/enrich/stats/EnrichStatsResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ import { ExecutingPolicy, CoordinatorStats, CacheStats } from './types'

export class Response {
body: {
/**
* Objects containing information about each coordinating ingest node for configured enrich processors.
*/
coordinator_stats: CoordinatorStats[]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe that's on your radar already, but we shouldn't forget to add descriptions for ExecutingPolicy and CoordinatorStats too (here).

/**
* Objects containing information about each enrich policy that is currently executing.
*/
executing_policies: ExecutingPolicy[]
/**
* Objects containing information about the enrich cache stats on each ingest node.
* @availability stack since=7.16.0
* @availability serverless
*/
Expand Down