diff --git a/output/schema/schema.json b/output/schema/schema.json index f3d505e22c..a984000eac 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -114937,7 +114937,48 @@ "CommonQueryParameters" ], "body": { - "kind": "no_body" + "kind": "properties", + "properties": [ + { + "description": "Refer to the description for the `allow_no_match` query parameter.", + "name": "allow_no_match", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "internal" + } + } + }, + { + "description": "Refer to the descriptiion for the `force` query parameter.", + "name": "force", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "internal" + } + } + }, + { + "description": "Refer to the description for the `timeout` query parameter.", + "name": "timeout", + "required": false, + "serverDefault": "30m", + "type": { + "kind": "instance_of", + "type": { + "name": "Time", + "namespace": "_types" + } + } + } + ] }, "description": "Closes one or more anomaly detection jobs.\nA job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.\nWhen you close a job, it runs housekeeping tasks such as pruning the model history, flushing buffers, calculating final results and persisting the model snapshots. Depending upon the size of the job, it could take several minutes to close and the equivalent time to re-open. After it is closed, the job has a minimal overhead on the cluster except for maintaining its meta data. Therefore it is a best practice to close jobs that are no longer required to process data.\nIf you close an anomaly detection job whose datafeed is running, the request first tries to stop the datafeed. This behavior is equivalent to calling stop datafeed API with the same timeout and force parameters as the close job request.\nWhen a datafeed that has a specified end date stops, it automatically closes its associated job.", "inherits": { @@ -119100,7 +119141,108 @@ "CommonQueryParameters" ], "body": { - "kind": "no_body" + "kind": "properties", + "properties": [ + { + "description": "Refer to the description for the `allow_no_match` query parameter.", + "name": "allow_no_match", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "internal" + } + } + }, + { + "description": "Refer to the description for the `bucket_span` query parameter.", + "name": "bucket_span", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Time", + "namespace": "_types" + } + } + }, + { + "description": "Refer to the description for the `end` query parameter.", + "name": "end", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Time", + "namespace": "_types" + } + } + }, + { + "description": "Refer to the description for the `exclude_interim` query parameter.", + "name": "exclude_interim", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "internal" + } + } + }, + { + "description": "Refer to the description for the `overall_score` query parameter.", + "name": "overall_score", + "required": false, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "internal" + } + } + ], + "kind": "union_of" + } + }, + { + "description": "Refer to the description for the `start` query parameter.", + "name": "start", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Time", + "namespace": "_types" + } + } + }, + { + "description": "Refer to the description for the `top_n` query parameter.", + "name": "top_n", + "required": false, + "serverDefault": 1, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + ] }, "description": "Retrieves overall bucket results that summarize the bucket results of\nmultiple anomaly detection jobs.\n\nThe `overall_score` is calculated by combining the scores of all the\nbuckets within the overall bucket span. First, the maximum\n`anomaly_score` per anomaly detection job in the overall bucket is\ncalculated. Then the `top_n` of those scores are averaged to result in\nthe `overall_score`. This means that you can fine-tune the\n`overall_score` so that it is more or less sensitive to the number of\njobs that detect an anomaly at the same time. For example, if you set\n`top_n` to `1`, the `overall_score` is the maximum bucket score in the\noverall bucket. Alternatively, if you set `top_n` to the number of jobs,\nthe `overall_score` is high only when all jobs detect anomalies in that\noverall bucket. If you set the `bucket_span` parameter (to a value\ngreater than its default), the `overall_score` is the maximum\n`overall_score` of the overall buckets that have a span equal to the\njobs' largest bucket span.", "inherits": { @@ -119276,7 +119418,7 @@ "kind": "properties", "properties": [ { - "description": "If true, the results are sorted in descending order.", + "description": "Refer to the description for the `desc` query parameter.", "name": "desc", "required": false, "serverDefault": false, @@ -119289,7 +119431,20 @@ } }, { - "description": "If true, the output excludes interim results.", + "description": "Refer to the description for the `end` query parameter.", + "name": "end", + "required": false, + "serverDefault": "-1", + "type": { + "kind": "instance_of", + "type": { + "name": "DateString", + "namespace": "_types" + } + } + }, + { + "description": "Refer to the description for the `exclude_interim` query parameter.", "name": "exclude_interim", "required": false, "serverDefault": false, @@ -119313,7 +119468,7 @@ } }, { - "description": "Returns records with anomaly scores greater or equal than this value.", + "description": "Refer to the description for the `record_score` query parameter.", "name": "record_score", "required": false, "serverDefault": 0, @@ -119326,7 +119481,7 @@ } }, { - "description": "Specifies the sort field for the requested records.", + "description": "Refer to the description for the `sort` query parameter.", "name": "sort", "required": false, "serverDefault": "record_score", @@ -119339,7 +119494,7 @@ } }, { - "description": "Returns records with timestamps earlier than this time. The default value\nmeans results are not limited to specific timestamps.", + "description": "Refer to the description for the `start` query parameter.", "name": "start", "required": false, "serverDefault": "-1", @@ -119350,19 +119505,6 @@ "namespace": "_types" } } - }, - { - "description": "Returns records with timestamps earlier than this time. The default value\nmeans results are not limited to specific timestamps.", - "name": "end", - "required": false, - "serverDefault": "-1", - "type": { - "kind": "instance_of", - "type": { - "name": "DateString", - "namespace": "_types" - } - } } ] }, @@ -119393,6 +119535,32 @@ } ], "query": [ + { + "description": "If true, the results are sorted in descending order.", + "name": "desc", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "internal" + } + } + }, + { + "description": "Returns records with timestamps earlier than this time. The default value\nmeans results are not limited to specific timestamps.", + "name": "end", + "required": false, + "serverDefault": "-1", + "type": { + "kind": "instance_of", + "type": { + "name": "DateString", + "namespace": "_types" + } + } + }, { "description": "If `true`, the output excludes interim results.", "name": "exclude_interim", @@ -119419,6 +119587,19 @@ } } }, + { + "description": "Returns records with anomaly scores greater or equal than this value.", + "name": "record_score", + "required": false, + "serverDefault": 0, + "type": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } + }, { "description": "Specifies the maximum number of records to obtain.", "name": "size", @@ -119433,21 +119614,21 @@ } }, { - "description": "Returns records with timestamps after this time. The default value means\nresults are not limited to specific timestamps.", - "name": "start", + "description": "Specifies the sort field for the requested records.", + "name": "sort", "required": false, - "serverDefault": "-1", + "serverDefault": "record_score", "type": { "kind": "instance_of", "type": { - "name": "DateString", + "name": "Field", "namespace": "_types" } } }, { - "description": "Returns records with timestamps earlier than this time. The default value\nmeans results are not limited to specific timestamps.", - "name": "end", + "description": "Returns records with timestamps after this time. The default value means\nresults are not limited to specific timestamps.", + "name": "start", "required": false, "serverDefault": "-1", "type": { @@ -120048,7 +120229,7 @@ "kind": "properties", "properties": [ { - "description": "Controls the time to wait until a job has opened.", + "description": "Refer to the description for the `timeout` query parameter.", "name": "timeout", "required": false, "serverDefault": "30m", @@ -120088,7 +120269,21 @@ } } ], - "query": [] + "query": [ + { + "description": "Controls the time to wait until a job has opened.", + "name": "timeout", + "required": false, + "serverDefault": "30m", + "type": { + "kind": "instance_of", + "type": { + "name": "Time", + "namespace": "_types" + } + } + } + ] }, { "body": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 18df29575a..db63ceabc8 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -1286,14 +1286,6 @@ ], "response": [] }, - "ml.get_records": { - "request": [ - "Request: missing json spec query parameter 'record_score'", - "Request: missing json spec query parameter 'sort'", - "Request: missing json spec query parameter 'desc'" - ], - "response": [] - }, "ml.get_trained_models": { "request": [ "Request: missing json spec query parameter 'include_model_definition'", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index a2bc359200..2951451a83 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11698,6 +11698,11 @@ export interface MlCloseJobRequest extends RequestBase { allow_no_match?: boolean force?: boolean timeout?: Time + body?: { + allow_no_match?: boolean + force?: boolean + timeout?: Time + } } export interface MlCloseJobResponse { @@ -12181,6 +12186,15 @@ export interface MlGetOverallBucketsRequest extends RequestBase { overall_score?: double | string start?: Time top_n?: integer + body?: { + allow_no_match?: boolean + bucket_span?: Time + end?: Time + exclude_interim?: boolean + overall_score?: double | string + start?: Time + top_n?: integer + } } export interface MlGetOverallBucketsResponse { @@ -12190,19 +12204,22 @@ export interface MlGetOverallBucketsResponse { export interface MlGetRecordsRequest extends RequestBase { job_id: Id + desc?: boolean + end?: DateString exclude_interim?: boolean from?: integer + record_score?: double size?: integer + sort?: Field start?: DateString - end?: DateString body?: { desc?: boolean + end?: DateString exclude_interim?: boolean page?: MlPage record_score?: double sort?: Field start?: DateString - end?: DateString } } @@ -12279,6 +12296,7 @@ export interface MlInfoResponse { export interface MlOpenJobRequest extends RequestBase { job_id: Id + timeout?: Time body?: { timeout?: Time } diff --git a/specification/ml/close_job/MlCloseJobRequest.ts b/specification/ml/close_job/MlCloseJobRequest.ts index 9717638088..77108f81e9 100644 --- a/specification/ml/close_job/MlCloseJobRequest.ts +++ b/specification/ml/close_job/MlCloseJobRequest.ts @@ -57,4 +57,20 @@ export interface Request extends RequestBase { * @server_default 30m */ timeout?: Time } + body: { + /** + * Refer to the description for the `allow_no_match` query parameter. + * @server_default true + */ + allow_no_match?: boolean + /** + * Refer to the descriptiion for the `force` query parameter. + * @server_default false + */ + force?: boolean + /** + * Refer to the description for the `timeout` query parameter. + * @server_default 30m */ + timeout?: Time + } } diff --git a/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts b/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts index 2fff66d438..31c2e80cfa 100644 --- a/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts +++ b/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts @@ -107,4 +107,37 @@ export interface Request extends RequestBase { */ top_n?: integer } + body: { + /** + * Refer to the description for the `allow_no_match` query parameter. + * @server_default true + */ + allow_no_match?: boolean + /** + * Refer to the description for the `bucket_span` query parameter. + */ + bucket_span?: Time + /** + * Refer to the description for the `end` query parameter. + */ + end?: Time + /** + * Refer to the description for the `exclude_interim` query parameter. + * @server_default false + */ + exclude_interim?: boolean + /** + * Refer to the description for the `overall_score` query parameter. + */ + overall_score?: double | string + /** + * Refer to the description for the `start` query parameter. + */ + start?: Time + /** + * Refer to the description for the `top_n` query parameter. + * @server_default 1 + */ + top_n?: integer + } } diff --git a/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts b/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts index cea743895a..8f84a1d5d7 100644 --- a/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts +++ b/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts @@ -48,6 +48,17 @@ export interface Request extends RequestBase { job_id: Id } query_parameters: { + /** + * If true, the results are sorted in descending order. + * @server_default false + */ + desc?: boolean + /** + * Returns records with timestamps earlier than this time. The default value + * means results are not limited to specific timestamps. + * @server_default -1 + */ + end?: DateString /** * If `true`, the output excludes interim results. * @server_default false @@ -58,57 +69,59 @@ export interface Request extends RequestBase { * @server_default 0 */ from?: integer + /** + * Returns records with anomaly scores greater or equal than this value. + * @server_default 0.0 + */ + record_score?: double /** * Specifies the maximum number of records to obtain. * @server_default 100 */ size?: integer + /** + * Specifies the sort field for the requested records. + * @server_default record_score + */ + sort?: Field /** * Returns records with timestamps after this time. The default value means * results are not limited to specific timestamps. * @server_default -1 */ start?: DateString - /** - * Returns records with timestamps earlier than this time. The default value - * means results are not limited to specific timestamps. - * @server_default -1 - */ - end?: DateString } body: { /** - * If true, the results are sorted in descending order. + * Refer to the description for the `desc` query parameter. * @server_default false */ desc?: boolean /** - * If true, the output excludes interim results. + * Refer to the description for the `end` query parameter. + * @server_default -1 + */ + end?: DateString + /** + * Refer to the description for the `exclude_interim` query parameter. * @server_default false */ exclude_interim?: boolean page?: Page /** - * Returns records with anomaly scores greater or equal than this value. + * Refer to the description for the `record_score` query parameter. * @server_default 0.0 */ record_score?: double /** - * Specifies the sort field for the requested records. + * Refer to the description for the `sort` query parameter. * @server_default record_score */ sort?: Field /** - * Returns records with timestamps earlier than this time. The default value - * means results are not limited to specific timestamps. + * Refer to the description for the `start` query parameter. * @server_default -1 */ start?: DateString - /** - * Returns records with timestamps earlier than this time. The default value - * means results are not limited to specific timestamps. - * @server_default -1 - */ - end?: DateString } } diff --git a/specification/ml/open_job/MlOpenJobRequest.ts b/specification/ml/open_job/MlOpenJobRequest.ts index 057b72b040..e3aa2a37db 100644 --- a/specification/ml/open_job/MlOpenJobRequest.ts +++ b/specification/ml/open_job/MlOpenJobRequest.ts @@ -42,11 +42,18 @@ export interface Request extends RequestBase { */ job_id: Id } - body: { + query_parameters: { /** * Controls the time to wait until a job has opened. * @server_default 30m */ timeout?: Time } + body: { + /** + * Refer to the description for the `timeout` query parameter. + * @server_default 30m + */ + timeout?: Time + } }