Skip to content

Commit

Permalink
[DOCS] Adds descriptions for Enrich APIs (#2215)
Browse files Browse the repository at this point in the history
  • Loading branch information
szabosteve authored Aug 2, 2023
1 parent 666f446 commit e4cbd9f
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 16 deletions.
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[]
/**
* 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

0 comments on commit e4cbd9f

Please sign in to comment.