From 4d189ca20edde5cac002dc48f3f616677eade7c1 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Thu, 22 Aug 2024 09:56:21 +1200 Subject: [PATCH 1/9] Re-generate code Signed-off-by: Thomas Farr --- .../org/opensearch/client/opensearch/_types/ErrorCause.java | 6 +++--- .../opensearch/client/codegen/model/SpecTransformer.java | 3 +-- .../opensearch/client/codegen/openapi/HttpStatusCode.java | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java index 2941b7ea30..4ce2076a0b 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java @@ -148,7 +148,7 @@ public final String type() { } /** - * Additional details about the error + * Additional details about the error. */ public final Map metadata() { return this.metadata; @@ -355,7 +355,7 @@ public final Builder type(String value) { } /** - * Additional details about the error + * Additional details about the error. */ public final Builder metadata(Map map) { this.metadata = _mapPutAll(this.metadata, map); @@ -363,7 +363,7 @@ public final Builder metadata(Map map) { } /** - * Additional details about the error + * Additional details about the error. */ public final Builder metadata(String key, JsonData value) { this.metadata = _mapPut(this.metadata, key, value); diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java index 91af05c63f..20daec06fc 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java @@ -356,8 +356,7 @@ private Type mapTypeInner(OpenApiSchema schema) { case Array: return mapArray(schema); case String: - if (schema.getPattern().map("^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$"::equals).orElse(false)) - return Types.Client.OpenSearch._Types.Time; + if ("_common:Duration".equals(schema.getPointer().getLastKey().orElse(null))) return Types.Client.OpenSearch._Types.Time; return Types.Java.Lang.String; case Boolean: return Types.Primitive.Boolean; diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/HttpStatusCode.java b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/HttpStatusCode.java index bf69e82fcf..11e57a1b7b 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/HttpStatusCode.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/HttpStatusCode.java @@ -15,6 +15,7 @@ public enum HttpStatusCode { Ok("200"), Created("201"), + NoContent("204"), BadRequest("400"), Forbidden("403"), NotFound("404"), From 58bf1965d17dc91f250f348036e839c5d7193059 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Fri, 16 Aug 2024 17:06:56 +1200 Subject: [PATCH 2/9] Improve builder doc comments Signed-off-by: Thomas Farr --- .../client/opensearch/_types/ErrorCause.java | 8 ++++++++ .../client/codegen/openapi/OpenApiSchemaFormat.java | 3 ++- .../codegen/templates/ObjectShape/Builder.mustache | 12 ++++++++++-- .../templates/ObjectShape/FieldDoc/MapAdd.mustache | 5 +++++ .../ObjectShape/FieldDoc/MapAddAll.mustache | 5 +++++ .../ObjectShape/FieldDoc/MapAddBuilderFn.mustache | 5 +++++ .../codegen/templates/ObjectShape/Serialize.mustache | 7 +++++-- .../codegen/templates/TaggedUnionShape.mustache | 2 ++ 8 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/MapAdd.mustache create mode 100644 java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/MapAddAll.mustache create mode 100644 java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/MapAddBuilderFn.mustache diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java index 4ce2076a0b..5e95dce435 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java @@ -356,6 +356,10 @@ public final Builder type(String value) { /** * Additional details about the error. + * + *

+ * Adds all elements of map to metadata. + *

*/ public final Builder metadata(Map map) { this.metadata = _mapPutAll(this.metadata, map); @@ -364,6 +368,10 @@ public final Builder metadata(Map map) { /** * Additional details about the error. + * + *

+ * Adds an entry to metadata. + *

*/ public final Builder metadata(String key, JsonData value) { this.metadata = _mapPut(this.metadata, key, value); diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchemaFormat.java b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchemaFormat.java index b9b467a68f..f3bd8fa731 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchemaFormat.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchemaFormat.java @@ -17,7 +17,8 @@ public enum OpenApiSchemaFormat { Float, Double, Int32, - Int64; + Int64, + Binary; private static final Map VALUES = Maps.createLookupOf(values(), OpenApiSchemaFormat::toString); diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder.mustache index 2ef354df7a..26d308c6a5 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Builder.mustache @@ -26,19 +26,27 @@ {{#fields}} {{#type.isMap}} - {{>ObjectShape/FieldDoc/Basic}} + {{>ObjectShape/FieldDoc/MapAddAll}} {{#deprecation}}@Deprecated{{/deprecation}} public final Builder{{#abstract}}T{{/abstract}} {{name}}({{type}} map) { this.{{name}} = _mapPutAll(this.{{name}}, map); return {{^abstract}}this{{/abstract}}{{#abstract}}self(){{/abstract}}; } - {{>ObjectShape/FieldDoc/Basic}} + {{>ObjectShape/FieldDoc/MapAdd}} {{#deprecation}}@Deprecated{{/deprecation}} public final Builder{{#abstract}}T{{/abstract}} {{name}}({{type.mapKeyType}} key, {{type.mapValueType}} value) { this.{{name}} = _mapPut(this.{{name}}, key, value); return {{^abstract}}this{{/abstract}}{{#abstract}}self(){{/abstract}}; } + {{#type.mapValueType.hasBuilder}} + + {{>ObjectShape/FieldDoc/MapAddBuilderFn}} + {{#deprecation}}@Deprecated{{/deprecation}} + public final Builder{{#abstract}}T{{/abstract}} {{name}}(String key, {{type.mapValueType.builderFnType}} fn) { + return {{name}}(key, fn.apply(new {{type.mapValueType.builderType}}()).build()); + } + {{/type.mapValueType.hasBuilder}} {{/type.isMap}} {{#type.isList}} {{>ObjectShape/FieldDoc/ListAddAll}} diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/MapAdd.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/MapAdd.mustache new file mode 100644 index 0000000000..a6cc4e3a25 --- /dev/null +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/MapAdd.mustache @@ -0,0 +1,5 @@ +/** +{{>ObjectShape/FieldDoc/BasicInner}} + +*

Adds an entry to {{name}}.

+*/ \ No newline at end of file diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/MapAddAll.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/MapAddAll.mustache new file mode 100644 index 0000000000..2d457b87df --- /dev/null +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/MapAddAll.mustache @@ -0,0 +1,5 @@ +/** +{{>ObjectShape/FieldDoc/BasicInner}} + +*

Adds all elements of map to {{name}}.

+*/ \ No newline at end of file diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/MapAddBuilderFn.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/MapAddBuilderFn.mustache new file mode 100644 index 0000000000..867d0eca28 --- /dev/null +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/MapAddBuilderFn.mustache @@ -0,0 +1,5 @@ +/** +{{>ObjectShape/FieldDoc/BasicInner}} + +*

Adds a value to {{name}} using a builder lambda.

+*/ \ No newline at end of file diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Serialize.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Serialize.mustache index 56e993fa67..0e0a972fb5 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Serialize.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Serialize.mustache @@ -1,4 +1,4 @@ -{{^extendsOtherType}} +{{^extendsOtherShape}} /** * Serialize this object to JSON. */ @@ -9,8 +9,11 @@ generator.writeEnd(); } -{{/extendsOtherType}} +{{/extendsOtherShape}} protected void serializeInternal({{TYPES.Jakarta.Json.Stream.JsonGenerator}} generator, {{TYPES.Client.Json.JsonpMapper}} mapper) { +{{#extendsOtherShape}} + super.serializeInternal(generator, mapper); +{{/extendsOtherShape}} {{#additionalPropertiesField}} {{#type.directSerializer}}this.{{name}}{{/type.directSerializer}} {{/additionalPropertiesField}} diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape.mustache index b324c9a454..65bb3b6360 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/TaggedUnionShape.mustache @@ -30,6 +30,7 @@ return fn.apply(new Builder()).build(); } +{{#false}} public String _toJsonString() { switch (_kind) { {{#variants}} @@ -41,6 +42,7 @@ } } +{{/false}} {{#variants}} /** * Is this variant instance of kind {@code {{name}}}? From bcebff2eaee17cd451655d519e90081698db831f Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Fri, 16 Aug 2024 17:11:12 +1200 Subject: [PATCH 3/9] Fix list/map isDefined serialize logic Signed-off-by: Thomas Farr --- .../ListDanglingIndicesResponse.java | 13 ++++++++----- .../list_dangling_indices/DanglingIndex.java | 13 ++++++++----- .../templates/ObjectShape/Serialize.mustache | 15 ++++++++++----- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java index 1c26867fa5..e2a93308e8 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java @@ -121,13 +121,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } - generator.writeKey("dangling_indices"); - generator.writeStartArray(); - for (DanglingIndex item0 : this.danglingIndices) { - item0.serialize(generator, mapper); + if (ApiTypeHelper.isDefined(this.danglingIndices)) { + generator.writeKey("dangling_indices"); + generator.writeStartArray(); + for (DanglingIndex item0 : this.danglingIndices) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); } - generator.writeEnd(); if (this.nodes != null) { generator.writeKey("_nodes"); diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java index 822758ab0f..72221a5505 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java @@ -144,13 +144,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("index_uuid"); generator.write(this.indexUuid); - generator.writeKey("node_ids"); - generator.writeStartArray(); - for (String item0 : this.nodeIds) { - generator.write(item0); + if (ApiTypeHelper.isDefined(this.nodeIds)) { + generator.writeKey("node_ids"); + generator.writeStartArray(); + for (String item0 : this.nodeIds) { + generator.write(item0); + + } + generator.writeEnd(); } - generator.writeEnd(); } diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Serialize.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Serialize.mustache index 0e0a972fb5..082c026194 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Serialize.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Serialize.mustache @@ -18,19 +18,24 @@ {{#type.directSerializer}}this.{{name}}{{/type.directSerializer}} {{/additionalPropertiesField}} {{#bodyFields}} - {{^required}} - {{#type.isListOrMap}} + {{#type.isListOrMap}} if ({{TYPES.Client.Util.ApiTypeHelper}}.isDefined(this.{{name}})) { - {{/type.isListOrMap}} - {{^type.isListOrMap}} + {{/type.isListOrMap}} + {{^type.isListOrMap}} + {{^required}} if (this.{{name}} != null) { - {{/type.isListOrMap}} {{/required}} + {{/type.isListOrMap}} generator.writeKey({{#quoted}}{{wireName}}{{/quoted}}); {{#type.serializer}}this.{{name}}{{/type.serializer}} + {{#type.isListOrMap}} + } + {{/type.isListOrMap}} + {{^type.isListOrMap}} {{^required}} } {{/required}} + {{/type.isListOrMap}} {{/bodyFields}} } \ No newline at end of file From 1707da8119f86fa787eef774ce8523a5bec5df88 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Thu, 22 Aug 2024 09:57:32 +1200 Subject: [PATCH 4/9] Add support for deprecated enums Signed-off-by: Thomas Farr --- .../opensearch/client/codegen/model/EnumShape.java | 8 +++++++- .../org/opensearch/client/codegen/model/Shape.java | 2 +- .../client/codegen/model/SpecTransformer.java | 5 +++-- .../client/codegen/openapi/OpenApiSchema.java | 14 ++++++++++++++ .../client/codegen/templates/EnumShape.mustache | 13 +++++++++---- 5 files changed, 34 insertions(+), 8 deletions(-) diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/EnumShape.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/EnumShape.java index 0bb7f5df46..0968bd9886 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/EnumShape.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/EnumShape.java @@ -43,9 +43,11 @@ public Collection getVariants() { public static class Variant { private final String wireName; + private final boolean deprecated; - public Variant(String wireName) { + public Variant(String wireName, boolean deprecated) { this.wireName = wireName; + this.deprecated = deprecated; } public String getWireName() { @@ -55,5 +57,9 @@ public String getWireName() { public String getName() { return Strings.toPascalCase(wireName); } + + public boolean isDeprecated() { + return deprecated; + } } } diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Shape.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Shape.java index bd20d083c6..73d728a1db 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Shape.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Shape.java @@ -46,7 +46,7 @@ public JavaClassKind getClassKind() { } public boolean isAbstract() { - return this.className.endsWith("Base"); + return this.className.endsWith("Base") || this.className.startsWith("Base"); } public String getTypedefName() { diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java index 20daec06fc..725102bb04 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java @@ -251,10 +251,11 @@ private void visit(Namespace parent, String className, String typedefName, OpenA visitInto(schema, objShape); shape = objShape; } else if (schema.isString() && schema.hasEnums()) { + var deprecatedEnums = schema.getDeprecatedEnums().orElseGet(Collections::emptySet); shape = new EnumShape( parent, className, - Lists.map(schema.getEnums().orElseThrow(), EnumShape.Variant::new), + Lists.map(schema.getEnums().orElseThrow(), v -> new EnumShape.Variant(v, deprecatedEnums.contains(v))), typedefName, description ); @@ -419,7 +420,7 @@ private Type mapNumber(OpenApiSchema schema) { } private boolean shouldKeepRef(OpenApiSchema schema) { - if (schema.isNumber()) { + if (schema.isNumber() || schema.isArray()) { return false; } if (schema.isString() && schema.getEnums().isEmpty()) { diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java index 4d12ae2659..52f8cc4d29 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java @@ -11,6 +11,7 @@ import static org.opensearch.client.codegen.utils.Functional.ifNonnull; import io.swagger.v3.oas.models.media.Schema; +import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -48,6 +49,8 @@ public class OpenApiSchema extends OpenApiRefElement { @Nullable private final List enums; @Nullable + private final Set deprecatedEnums; + @Nullable private final OpenApiSchema items; @Nullable private final OpenApiSchema additionalProperties; @@ -70,6 +73,7 @@ private OpenApiSchema(@Nonnull Builder builder) { allOf = builder.allOf; oneOf = builder.oneOf; enums = builder.enums; + deprecatedEnums = builder.deprecatedEnums; items = builder.items; additionalProperties = builder.additionalProperties; properties = builder.properties; @@ -121,6 +125,11 @@ protected OpenApiSchema(@Nullable OpenApiElement parent, @Nonnull JsonPointer title = schema.getTitle(); pattern = schema.getPattern(); + + var extensions = schema.getExtensions(); + + //noinspection unchecked + deprecatedEnums = Maps.tryGet(extensions, "x-deprecated-enums").map(e -> (Collection) e).map(HashSet::new).orElse(null); } @Nonnull @@ -200,6 +209,9 @@ public Optional> getEnums() { return Lists.unmodifiableOpt(enums); } + @Nonnull + public Optional> getDeprecatedEnums() { return Sets.unmodifiableOpt(deprecatedEnums); } + @Nonnull public Optional getItems() { return Optional.ofNullable(items); @@ -279,6 +291,8 @@ public static class Builder { @Nullable private List enums; @Nullable + private Set deprecatedEnums; + @Nullable private OpenApiSchema items; @Nullable private OpenApiSchema additionalProperties; diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/EnumShape.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/EnumShape.mustache index 78c5bfc7fa..a9a14284f0 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/EnumShape.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/EnumShape.mustache @@ -1,8 +1,13 @@ {{>Partials/ClassDeclaration}} { - {{#variants}} - {{name}}({{#quoted}}{{wireName}}{{/quoted}}){{^-last}},{{/-last}} - {{/variants}} - ; +{{#variants}} +{{^-first}} + +{{/-first}} +{{#deprecated}} + @Deprecated +{{/deprecated}} + {{name}}({{#quoted}}{{wireName}}{{/quoted}}){{#-last}};{{/-last}}{{^-last}},{{/-last}} +{{/variants}} private final String jsonValue; From 15c8b3844af43652f7d071fbdf5e39ce0067f60d Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Tue, 20 Aug 2024 11:04:21 +1200 Subject: [PATCH 5/9] Improve isDefined logic Signed-off-by: Thomas Farr --- .../_types/AcknowledgedResponseBase.java | 1 - .../client/opensearch/_types/ErrorCause.java | 10 ---- .../opensearch/_types/NodeStatistics.java | 3 -- .../_types/OpenSearchVersionInfo.java | 2 - .../client/opensearch/core/InfoResponse.java | 1 - .../ListDanglingIndicesResponse.java | 17 ++---- .../list_dangling_indices/DanglingIndex.java | 16 ++---- .../opensearch/client/codegen/model/Type.java | 5 ++ .../lambdas/TemplateRenderingLambda.java | 3 +- .../renderer/lambdas/TypeIsDefinedLambda.java | 52 +++++++++++++++++++ .../templates/ObjectShape/Fields.mustache | 10 ++-- .../templates/ObjectShape/Serialize.mustache | 22 +++----- .../codegen/templates/RequestShape.mustache | 9 +--- .../codegen/templates/Type/isDefined.mustache | 6 +++ 14 files changed, 90 insertions(+), 67 deletions(-) create mode 100644 java-codegen/src/main/java/org/opensearch/client/codegen/renderer/lambdas/TypeIsDefinedLambda.java create mode 100644 java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/isDefined.mustache diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java index c7ab7d8510..ee2f0572f9 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/AcknowledgedResponseBase.java @@ -81,7 +81,6 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("acknowledged"); generator.write(this.acknowledged); - } // --------------------------------------------------------------------------------------------- diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java index 5e95dce435..5184be7b16 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/ErrorCause.java @@ -168,19 +168,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { for (Map.Entry item0 : this.metadata.entrySet()) { generator.writeKey(item0.getKey()); item0.getValue().serialize(generator, mapper); - } - if (this.causedBy != null) { generator.writeKey("caused_by"); this.causedBy.serialize(generator, mapper); - } if (this.reason != null) { generator.writeKey("reason"); generator.write(this.reason); - } if (ApiTypeHelper.isDefined(this.rootCause)) { @@ -188,16 +184,13 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeStartArray(); for (ErrorCause item0 : this.rootCause) { item0.serialize(generator, mapper); - } generator.writeEnd(); - } if (this.stackTrace != null) { generator.writeKey("stack_trace"); generator.write(this.stackTrace); - } if (ApiTypeHelper.isDefined(this.suppressed)) { @@ -205,15 +198,12 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeStartArray(); for (ErrorCause item0 : this.suppressed) { item0.serialize(generator, mapper); - } generator.writeEnd(); - } generator.writeKey("type"); generator.write(this.type); - } // --------------------------------------------------------------------------------------------- diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/NodeStatistics.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/NodeStatistics.java index 12b40c0fe4..098d4aa483 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/NodeStatistics.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/NodeStatistics.java @@ -135,10 +135,8 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeStartArray(); for (ErrorCause item0 : this.failures) { item0.serialize(generator, mapper); - } generator.writeEnd(); - } generator.writeKey("successful"); @@ -146,7 +144,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("total"); generator.write(this.total); - } // --------------------------------------------------------------------------------------------- diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java index fe6603175b..1a168dc946 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/_types/OpenSearchVersionInfo.java @@ -192,7 +192,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { if (this.buildFlavor != null) { generator.writeKey("build_flavor"); generator.write(this.buildFlavor); - } generator.writeKey("build_hash"); @@ -218,7 +217,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("number"); generator.write(this.number); - } // --------------------------------------------------------------------------------------------- diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoResponse.java index 08293ca62a..f3c81d7cc6 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/core/InfoResponse.java @@ -140,7 +140,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("version"); this.version.serialize(generator, mapper); - } // --------------------------------------------------------------------------------------------- diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java index e2a93308e8..989611ecb7 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/ListDanglingIndicesResponse.java @@ -118,26 +118,19 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { if (this.clusterName != null) { generator.writeKey("cluster_name"); generator.write(this.clusterName); - } - if (ApiTypeHelper.isDefined(this.danglingIndices)) { - generator.writeKey("dangling_indices"); - generator.writeStartArray(); - for (DanglingIndex item0 : this.danglingIndices) { - item0.serialize(generator, mapper); - - } - generator.writeEnd(); - + generator.writeKey("dangling_indices"); + generator.writeStartArray(); + for (DanglingIndex item0 : this.danglingIndices) { + item0.serialize(generator, mapper); } + generator.writeEnd(); if (this.nodes != null) { generator.writeKey("_nodes"); this.nodes.serialize(generator, mapper); - } - } // --------------------------------------------------------------------------------------------- diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java index 72221a5505..914101a624 100644 --- a/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java +++ b/java-client/src/generated/java/org/opensearch/client/opensearch/dangling_indices/list_dangling_indices/DanglingIndex.java @@ -132,7 +132,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { if (this.creationDate != null) { generator.writeKey("creation_date"); generator.write(this.creationDate); - } generator.writeKey("creation_date_millis"); @@ -144,17 +143,12 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("index_uuid"); generator.write(this.indexUuid); - if (ApiTypeHelper.isDefined(this.nodeIds)) { - generator.writeKey("node_ids"); - generator.writeStartArray(); - for (String item0 : this.nodeIds) { - generator.write(item0); - - } - generator.writeEnd(); - + generator.writeKey("node_ids"); + generator.writeStartArray(); + for (String item0 : this.nodeIds) { + generator.write(item0); } - + generator.writeEnd(); } // --------------------------------------------------------------------------------------------- diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Type.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Type.java index ca4d27a0a3..89fc45d044 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/Type.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/Type.java @@ -15,6 +15,7 @@ import java.util.Arrays; import java.util.Set; import java.util.stream.Collectors; +import org.opensearch.client.codegen.renderer.lambdas.TypeIsDefinedLambda; import org.opensearch.client.codegen.renderer.lambdas.TypeQueryParamifyLambda; import org.opensearch.client.codegen.renderer.lambdas.TypeSerializerLambda; @@ -201,6 +202,10 @@ public Mustache.Lambda queryParamify() { return new TypeQueryParamifyLambda(this); } + public Mustache.Lambda isDefined() { + return new TypeIsDefinedLambda(this); + } + public static final class Builder { private String pkg; private String name; diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/renderer/lambdas/TemplateRenderingLambda.java b/java-codegen/src/main/java/org/opensearch/client/codegen/renderer/lambdas/TemplateRenderingLambda.java index 18df162e4e..160e35480d 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/renderer/lambdas/TemplateRenderingLambda.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/renderer/lambdas/TemplateRenderingLambda.java @@ -31,7 +31,8 @@ public void execute(Template.Fragment fragment, Writer out) throws IOException { var renderer = TemplateFragmentUtils.findParentContext(fragment, TemplateGlobalContext.class).orElseThrow().getRenderer(); try { - renderer.render(templateName, getContext(fragment), out); + var content = renderer.render(templateName, getContext(fragment)); + out.write(content.strip()); } catch (RenderException e) { throw new RuntimeException(e); } diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/renderer/lambdas/TypeIsDefinedLambda.java b/java-codegen/src/main/java/org/opensearch/client/codegen/renderer/lambdas/TypeIsDefinedLambda.java new file mode 100644 index 0000000000..6ccbbcdb8c --- /dev/null +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/renderer/lambdas/TypeIsDefinedLambda.java @@ -0,0 +1,52 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ + +package org.opensearch.client.codegen.renderer.lambdas; + +import com.samskivert.mustache.Template; +import java.util.Objects; +import javax.annotation.Nonnull; +import org.opensearch.client.codegen.model.Type; +import org.opensearch.client.codegen.utils.Strings; + +public final class TypeIsDefinedLambda extends TemplateRenderingLambda { + @Nonnull + private final Type type; + + public TypeIsDefinedLambda(Type type) { + super("Type/isDefined"); + this.type = Objects.requireNonNull(type, "type must not be null"); + } + + @Override + public Object getContext(Template.Fragment fragment) { + return new Context(type, fragment.execute()); + } + + public static final class Context { + @Nonnull + private final Type type; + @Nonnull + private final String value; + + private Context(@Nonnull Type type, @Nonnull String value) { + this.type = Objects.requireNonNull(type, "type must not be null"); + this.value = Strings.requireNonBlank(value, "value must not be blank"); + } + + @Nonnull + public Type getType() { + return type; + } + + @Nonnull + public String getValue() { + return value; + } + } +} diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Fields.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Fields.mustache index 8c40ad79d8..bd320a391b 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Fields.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Fields.mustache @@ -1,10 +1,12 @@ {{#fields}} +{{^-first}} +{{/-first}} {{#deprecation}}@Deprecated{{/deprecation}} - {{^required}} - {{^type.isListOrMap}} +{{^required}} +{{^type.isListOrMap}} @{{TYPES.Javax.Annotation.Nullable}} - {{/type.isListOrMap}} - {{/required}} +{{/type.isListOrMap}} +{{/required}} private final {{type}} {{name}}; {{/fields}} diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Serialize.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Serialize.mustache index 082c026194..e40f75049e 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Serialize.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/Serialize.mustache @@ -18,24 +18,16 @@ {{#type.directSerializer}}this.{{name}}{{/type.directSerializer}} {{/additionalPropertiesField}} {{#bodyFields}} - {{#type.isListOrMap}} - if ({{TYPES.Client.Util.ApiTypeHelper}}.isDefined(this.{{name}})) { - {{/type.isListOrMap}} - {{^type.isListOrMap}} - {{^required}} - if (this.{{name}} != null) { - {{/required}} - {{/type.isListOrMap}} +{{^required}} + if ({{#type.isDefined}}this.{{name}}{{/type.isDefined}}) { +{{/required}} generator.writeKey({{#quoted}}{{wireName}}{{/quoted}}); {{#type.serializer}}this.{{name}}{{/type.serializer}} - {{#type.isListOrMap}} +{{^required}} } - {{/type.isListOrMap}} - {{^type.isListOrMap}} - {{^required}} - } - {{/required}} - {{/type.isListOrMap}} +{{/required}} +{{^-last}} +{{/-last}} {{/bodyFields}} } \ No newline at end of file diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/RequestShape.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/RequestShape.mustache index 3b21b2216e..73c0960fea 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/RequestShape.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/RequestShape.mustache @@ -61,7 +61,7 @@ int propsSet = 0; {{#pathParams}} - if ({{TYPES.Client.Util.ApiTypeHelper}}.isDefined(request.{{name}}())) propsSet |= _{{name}}; + {{^required}}if ({{#type.isDefined}}request.{{name}}(){{/type.isDefined}}) {{/required}}propsSet |= _{{name}}; {{/pathParams}} {{#httpPaths}} @@ -79,12 +79,7 @@ {{TYPES.Java.Util.Map}} params = new {{TYPES.Java.Util.HashMap}}<>(); {{#queryParams}} {{^required}} - {{#type.isListOrMap}} - if ({{TYPES.Client.Util.ApiTypeHelper}}.isDefined(request.{{name}})) { - {{/type.isListOrMap}} - {{^type.isListOrMap}} - if (request.{{name}} != null) { - {{/type.isListOrMap}} + if ({{#type.isDefined}}request.{{name}}{{/type.isDefined}}) { {{/required}} params.put({{#quoted}}{{wireName}}{{/quoted}}, {{#type.queryParamify}}request.{{name}}{{/type.queryParamify}}); {{^required}} diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/isDefined.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/isDefined.mustache new file mode 100644 index 0000000000..f000d39991 --- /dev/null +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/Type/isDefined.mustache @@ -0,0 +1,6 @@ +{{#type.isListOrMap}} +{{TYPES.Client.Util.ApiTypeHelper}}.isDefined({{value}}) +{{/type.isListOrMap}} +{{^type.isListOrMap}} +{{value}} != null +{{/type.isListOrMap}} \ No newline at end of file From 7c65f0134002901b178f43eccb0d97e550b41375 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Tue, 20 Aug 2024 11:38:26 +1200 Subject: [PATCH 6/9] Allow overriding request/response naming Signed-off-by: Thomas Farr --- .../client/codegen/model/RequestShape.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/RequestShape.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/RequestShape.java index a2625fc7ce..53bab6deaf 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/RequestShape.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/RequestShape.java @@ -155,13 +155,20 @@ public Type getJsonEndpointType() { @Nonnull private static String requestClassName(@Nonnull OperationGroup operationGroup) { - Objects.requireNonNull(operationGroup, "operationGroup must not be null"); - return Strings.toPascalCase(operationGroup.getName()) + "Request"; + return classBaseName(operationGroup) + "Request"; } @Nonnull private static String responseClassName(@Nonnull OperationGroup operationGroup) { + return classBaseName(operationGroup) + "Response"; + } + + @Nonnull + private static String classBaseName(@Nonnull OperationGroup operationGroup) { Objects.requireNonNull(operationGroup, "operationGroup must not be null"); - return Strings.toPascalCase(operationGroup.getName()) + "Response"; + switch (operationGroup.toString()) { + case "tasks.get": return "GetTasks"; + default: return Strings.toPascalCase(operationGroup.getName()); + } } } From 09bf2b2087017c64fb551e0c3f9125af16b8c5d3 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Thu, 22 Aug 2024 09:54:30 +1200 Subject: [PATCH 7/9] Support anyOf Signed-off-by: Thomas Farr --- .../client/codegen/model/SpecTransformer.java | 91 +++++++++++++++---- .../client/codegen/openapi/OpenApiSchema.java | 41 ++++++++- .../ObjectShape/FieldDoc/BasicInner.mustache | 4 +- 3 files changed, 111 insertions(+), 25 deletions(-) diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java index 725102bb04..2906236e00 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java @@ -20,7 +20,6 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; -import java.util.stream.Collectors; import java.util.stream.Stream; import javax.annotation.Nonnull; import org.apache.commons.lang3.NotImplementedException; @@ -110,7 +109,7 @@ private void visit(@Nonnull OperationGroup group, @Nonnull List k.endsWith("Base")) .orElse(false)) { return OpenApiSchema.builder().withPointer(s.getPointer()).withAllOf(s, OpenApiSchema.ANONYMOUS_OBJECT).build(); } @@ -246,7 +245,7 @@ private void visit(Namespace parent, String className, String typedefName, OpenA if (schema.isArray()) { shape = new ArrayShape(parent, className, mapType(schema), typedefName, description); - } else if (schema.isObject() || schema.hasAllOf() || schema.equals(OpenApiSchema.ANONYMOUS_OBJECT)) { + } else if (schema.determineSingleType().orElse(null) == OpenApiSchemaType.Object) { var objShape = new ObjectShape(parent, className, typedefName, description); visitInto(schema, objShape); shape = objShape; @@ -281,23 +280,28 @@ private void visitInto(OpenApiSchema schema, ObjectShape shape) { schema = allOf.get().get(1); } - final var required = schema.getRequired().orElse(Collections.emptySet()); - schema.getProperties() - .ifPresent( - props -> props.forEach( - (k, v) -> shape.addBodyField(new Field(k, mapType(v), required.contains(k), v.getDescription().orElse(null), null)) - ) - ); - - var additionalProperties = schema.getAdditionalProperties().orElse(null); - if (additionalProperties != null) { - var valueType = mapType(additionalProperties); + final var properties = new HashMap(); + final var additionalProperties = new ArrayList(); + final var required = collectObjectProperties(schema, properties, additionalProperties); + + properties.forEach((k, v) -> { + shape.addBodyField(new Field( + k, + mapType(v), + required.contains(k), + v.getDescription().orElse(null), + null + )); + }); + + if (!additionalProperties.isEmpty()) { + var valueSchema = additionalProperties.size() == 1 ? additionalProperties.get(0) : OpenApiSchema.ANONYMOUS_UNTYPED; shape.setAdditionalPropertiesField( new Field( - additionalProperties.getTitle().orElseThrow(), - Types.Java.Util.Map(Types.Java.Lang.String, valueType), + valueSchema.getTitle().orElseThrow(), + Types.Java.Util.Map(Types.Java.Lang.String, mapType(valueSchema)), false, - additionalProperties.getDescription().orElse(null), + valueSchema.getDescription().orElse(null), null, true ) @@ -305,6 +309,54 @@ private void visitInto(OpenApiSchema schema, ObjectShape shape) { } } + private Set collectObjectProperties( + OpenApiSchema schema, + Map properties, + List additionalProperties + ) { + if (schema.has$ref()) { + return collectObjectProperties(schema.resolve(), properties, additionalProperties); + } + + if (schema.hasAllOf()) { + var required = new HashSet(); + for (var component : schema.getAllOf().orElseThrow()) { + required.addAll(collectObjectProperties(component, properties, additionalProperties)); + } + return required; + } + + if (schema.hasAnyOf() || schema.hasOneOf()) { + Set required = null; + for (var component : schema.getAnyOf().or(schema::getOneOf).orElseThrow()) { + var componentRequired = collectObjectProperties(component, properties, additionalProperties); + if (required == null) { + required = new HashSet<>(componentRequired); + } else { + required.retainAll(componentRequired); + } + } + return required; + } + + schema.getProperties() + .ifPresent(props -> props.forEach((k, v) -> { + var existing = properties.get(k); + if (existing != null) { + var existingType = existing.determineSingleType().orElse(null); + var newType = v.determineSingleType().orElse(null); + if (existingType != null && (existingType == OpenApiSchemaType.Object || existingType == OpenApiSchemaType.Array || existingType != newType)) { + v = OpenApiSchema.ANONYMOUS_UNTYPED; + } + } + properties.put(k, v); + })); + + schema.getAdditionalProperties().ifPresent(additionalProperties::add); + + return schema.getRequired().orElseGet(Collections::emptySet); + } + private Type mapType(OpenApiSchema schema) { return mapType(schema, false); } @@ -374,7 +426,7 @@ private Type mapOneOf(List oneOf) { return mapType(oneOf.get(1)); } - var types = oneOf.stream().map(OpenApiSchema::determineTypes).flatMap(Set::stream).collect(Collectors.toSet()); + var types = OpenApiSchema.determineTypes(oneOf); if (types.size() == 2 && types.contains(OpenApiSchemaType.String) @@ -430,8 +482,7 @@ private boolean shouldKeepRef(OpenApiSchema schema) { return schema.getOneOf().orElseThrow().stream().allMatch(s -> s.getTitle().isPresent()); } if (schema.getAllOf().isPresent()) { - var types = schema.determineTypes(); - return types.size() == 1 && types.iterator().next().equals(OpenApiSchemaType.Object); + return schema.determineSingleType().orElse(null) == OpenApiSchemaType.Object; } return true; } diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java index 52f8cc4d29..514fa917bb 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java @@ -28,6 +28,8 @@ public class OpenApiSchema extends OpenApiRefElement { private static final JsonPointer ANONYMOUS = JsonPointer.of(""); + public static final OpenApiSchema ANONYMOUS_UNTYPED = builder().withPointer(ANONYMOUS.append("untyped")) + .build(); public static final OpenApiSchema ANONYMOUS_OBJECT = builder().withPointer(ANONYMOUS.append("object")) .withTypes(OpenApiSchemaType.Object) .build(); @@ -45,6 +47,8 @@ public class OpenApiSchema extends OpenApiRefElement { @Nullable private final List allOf; @Nullable + private final List anyOf; + @Nullable private final List oneOf; @Nullable private final List enums; @@ -71,6 +75,7 @@ private OpenApiSchema(@Nonnull Builder builder) { types = builder.types; format = builder.format; allOf = builder.allOf; + anyOf = builder.anyOf; oneOf = builder.oneOf; enums = builder.enums; deprecatedEnums = builder.deprecatedEnums; @@ -111,6 +116,7 @@ protected OpenApiSchema(@Nullable OpenApiElement parent, @Nonnull JsonPointer format = ifNonnull(schema.getFormat(), OpenApiSchemaFormat::from); allOf = children("allOf", schema.getAllOf(), OpenApiSchema::new); + anyOf = children("anyOf", schema.getAnyOf(), OpenApiSchema::new); oneOf = children("oneOf", schema.getOneOf(), OpenApiSchema::new); enums = ifNonnull(schema.getEnum(), e -> Lists.map(e, String::valueOf)); @@ -191,6 +197,15 @@ public Optional> getAllOf() { return Lists.unmodifiableOpt(allOf); } + public boolean hasAnyOf() { + return anyOf != null && !anyOf.isEmpty(); + } + + @Nonnull + public Optional> getAnyOf() { + return Lists.unmodifiableOpt(anyOf); + } + public boolean hasOneOf() { return oneOf != null && !oneOf.isEmpty(); } @@ -242,6 +257,14 @@ public Optional getPattern() { return Optional.ofNullable(pattern); } + public static Set determineTypes(List schemas) { + return schemas.stream().map(OpenApiSchema::determineTypes).flatMap(Set::stream).collect(Collectors.toSet()); + } + + private static String schemaTypeString(Set types) { + return types.stream().map(OpenApiSchemaType::toString).collect(Collectors.joining(", ")); + } + @Nonnull public Set determineTypes() { if (types != null) { @@ -249,19 +272,27 @@ public Set determineTypes() { } else if (has$ref()) { return resolve().determineTypes(); } else if (allOf != null) { - var types = allOf.stream().map(OpenApiSchema::determineTypes).flatMap(Set::stream).collect(Collectors.toSet()); + var types = determineTypes(allOf); if (types.size() > 1) { - var typeString = types.stream().map(OpenApiSchemaType::toString).collect(Collectors.joining(", ")); - throw new IllegalStateException("allOf schema must have a uniform type [" + getPointer() + "]: " + typeString); + throw new IllegalStateException("allOf schema must have a uniform type [" + getPointer() + "]: " + schemaTypeString(types)); } return types; + } else if (anyOf != null) { + return determineTypes(anyOf); } else if (oneOf != null) { - return oneOf.stream().map(OpenApiSchema::determineTypes).flatMap(Set::stream).collect(Collectors.toSet()); + return determineTypes(oneOf); } throw new IllegalStateException("Cannot determine type for schema: " + getPointer()); } + @Nonnull + public Optional determineSingleType() { + var types = determineTypes(); + if (types.size() != 1) return Optional.empty(); + return Optional.of(types.iterator().next()); + } + @Nonnull public static Builder builder() { return new Builder(); @@ -287,6 +318,8 @@ public static class Builder { @Nullable private List allOf; @Nullable + private List anyOf; + @Nullable private List oneOf; @Nullable private List enums; diff --git a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/BasicInner.mustache b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/BasicInner.mustache index 851ccc468e..76f88b51f5 100644 --- a/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/BasicInner.mustache +++ b/java-codegen/src/main/resources/org/opensearch/client/codegen/templates/ObjectShape/FieldDoc/BasicInner.mustache @@ -2,5 +2,7 @@ * {{#required}}Required - {{/required}}{{#description}}{{.}}

{{/description}}API name: {@code {{wireName}}}{{#description}}

{{/description}} {{/isAdditionalProperties}} {{#isAdditionalProperties}} -* {{description}} +{{#description}} +* {{.}} +{{/description}} {{/isAdditionalProperties}} From cfd83af0e303c7ad11739d78874cf54be7bddb1e Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Thu, 22 Aug 2024 09:58:52 +1200 Subject: [PATCH 8/9] Update spec Signed-off-by: Thomas Farr --- java-codegen/opensearch-openapi.yaml | 3661 ++++++++++++++++++++------ 1 file changed, 2819 insertions(+), 842 deletions(-) diff --git a/java-codegen/opensearch-openapi.yaml b/java-codegen/opensearch-openapi.yaml index fb5695388c..fc23f29fe3 100644 --- a/java-codegen/opensearch-openapi.yaml +++ b/java-codegen/opensearch-openapi.yaml @@ -2,13 +2,15 @@ openapi: 3.1.0 info: title: OpenSearch API Specification version: 1.0.0 - x-api-version: 2.15.0 + x-api-version: 2.16.0 paths: /: get: operationId: info.0 x-operation-group: info x-version-added: '1.0' + x-distributions-excluded: + - amazon-serverless description: Returns basic information about the cluster. externalDocs: url: https://opensearch.org/docs/latest @@ -58,6 +60,8 @@ paths: responses: '200': $ref: '#/components/responses/indices.get_alias@200' + '404': + $ref: '#/components/responses/indices.get_alias@404' put: operationId: indices.put_alias.0 x-operation-group: indices.put_alias @@ -101,6 +105,8 @@ paths: responses: '200': $ref: '#/components/responses/indices.get_alias@200' + '404': + $ref: '#/components/responses/indices.get_alias@404' head: operationId: indices.exists_alias.0 x-operation-group: indices.exists_alias @@ -122,6 +128,8 @@ paths: responses: '200': $ref: '#/components/responses/indices.exists_alias@200' + '404': + $ref: '#/components/responses/indices.exists_alias@404' post: operationId: indices.put_alias.1 x-operation-group: indices.put_alias @@ -334,6 +342,9 @@ paths: operationId: indices.clear_cache.0 x-operation-group: indices.clear_cache x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Clears all or specific caches for one or more indices. externalDocs: url: https://opensearch.org/docs/latest/api-reference/index-apis/clear-index-cache/ @@ -713,6 +724,9 @@ paths: operationId: cat.nodeattrs.0 x-operation-group: cat.nodeattrs x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Returns information about custom node attributes. externalDocs: url: https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/ @@ -2342,6 +2356,9 @@ paths: operationId: indices.forcemerge.0 x-operation-group: indices.forcemerge x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Performs the force merge operation on one or more indices. externalDocs: url: https://opensearch.org/docs/latest @@ -3839,6 +3856,36 @@ paths: responses: '200': $ref: '#/components/responses/ml.delete_model@200' + /_plugins/_ml/models/{model_id}/_deploy: + post: + operationId: ml.deploy_model.0 + x-operation-group: ml.deploy_model + description: Deploys a model. + parameters: + - $ref: '#/components/parameters/ml.deploy_model::path.model_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ml.deploy_model@200' + /_plugins/_ml/models/{model_id}/_undeploy: + post: + operationId: ml.undeploy_model.0 + x-operation-group: ml.undeploy_model + description: Undeploys a model. + parameters: + - $ref: '#/components/parameters/ml.undeploy_model::path.model_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ml.undeploy_model@200' /_plugins/_ml/tasks/{task_id}: get: operationId: ml.get_task.0 @@ -4071,6 +4118,309 @@ paths: - $ref: '#/components/parameters/_global::query.error_trace' - $ref: '#/components/parameters/_global::query.source' - $ref: '#/components/parameters/_global::query.filter_path' + /_plugins/_observability/_local/stats: + get: + operationId: observability.get_localstats.0 + x-operation-group: observability.get_localstats + x-version-added: '1.1' + description: Retrieves Local Stats of all observability objects. + responses: + '200': + $ref: '#/components/responses/observability.get_localstats@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + /_plugins/_observability/object: + delete: + operationId: observability.delete_objects.0 + x-operation-group: observability.delete_objects + x-version-added: '1.1' + description: Deletes specific observability objects specified by ID or a list of IDs. + parameters: + - $ref: '#/components/parameters/observability.delete_objects::query.objectId' + - $ref: '#/components/parameters/observability.delete_objects::query.objectIdList' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/observability.delete_objects@200' + '404': + $ref: '#/components/responses/observability.delete_objects@404' + get: + operationId: observability.list_objects.0 + x-operation-group: observability.list_objects + x-version-added: '1.1' + description: Retrieves list of all observability objects. + responses: + '200': + $ref: '#/components/responses/observability.list_objects@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + post: + operationId: observability.create_object.0 + x-operation-group: observability.create_object + x-version-added: '1.1' + description: Creates a new observability object. + requestBody: + $ref: '#/components/requestBodies/observability.create_object' + responses: + '200': + $ref: '#/components/responses/observability.create_object@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + /_plugins/_observability/object/{object_id}: + delete: + operationId: observability.delete_object.0 + x-operation-group: observability.delete_object + x-version-added: '1.1' + description: Deletes specific observability object specified by ID. + parameters: + - $ref: '#/components/parameters/observability.delete_object::path.object_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/observability.delete_object@200' + '404': + $ref: '#/components/responses/observability.delete_object@404' + get: + operationId: observability.get_object.0 + x-operation-group: observability.get_object + x-version-added: '1.1' + description: Retrieves specific observability object specified by ID. + parameters: + - $ref: '#/components/parameters/observability.get_object::path.object_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/observability.get_object@200' + '404': + $ref: '#/components/responses/observability.get_object@404' + put: + operationId: observability.update_object.0 + x-operation-group: observability.update_object + x-version-added: '1.1' + description: Updates an existing observability object. + parameters: + - $ref: '#/components/parameters/observability.update_object::path.object_id' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/observability.update_object' + responses: + '200': + $ref: '#/components/responses/observability.update_object@200' + '404': + $ref: '#/components/responses/observability.update_object@404' + /_plugins/_ppl: + post: + operationId: ppl.query.0 + x-operation-group: ppl.query + x-version-added: '1.0' + description: Send a PPL query to the PPL plugin. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + parameters: + - $ref: '#/components/parameters/ppl.query::query.format' + - $ref: '#/components/parameters/ppl.query::query.sanitize' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ppl.query' + responses: + '200': + $ref: '#/components/responses/ppl.query@200' + /_plugins/_ppl/_explain: + post: + operationId: ppl.explain.0 + x-operation-group: ppl.explain + x-version-added: '1.0' + description: Shows how a query is executed against OpenSearch. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + parameters: + - $ref: '#/components/parameters/ppl.explain::query.format' + - $ref: '#/components/parameters/ppl.explain::query.sanitize' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ppl.explain' + responses: + '200': + $ref: '#/components/responses/ppl.explain@200' + /_plugins/_ppl/stats: + get: + operationId: ppl.get_stats.0 + x-operation-group: ppl.get_stats + x-version-added: '1.0' + description: Collect metrics for the plugin within the interval. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + parameters: + - $ref: '#/components/parameters/ppl.get_stats::query.format' + - $ref: '#/components/parameters/ppl.get_stats::query.sanitize' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ppl.get_stats@200' + post: + operationId: ppl.post_stats.1 + x-operation-group: ppl.post_stats + x-version-added: '1.0' + description: By a stats endpoint, you are able to collect metrics for the plugin within the interval. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + parameters: + - $ref: '#/components/parameters/ppl.post_stats::query.format' + - $ref: '#/components/parameters/ppl.post_stats::query.sanitize' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ppl.post_stats' + responses: + '200': + $ref: '#/components/responses/ppl.post_stats@200' + /_plugins/_query/_datasources: + get: + operationId: query.datasources_list.0 + x-operation-group: query.datasources_list + x-version-added: '2.7' + description: Retrieves list of all datasources. + responses: + '200': + $ref: '#/components/responses/query.datasources_list@200' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + post: + operationId: query.datasources_create.0 + x-operation-group: query.datasources_create + x-version-added: '2.7' + description: Creates a new query datasource. + requestBody: + $ref: '#/components/requestBodies/query.datasources_create' + responses: + '201': + $ref: '#/components/responses/query.datasources_create@201' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + put: + operationId: query.datasources_update.0 + x-operation-group: query.datasources_update + x-version-added: '2.7' + description: Updates an existing query datasource. + requestBody: + $ref: '#/components/requestBodies/query.datasources_update' + responses: + '200': + $ref: '#/components/responses/query.datasources_update@200' + '404': + $ref: '#/components/responses/query.datasources_update@404' + parameters: + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + /_plugins/_query/_datasources/{datasource_name}: + delete: + operationId: query.datasource_delete.0 + x-operation-group: query.datasource_delete + x-version-added: '2.7' + description: Deletes specific datasource specified by name. + parameters: + - $ref: '#/components/parameters/query.datasource_delete::path.datasource_name' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '204': + $ref: '#/components/responses/query.datasource_delete@204' + '404': + $ref: '#/components/responses/query.datasource_delete@404' + get: + operationId: query.datasource_retrieve.0 + x-operation-group: query.datasource_retrieve + x-version-added: '2.7' + description: Retrieves specific datasource specified by name. + parameters: + - $ref: '#/components/parameters/query.datasource_retrieve::path.datasource_name' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/query.datasource_retrieve@200' + '404': + $ref: '#/components/responses/query.datasource_retrieve@404' + /_plugins/_query/settings: + put: + operationId: sql.settings.0 + x-operation-group: sql.settings + x-version-added: '1.0' + description: Adds SQL settings to the standard OpenSearch cluster settings. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/sql/settings/ + parameters: + - $ref: '#/components/parameters/sql.settings::query.format' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/sql.settings' + responses: + '200': + $ref: '#/components/responses/sql.settings@200' /_plugins/_rollup/jobs/{id}: delete: operationId: rollups.delete.0 @@ -4181,11 +4531,14 @@ paths: responses: '200': $ref: '#/components/responses/rollups.stop@200' - /_plugins/_security/_upgrade_check: + /_plugins/_security/api/_upgrade_check: get: operationId: security.config_upgrade_check.0 x-operation-group: security.config_upgrade_check x-version-added: '2.14' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Check whether or not an upgrade can be performed and what resources can be updated. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#configuration-upgrade-check @@ -4198,11 +4551,14 @@ paths: - $ref: '#/components/parameters/_global::query.error_trace' - $ref: '#/components/parameters/_global::query.source' - $ref: '#/components/parameters/_global::query.filter_path' - /_plugins/_security/_upgrade_perform: + /_plugins/_security/api/_upgrade_perform: post: operationId: security.config_upgrade_perform.0 x-operation-group: security.config_upgrade_perform x-version-added: '2.14' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Helps cluster operator upgrade missing defaults and stale default definitions. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#configuration-upgrade @@ -4211,6 +4567,8 @@ paths: responses: '200': $ref: '#/components/responses/security.config_upgrade_perform@200' + '400': + $ref: '#/components/responses/security.config_upgrade_perform@400' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -4222,6 +4580,9 @@ paths: operationId: security.get_account_details.0 x-operation-group: security.get_account_details x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Returns account details for the current user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-account-details @@ -4238,6 +4599,9 @@ paths: operationId: security.change_password.0 x-operation-group: security.change_password x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Changes the password for the current user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#change-password @@ -4246,6 +4610,8 @@ paths: responses: '200': $ref: '#/components/responses/security.change_password@200' + '403': + $ref: '#/components/responses/security.change_password@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -4257,6 +4623,9 @@ paths: operationId: security.get_action_groups.0 x-operation-group: security.get_action_groups x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves all action groups. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-action-groups @@ -4273,6 +4642,9 @@ paths: operationId: security.patch_action_groups.1 x-operation-group: security.patch_action_groups x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates, updates, or deletes multiple action groups in a single call. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-action-groups @@ -4292,6 +4664,9 @@ paths: operationId: security.delete_action_group.0 x-operation-group: security.delete_action_group x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Delete a specified action group. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group @@ -4309,6 +4684,9 @@ paths: operationId: security.get_action_group.0 x-operation-group: security.get_action_group x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves one action group. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-action-group @@ -4326,6 +4704,9 @@ paths: operationId: security.patch_action_group.0 x-operation-group: security.patch_action_group x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates individual attributes of an action group. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-action-group @@ -4345,6 +4726,9 @@ paths: operationId: security.create_action_group.0 x-operation-group: security.create_action_group x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the specified action group. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#create-action-group @@ -4360,17 +4744,24 @@ paths: responses: '200': $ref: '#/components/responses/security.create_action_group@200' + '201': + $ref: '#/components/responses/security.create_action_group@201' /_plugins/_security/api/allowlist: get: operationId: security.get_allowlist.0 x-operation-group: security.get_allowlist - x-version-added: '1.0' + x-version-added: '2.1' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves the current list of allowed API accessible to normal user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api responses: '200': $ref: '#/components/responses/security.get_allowlist@200' + '403': + $ref: '#/components/responses/security.get_allowlist@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -4380,7 +4771,10 @@ paths: patch: operationId: security.patch_allowlist.0 x-operation-group: security.patch_allowlist - x-version-added: '1.0' + x-version-added: '2.1' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates the current list of allowed API accessible to normal user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api @@ -4389,6 +4783,8 @@ paths: responses: '200': $ref: '#/components/responses/security.patch_allowlist@200' + '403': + $ref: '#/components/responses/security.patch_allowlist@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -4398,7 +4794,10 @@ paths: put: operationId: security.create_allowlist.0 x-operation-group: security.create_allowlist - x-version-added: '1.0' + x-version-added: '2.1' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the allowlisted APIs. Accessible via Super Admin certificate or REST API permission. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api @@ -4407,6 +4806,8 @@ paths: responses: '200': $ref: '#/components/responses/security.create_allowlist@200' + '403': + $ref: '#/components/responses/security.create_allowlist@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -4418,6 +4819,9 @@ paths: operationId: security.get_audit_configuration.0 x-operation-group: security.get_audit_configuration x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves the audit configuration. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#audit-logs @@ -4434,6 +4838,9 @@ paths: operationId: security.patch_audit_configuration.0 x-operation-group: security.patch_audit_configuration x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: A PATCH call is used to update specified fields in the audit configuration. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#audit-logs @@ -4453,6 +4860,9 @@ paths: operationId: security.update_audit_configuration.0 x-operation-group: security.update_audit_configuration x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates the audit configuration. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#audit-logs @@ -4472,6 +4882,9 @@ paths: operationId: security.authtoken.0 x-operation-group: security.authtoken x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Returns the authorization token. responses: '200': @@ -4487,6 +4900,9 @@ paths: operationId: security.flush_cache.0 x-operation-group: security.flush_cache x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Flushes the Security plugin user, authentication, and authorization cache. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#flush-cache @@ -4504,6 +4920,9 @@ paths: x-operation-group: security.cache x-ignorable: true x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Not supported for cache API. responses: '501': @@ -4518,6 +4937,9 @@ paths: operationId: security.cache.2 x-operation-group: security.cache x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless x-ignorable: true description: Not supported for cache API. responses: @@ -4533,6 +4955,9 @@ paths: operationId: security.cache.3 x-operation-group: security.cache x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless x-ignorable: true description: Not supported for cache API. responses: @@ -4544,11 +4969,63 @@ paths: - $ref: '#/components/parameters/_global::query.error_trace' - $ref: '#/components/parameters/_global::query.source' - $ref: '#/components/parameters/_global::query.filter_path' + /_plugins/_security/api/certificates: + get: + operationId: security.get_all_certificates.0 + x-operation-group: security.get_all_certificates + x-version-added: '2.15' + x-distributions-excluded: + - amazon-managed + - amazon-serverless + description: Retrieves the cluster security certificates. + parameters: + - $ref: '#/components/parameters/security.get_all_certificates::query.cert_type' + - $ref: '#/components/parameters/security.get_all_certificates::query.timeout' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/security.get_all_certificates@200' + '403': + $ref: '#/components/responses/security.get_all_certificates@403' + '500': + $ref: '#/components/responses/security.get_all_certificates@500' + /_plugins/_security/api/certificates/{node_id}: + get: + operationId: security.get_node_certificates.0 + x-operation-group: security.get_node_certificates + x-version-added: '2.15' + x-distributions-excluded: + - amazon-managed + - amazon-serverless + description: Retrieves the given node's security certificates. + parameters: + - $ref: '#/components/parameters/security.get_node_certificates::path.node_id' + - $ref: '#/components/parameters/security.get_node_certificates::query.cert_type' + - $ref: '#/components/parameters/security.get_node_certificates::query.timeout' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/security.get_node_certificates@200' + '403': + $ref: '#/components/responses/security.get_node_certificates@403' + '500': + $ref: '#/components/responses/security.get_node_certificates@500' /_plugins/_security/api/generateonbehalfoftoken: post: operationId: security.generate_obo_token.0 x-operation-group: security.generate_obo_token x-version-added: '2.12' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Generates On-Behalf-Of token for the current user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/authentication-tokens/#api-endpoint @@ -4570,6 +5047,9 @@ paths: operationId: security.get_users.0 x-operation-group: security.get_users x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieve all internal users. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-users @@ -4586,6 +5066,9 @@ paths: operationId: security.patch_users.0 x-operation-group: security.patch_users x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates, updates, or deletes multiple internal users in a single call. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-users @@ -4605,6 +5088,9 @@ paths: operationId: security.delete_user.0 x-operation-group: security.delete_user x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Delete the specified user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#delete-user @@ -4622,6 +5108,9 @@ paths: operationId: security.get_user.0 x-operation-group: security.get_user x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieve one internal user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-user @@ -4639,6 +5128,9 @@ paths: operationId: security.patch_user.0 x-operation-group: security.patch_user x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates individual attributes of an internal user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-user @@ -4658,6 +5150,9 @@ paths: operationId: security.create_user.0 x-operation-group: security.create_user x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the specified user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#create-user @@ -4677,7 +5172,10 @@ paths: post: operationId: security.generate_user_token.0 x-operation-group: security.generate_user_token - x-version-added: '1.0' + x-version-added: '2.7' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Generates authorization token for the given user. parameters: - $ref: '#/components/parameters/security.generate_user_token::path.username' @@ -4696,6 +5194,9 @@ paths: operationId: security.migrate.0 x-operation-group: security.migrate x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Migrates security configuration from v6 to v7. responses: '200': @@ -4713,6 +5214,9 @@ paths: operationId: security.get_distinguished_names.0 x-operation-group: security.get_distinguished_names x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves distinguished names. Only accessible to super-admins and with rest-api permissions when enabled. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-distinguished-names @@ -4726,12 +5230,17 @@ paths: responses: '200': $ref: '#/components/responses/security.get_distinguished_names@200' + '400': + $ref: '#/components/responses/security.get_distinguished_names@400' '403': $ref: '#/components/responses/security.get_distinguished_names@403' patch: operationId: security.patch_distinguished_names.0 x-operation-group: security.patch_distinguished_names x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Bulk update of distinguished names. Only accessible to super-admins and with rest-api permissions when enabled. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#update-all-distinguished-names @@ -4740,6 +5249,8 @@ paths: responses: '200': $ref: '#/components/responses/security.patch_distinguished_names@200' + '400': + $ref: '#/components/responses/security.patch_distinguished_names@400' '403': $ref: '#/components/responses/security.patch_distinguished_names@403' parameters: @@ -4753,6 +5264,9 @@ paths: operationId: security.delete_distinguished_name.0 x-operation-group: security.delete_distinguished_name x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Deletes all distinguished names in the specified cluster or node allow list. Only accessible to super-admins and with rest-api permissions when enabled. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#delete-distinguished-names @@ -4766,12 +5280,17 @@ paths: responses: '200': $ref: '#/components/responses/security.delete_distinguished_name@200' + '400': + $ref: '#/components/responses/security.delete_distinguished_name@400' '403': $ref: '#/components/responses/security.delete_distinguished_name@403' get: operationId: security.get_distinguished_name.0 x-operation-group: security.get_distinguished_name x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves distinguished names. Only accessible to super-admins and with rest-api permissions when enabled. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-distinguished-names @@ -4786,12 +5305,17 @@ paths: responses: '200': $ref: '#/components/responses/security.get_distinguished_name@200' + '400': + $ref: '#/components/responses/security.get_distinguished_name@400' '403': $ref: '#/components/responses/security.get_distinguished_name@403' patch: operationId: security.patch_distinguished_name.0 x-operation-group: security.patch_distinguished_name x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates a distinguished cluster name for a specific cluster. Only accessible to super-admins and with rest-api permissions when enabled. parameters: - $ref: '#/components/parameters/security.patch_distinguished_name::path.cluster_name' @@ -4805,12 +5329,17 @@ paths: responses: '200': $ref: '#/components/responses/security.patch_distinguished_name@200' + '400': + $ref: '#/components/responses/security.patch_distinguished_name@400' '403': $ref: '#/components/responses/security.patch_distinguished_name@403' put: operationId: security.update_distinguished_name.0 x-operation-group: security.update_distinguished_name x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Adds or updates the specified distinguished names in the cluster or node allow list. Only accessible to super-admins and with rest-api permissions when enabled. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#update-distinguished-names @@ -4826,6 +5355,8 @@ paths: responses: '200': $ref: '#/components/responses/security.update_distinguished_name@200' + '400': + $ref: '#/components/responses/security.update_distinguished_name@400' '403': $ref: '#/components/responses/security.update_distinguished_name@403' /_plugins/_security/api/permissionsinfo: @@ -4833,6 +5364,9 @@ paths: operationId: security.get_permissions_info.0 x-operation-group: security.get_permissions_info x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Gets the evaluated REST API permissions for the currently logged in user. responses: '200': @@ -4850,6 +5384,9 @@ paths: operationId: security.get_roles.0 x-operation-group: security.get_roles x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves all roles. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-roles @@ -4866,6 +5403,9 @@ paths: operationId: security.patch_roles.0 x-operation-group: security.patch_roles x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates, updates, or deletes multiple roles in a single call. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-roles @@ -4887,6 +5427,9 @@ paths: operationId: security.delete_role.0 x-operation-group: security.delete_role x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Delete the specified role. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#delete-role @@ -4904,6 +5447,9 @@ paths: operationId: security.get_role.0 x-operation-group: security.get_role x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves one role. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-role @@ -4921,6 +5467,9 @@ paths: operationId: security.patch_role.0 x-operation-group: security.patch_role x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates individual attributes of a role. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-role @@ -4942,6 +5491,9 @@ paths: operationId: security.create_role.0 x-operation-group: security.create_role x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the specified role. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#create-role @@ -4957,11 +5509,16 @@ paths: responses: '200': $ref: '#/components/responses/security.create_role@200' + '201': + $ref: '#/components/responses/security.create_role@201' /_plugins/_security/api/rolesmapping: get: operationId: security.get_role_mappings.0 x-operation-group: security.get_role_mappings x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves all role mappings. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-role-mappings @@ -4978,6 +5535,9 @@ paths: operationId: security.patch_role_mappings.0 x-operation-group: security.patch_role_mappings x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or updates multiple role mappings in a single call. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mappings @@ -4999,6 +5559,9 @@ paths: operationId: security.delete_role_mapping.0 x-operation-group: security.delete_role_mapping x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Deletes the specified role mapping. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#delete-role-mapping @@ -5016,6 +5579,9 @@ paths: operationId: security.get_role_mapping.0 x-operation-group: security.get_role_mapping x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves one role mapping. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-role-mapping @@ -5033,6 +5599,9 @@ paths: operationId: security.patch_role_mapping.0 x-operation-group: security.patch_role_mapping x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates individual attributes of a role mapping. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mapping @@ -5054,6 +5623,9 @@ paths: operationId: security.create_role_mapping.0 x-operation-group: security.create_role_mapping x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the specified role mapping. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#create-role-mapping @@ -5069,11 +5641,16 @@ paths: responses: '200': $ref: '#/components/responses/security.create_role_mapping@200' + '201': + $ref: '#/components/responses/security.create_role_mapping@201' /_plugins/_security/api/securityconfig: get: operationId: security.get_configuration.0 x-operation-group: security.get_configuration - x-version-added: '1.0' + x-version-added: '2.10' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Returns the current Security plugin configuration in JSON format. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-configuration @@ -5089,7 +5666,10 @@ paths: patch: operationId: security.patch_configuration.0 x-operation-group: security.patch_configuration - x-version-added: '1.0' + x-version-added: '2.10' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: A PATCH call is used to update the existing configuration using the REST API. Only accessible by admins and users with rest api access and only when put or patch is enabled. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-configuration @@ -5098,6 +5678,8 @@ paths: responses: '200': $ref: '#/components/responses/security.patch_configuration@200' + '403': + $ref: '#/components/responses/security.patch_configuration@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -5108,7 +5690,10 @@ paths: put: operationId: security.update_configuration.0 x-operation-group: security.update_configuration - x-version-added: '1.0' + x-version-added: '2.10' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Adds or updates the existing configuration using the REST API. Only accessible by admins and users with rest api access and only when put or patch is enabled. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#update-configuration @@ -5117,6 +5702,8 @@ paths: responses: '200': $ref: '#/components/responses/security.update_configuration@200' + '403': + $ref: '#/components/responses/security.update_configuration@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -5127,7 +5714,10 @@ paths: get: operationId: security.get_certificates.0 x-operation-group: security.get_certificates - x-version-added: '1.0' + x-version-added: '2.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves the cluster security certificates. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-certificates @@ -5136,6 +5726,8 @@ paths: $ref: '#/components/responses/security.get_certificates@200' '400': $ref: '#/components/responses/security.get_certificates@400' + '403': + $ref: '#/components/responses/security.get_certificates@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -5146,7 +5738,10 @@ paths: put: operationId: security.reload_http_certificates.0 x-operation-group: security.reload_http_certificates - x-version-added: '1.0' + x-version-added: '2.8' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Reload HTTP layer communication certificates. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#reload-http-certificates @@ -5155,6 +5750,8 @@ paths: $ref: '#/components/responses/security.reload_http_certificates@200' '400': $ref: '#/components/responses/security.reload_http_certificates@400' + '403': + $ref: '#/components/responses/security.reload_http_certificates@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -5165,7 +5762,10 @@ paths: put: operationId: security.reload_transport_certificates.0 x-operation-group: security.reload_transport_certificates - x-version-added: '1.0' + x-version-added: '2.8' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Reload Transport layer communication certificates. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#reload-transport-certificates @@ -5174,6 +5774,8 @@ paths: $ref: '#/components/responses/security.reload_transport_certificates@200' '400': $ref: '#/components/responses/security.reload_transport_certificates@400' + '403': + $ref: '#/components/responses/security.reload_transport_certificates@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -5185,6 +5787,9 @@ paths: operationId: security.get_tenancy_config.0 x-operation-group: security.get_tenancy_config x-version-added: '2.7' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves multi-tenancy configuration. Only accessible to admins and users with REST API permissions. externalDocs: url: https://opensearch.org/docs/latest/security/multi-tenancy/dynamic-config/#configuring-multi-tenancy-with-the-rest-api @@ -5203,6 +5808,9 @@ paths: operationId: security.create_update_tenancy_config.0 x-operation-group: security.create_update_tenancy_config x-version-added: '2.7' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the multi-tenancy configuration. Only accessible to admins and users with REST API permissions. externalDocs: url: https://opensearch.org/docs/latest/security/multi-tenancy/dynamic-config/#configuring-multi-tenancy-with-the-rest-api @@ -5224,6 +5832,9 @@ paths: operationId: security.get_tenants.0 x-operation-group: security.get_tenants x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves all tenants. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-tenants @@ -5242,6 +5853,9 @@ paths: operationId: security.patch_tenants.0 x-operation-group: security.patch_tenants x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Add, delete, or modify multiple tenants in a single call. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-tenants @@ -5263,6 +5877,9 @@ paths: operationId: security.delete_tenant.0 x-operation-group: security.delete_tenant x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Delete the specified tenant. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group @@ -5282,6 +5899,9 @@ paths: operationId: security.get_tenant.0 x-operation-group: security.get_tenant x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves one tenant. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-tenant @@ -5299,6 +5919,9 @@ paths: operationId: security.patch_tenant.0 x-operation-group: security.patch_tenant x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Add, delete, or modify a single tenant. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-tenant @@ -5320,6 +5943,9 @@ paths: operationId: security.create_tenant.0 x-operation-group: security.create_tenant x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the specified tenant. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#create-tenant @@ -5335,6 +5961,8 @@ paths: responses: '200': $ref: '#/components/responses/security.create_tenant@200' + '201': + $ref: '#/components/responses/security.create_tenant@201' '400': $ref: '#/components/responses/security.create_tenant@400' /_plugins/_security/api/user: @@ -5342,6 +5970,9 @@ paths: operationId: security.get_users_legacy.0 x-operation-group: security.get_users_legacy x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieve all internal users. Legacy API. responses: '200': @@ -5357,6 +5988,9 @@ paths: operationId: security.delete_user_legacy.0 x-operation-group: security.delete_user_legacy x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Delete the specified user. Legacy API. parameters: - $ref: '#/components/parameters/security.delete_user_legacy::path.username' @@ -5372,6 +6006,9 @@ paths: operationId: security.get_user_legacy.0 x-operation-group: security.get_user_legacy x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieve one user. Legacy API. parameters: - $ref: '#/components/parameters/security.get_user_legacy::path.username' @@ -5387,6 +6024,9 @@ paths: operationId: security.create_user_legacy.0 x-operation-group: security.create_user_legacy x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the specified user. Legacy API. parameters: - $ref: '#/components/parameters/security.create_user_legacy::path.username' @@ -5400,12 +6040,17 @@ paths: responses: '200': $ref: '#/components/responses/security.create_user_legacy@200' + '201': + $ref: '#/components/responses/security.create_user_legacy@201' /_plugins/_security/api/user/{username}/authtoken: post: operationId: security.generate_user_token_legacy.0 x-operation-group: security.generate_user_token_legacy - x-version-added: '1.0' - description: Generates authorization token for the given user. Legacy API. + x-version-added: '2.7' + x-distributions-excluded: + - amazon-managed + - amazon-serverless + description: Generates authorization token for the given user. Legacy API. Not Implemented. parameters: - $ref: '#/components/parameters/security.generate_user_token_legacy::path.username' - $ref: '#/components/parameters/_global::query.pretty' @@ -5414,15 +6059,16 @@ paths: - $ref: '#/components/parameters/_global::query.source' - $ref: '#/components/parameters/_global::query.filter_path' responses: - '200': - $ref: '#/components/responses/security.generate_user_token_legacy@200' - '400': - $ref: '#/components/responses/security.generate_user_token_legacy@400' + '501': + $ref: '#/components/responses/security.generate_user_token_legacy@501' /_plugins/_security/api/validate: get: operationId: security.validate.0 x-operation-group: security.validate x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Checks whether the v6 security configuration is valid and ready to be migrated to v7. parameters: - $ref: '#/components/parameters/security.validate::query.accept_invalid' @@ -5441,6 +6087,9 @@ paths: operationId: security.authinfo.0 x-operation-group: security.authinfo x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Returns the authentication information. parameters: - $ref: '#/components/parameters/security.authinfo::query.auth_type' @@ -5459,6 +6108,9 @@ paths: operationId: security.authinfo.1 x-operation-group: security.authinfo x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Returns the authentication information. parameters: - $ref: '#/components/parameters/security.authinfo::query.auth_type' @@ -5478,6 +6130,9 @@ paths: operationId: security.get_dashboards_info.0 x-operation-group: security.get_dashboards_info x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves the current security-dashboards plugin configuration. responses: '200': @@ -5494,9 +6149,10 @@ paths: operationId: security.post_dashboards_info.1 x-operation-group: security.post_dashboards_info x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates the current security-dashboards plugin configuration. - requestBody: - $ref: '#/components/requestBodies/security.post_dashboards_info' responses: '200': $ref: '#/components/responses/security.post_dashboards_info@200' @@ -5513,6 +6169,9 @@ paths: operationId: security.health.0 x-operation-group: security.health x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Checks to see if the Security plugin is up and running. parameters: - $ref: '#/components/parameters/security.health::query.mode' @@ -5530,6 +6189,9 @@ paths: operationId: security.health.1 x-operation-group: security.health x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Checks to see if the Security plugin is up and running. parameters: - $ref: '#/components/parameters/security.health::query.mode' @@ -5548,10 +6210,15 @@ paths: operationId: security.tenant_info.0 x-operation-group: security.tenant_info x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves the tenant names if any exist. Only accessible to super admins or kibanaserver user. responses: '200': $ref: '#/components/responses/security.tenant_info@200' + '403': + $ref: '#/components/responses/security.tenant_info@403' '500': $ref: '#/components/responses/security.tenant_info@500' parameters: @@ -5564,10 +6231,15 @@ paths: operationId: security.tenant_info.1 x-operation-group: security.tenant_info x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves the tenant names if any exist. Only accessible to super admins or kibanaserver user. responses: '200': $ref: '#/components/responses/security.tenant_info@200' + '403': + $ref: '#/components/responses/security.tenant_info@403' '500': $ref: '#/components/responses/security.tenant_info@500' parameters: @@ -5580,7 +6252,10 @@ paths: get: operationId: security.who_am_i.0 x-operation-group: security.who_am_i - x-version-added: '1.0' + x-version-added: '2.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Gets the user identity related information for currently logged in user. responses: '200': @@ -5596,7 +6271,10 @@ paths: post: operationId: security.who_am_i.1 x-operation-group: security.who_am_i - x-version-added: '1.0' + x-version-added: '2.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Gets the user identity related information for currently logged in user. responses: '200': @@ -5614,6 +6292,9 @@ paths: operationId: security.who_am_i_protected.0 x-operation-group: security.who_am_i_protected x-version-added: '2.11' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Gets the user identity related information for currently logged in user. User needs to have access to this endpoint when authorization at REST layer is enabled. responses: '200': @@ -5864,7 +6545,7 @@ paths: operationId: transforms.stop.0 x-operation-group: transforms.stop x-version-added: '1.0' - description: stop transform. + description: Stop transform. externalDocs: url: https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#stop-a-transform-job parameters: @@ -6429,6 +7110,10 @@ paths: responses: '200': $ref: '#/components/responses/search@200' + '400': + $ref: '#/components/responses/search@400' + '404': + $ref: '#/components/responses/search@404' post: operationId: search.1 x-operation-group: search @@ -6493,6 +7178,10 @@ paths: responses: '200': $ref: '#/components/responses/search@200' + '400': + $ref: '#/components/responses/search@400' + '404': + $ref: '#/components/responses/search@404' /_search_shards: get: operationId: search_shards.0 @@ -6863,6 +7552,9 @@ paths: operationId: indices.segments.0 x-operation-group: indices.segments x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Provides low-level information about segments in a Lucene index. externalDocs: url: https://opensearch.org/docs/latest @@ -6884,6 +7576,9 @@ paths: operationId: indices.get_settings.0 x-operation-group: indices.get_settings x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Returns settings for one or more indices. externalDocs: url: https://opensearch.org/docs/latest/api-reference/index-apis/get-settings/ @@ -7892,6 +8587,8 @@ paths: responses: '200': $ref: '#/components/responses/indices.get_alias@200' + '404': + $ref: '#/components/responses/indices.get_alias@404' put: operationId: indices.put_alias.5 x-operation-group: indices.put_alias @@ -7958,6 +8655,8 @@ paths: responses: '200': $ref: '#/components/responses/indices.get_alias@200' + '404': + $ref: '#/components/responses/indices.get_alias@404' head: operationId: indices.exists_alias.1 x-operation-group: indices.exists_alias @@ -7980,6 +8679,8 @@ paths: responses: '200': $ref: '#/components/responses/indices.exists_alias@200' + '404': + $ref: '#/components/responses/indices.exists_alias@404' post: operationId: indices.put_alias.6 x-operation-group: indices.put_alias @@ -9417,6 +10118,10 @@ paths: responses: '200': $ref: '#/components/responses/search@200' + '400': + $ref: '#/components/responses/search@400' + '404': + $ref: '#/components/responses/search@404' post: operationId: search.3 x-operation-group: search @@ -9482,6 +10187,10 @@ paths: responses: '200': $ref: '#/components/responses/search@200' + '400': + $ref: '#/components/responses/search@400' + '404': + $ref: '#/components/responses/search@404' /{index}/_search_shards: get: operationId: search_shards.2 @@ -9622,6 +10331,9 @@ paths: operationId: indices.segments.1 x-operation-group: indices.segments x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Provides low-level information about segments in a Lucene index. externalDocs: url: https://opensearch.org/docs/latest @@ -10343,6 +11055,95 @@ paths: $ref: '#/components/responses/knn.stats@200' deprecated: true x-ignorable: true + /_opendistro/_ppl: + post: + operationId: ppl.query.0_superseded + x-operation-group: ppl.query + x-version-added: '1.0' + description: Send a PPL query to the PPL plugin. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + parameters: + - $ref: '#/components/parameters/ppl.query::query.format' + - $ref: '#/components/parameters/ppl.query::query.sanitize' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ppl.query' + responses: + '200': + $ref: '#/components/responses/ppl.query@200' + deprecated: true + x-ignorable: true + /_opendistro/_ppl/_explain: + post: + operationId: ppl.explain.0_superseded + x-operation-group: ppl.explain + x-version-added: '1.0' + description: Shows how a query is executed against OpenSearch. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ + parameters: + - $ref: '#/components/parameters/ppl.explain::query.format' + - $ref: '#/components/parameters/ppl.explain::query.sanitize' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ppl.explain' + responses: + '200': + $ref: '#/components/responses/ppl.explain@200' + deprecated: true + x-ignorable: true + /_opendistro/_ppl/stats: + get: + operationId: ppl.get_stats.0_superseded + x-operation-group: ppl.get_stats + x-version-added: '1.0' + description: Collect metrics for the plugin within the interval. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + parameters: + - $ref: '#/components/parameters/ppl.get_stats::query.format' + - $ref: '#/components/parameters/ppl.get_stats::query.sanitize' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + responses: + '200': + $ref: '#/components/responses/ppl.get_stats@200' + deprecated: true + x-ignorable: true + post: + operationId: ppl.post_stats.1_superseded + x-operation-group: ppl.post_stats + x-version-added: '1.0' + description: By a stats endpoint, you are able to collect metrics for the plugin within the interval. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ + parameters: + - $ref: '#/components/parameters/ppl.post_stats::query.format' + - $ref: '#/components/parameters/ppl.post_stats::query.sanitize' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/ppl.post_stats' + responses: + '200': + $ref: '#/components/responses/ppl.post_stats@200' + deprecated: true + x-ignorable: true /_opendistro/_rollup/jobs/{rollupID}: get: operationId: rollups.get.0_superseded @@ -10470,6 +11271,9 @@ paths: operationId: security.get_account_details.0_superseded x-operation-group: security.get_account_details x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Returns account details for the current user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-account-details @@ -10488,6 +11292,9 @@ paths: operationId: security.change_password.0_superseded x-operation-group: security.change_password x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Changes the password for the current user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#change-password @@ -10496,6 +11303,8 @@ paths: responses: '200': $ref: '#/components/responses/security.change_password@200' + '403': + $ref: '#/components/responses/security.change_password@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -10509,6 +11318,9 @@ paths: operationId: security.get_action_group.0_superseded x-operation-group: security.get_action_group x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves one action group. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-action-group @@ -10528,6 +11340,9 @@ paths: operationId: security.create_action_group.0_superseded x-operation-group: security.create_action_group x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the specified action group. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#create-action-group @@ -10543,12 +11358,17 @@ paths: responses: '200': $ref: '#/components/responses/security.create_action_group@200' + '201': + $ref: '#/components/responses/security.create_action_group@201' deprecated: true x-ignorable: true patch: operationId: security.patch_action_group.0_superseded x-operation-group: security.patch_action_group x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates individual attributes of an action group. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-action-group @@ -10570,6 +11390,9 @@ paths: operationId: security.delete_action_group.0_superseded x-operation-group: security.delete_action_group x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Delete a specified action group. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group @@ -10590,6 +11413,9 @@ paths: operationId: security.update_audit_configuration.0_superseded x-operation-group: security.update_audit_configuration x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates the audit configuration. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#audit-logs @@ -10611,6 +11437,9 @@ paths: operationId: security.authtoken.0_superseded x-operation-group: security.authtoken x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Returns the authorization token. responses: '200': @@ -10629,6 +11458,9 @@ paths: x-operation-group: security.cache x-ignorable: true x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Not supported for cache API. responses: '501': @@ -10644,6 +11476,9 @@ paths: operationId: security.cache.2_superseded x-operation-group: security.cache x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless x-ignorable: true description: Not supported for cache API. responses: @@ -10660,6 +11495,9 @@ paths: operationId: security.cache.3_superseded x-operation-group: security.cache x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless x-ignorable: true description: Not supported for cache API. responses: @@ -10676,6 +11514,9 @@ paths: operationId: security.flush_cache.0_superseded x-operation-group: security.flush_cache x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Flushes the Security plugin user, authentication, and authorization cache. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#flush-cache @@ -10695,6 +11536,9 @@ paths: operationId: security.get_user.0_superseded x-operation-group: security.get_user x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieve one internal user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-user @@ -10714,6 +11558,9 @@ paths: operationId: security.create_user.0_superseded x-operation-group: security.create_user x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the specified user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#create-user @@ -10735,6 +11582,9 @@ paths: operationId: security.patch_user.0_superseded x-operation-group: security.patch_user x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates individual attributes of an internal user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-user @@ -10756,6 +11606,9 @@ paths: operationId: security.delete_user.0_superseded x-operation-group: security.delete_user x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Delete the specified user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#delete-user @@ -10775,7 +11628,10 @@ paths: post: operationId: security.generate_user_token.0_superseded x-operation-group: security.generate_user_token - x-version-added: '1.0' + x-version-added: '2.7' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Generates authorization token for the given user. parameters: - $ref: '#/components/parameters/security.generate_user_token::path.username' @@ -10796,6 +11652,9 @@ paths: operationId: security.migrate.0_superseded x-operation-group: security.migrate x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Migrates security configuration from v6 to v7. responses: '200': @@ -10815,6 +11674,9 @@ paths: operationId: security.get_permissions_info.0_superseded x-operation-group: security.get_permissions_info x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Gets the evaluated REST API permissions for the currently logged in user. responses: '200': @@ -10834,6 +11696,9 @@ paths: operationId: security.get_role.0_superseded x-operation-group: security.get_role x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves one role. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-role @@ -10853,6 +11718,9 @@ paths: operationId: security.create_role.0_superseded x-operation-group: security.create_role x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the specified role. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#create-role @@ -10868,12 +11736,17 @@ paths: responses: '200': $ref: '#/components/responses/security.create_role@200' + '201': + $ref: '#/components/responses/security.create_role@201' deprecated: true x-ignorable: true patch: operationId: security.patch_role.0_superseded x-operation-group: security.patch_role x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates individual attributes of a role. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-role @@ -10897,6 +11770,9 @@ paths: operationId: security.delete_role.0_superseded x-operation-group: security.delete_role x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Delete the specified role. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#delete-role @@ -10917,6 +11793,9 @@ paths: operationId: security.get_role_mapping.0_superseded x-operation-group: security.get_role_mapping x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves one role mapping. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-role-mapping @@ -10936,6 +11815,9 @@ paths: operationId: security.create_role_mapping.0_superseded x-operation-group: security.create_role_mapping x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the specified role mapping. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#create-role-mapping @@ -10951,12 +11833,17 @@ paths: responses: '200': $ref: '#/components/responses/security.create_role_mapping@200' + '201': + $ref: '#/components/responses/security.create_role_mapping@201' deprecated: true x-ignorable: true patch: operationId: security.patch_role_mapping.0_superseded x-operation-group: security.patch_role_mapping x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates individual attributes of a role mapping. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mapping @@ -10980,6 +11867,9 @@ paths: operationId: security.delete_role_mapping.0_superseded x-operation-group: security.delete_role_mapping x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Deletes the specified role mapping. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#delete-role-mapping @@ -10999,7 +11889,10 @@ paths: get: operationId: security.get_configuration.0_superseded x-operation-group: security.get_configuration - x-version-added: '1.0' + x-version-added: '2.10' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Returns the current Security plugin configuration in JSON format. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-configuration @@ -11017,7 +11910,10 @@ paths: patch: operationId: security.patch_configuration.0_superseded x-operation-group: security.patch_configuration - x-version-added: '1.0' + x-version-added: '2.10' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: A PATCH call is used to update the existing configuration using the REST API. Only accessible by admins and users with rest api access and only when put or patch is enabled. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-configuration @@ -11026,6 +11922,8 @@ paths: responses: '200': $ref: '#/components/responses/security.patch_configuration@200' + '403': + $ref: '#/components/responses/security.patch_configuration@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -11038,7 +11936,10 @@ paths: put: operationId: security.update_configuration.0_superseded x-operation-group: security.update_configuration - x-version-added: '1.0' + x-version-added: '2.10' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Adds or updates the existing configuration using the REST API. Only accessible by admins and users with rest api access and only when put or patch is enabled. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#update-configuration @@ -11047,6 +11948,8 @@ paths: responses: '200': $ref: '#/components/responses/security.update_configuration@200' + '403': + $ref: '#/components/responses/security.update_configuration@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -11059,7 +11962,10 @@ paths: get: operationId: security.get_certificates.0_superseded x-operation-group: security.get_certificates - x-version-added: '1.0' + x-version-added: '2.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves the cluster security certificates. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-certificates @@ -11068,6 +11974,8 @@ paths: $ref: '#/components/responses/security.get_certificates@200' '400': $ref: '#/components/responses/security.get_certificates@400' + '403': + $ref: '#/components/responses/security.get_certificates@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -11080,7 +11988,10 @@ paths: put: operationId: security.reload_transport_certificates.0_superseded x-operation-group: security.reload_transport_certificates - x-version-added: '1.0' + x-version-added: '2.8' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Reload Transport layer communication certificates. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#reload-transport-certificates @@ -11089,6 +12000,8 @@ paths: $ref: '#/components/responses/security.reload_transport_certificates@200' '400': $ref: '#/components/responses/security.reload_transport_certificates@400' + '403': + $ref: '#/components/responses/security.reload_transport_certificates@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -11101,7 +12014,10 @@ paths: put: operationId: security.reload_http_certificates.0_superseded x-operation-group: security.reload_http_certificates - x-version-added: '1.0' + x-version-added: '2.8' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Reload HTTP layer communication certificates. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#reload-http-certificates @@ -11110,6 +12026,8 @@ paths: $ref: '#/components/responses/security.reload_http_certificates@200' '400': $ref: '#/components/responses/security.reload_http_certificates@400' + '403': + $ref: '#/components/responses/security.reload_http_certificates@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -11123,6 +12041,9 @@ paths: operationId: security.get_distinguished_name.0_superseded x-operation-group: security.get_distinguished_name x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves distinguished names. Only accessible to super-admins and with rest-api permissions when enabled. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-distinguished-names @@ -11137,6 +12058,8 @@ paths: responses: '200': $ref: '#/components/responses/security.get_distinguished_name@200' + '400': + $ref: '#/components/responses/security.get_distinguished_name@400' '403': $ref: '#/components/responses/security.get_distinguished_name@403' deprecated: true @@ -11145,6 +12068,9 @@ paths: operationId: security.update_distinguished_name.0_superseded x-operation-group: security.update_distinguished_name x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Adds or updates the specified distinguished names in the cluster or node allow list. Only accessible to super-admins and with rest-api permissions when enabled. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#update-distinguished-names @@ -11160,6 +12086,8 @@ paths: responses: '200': $ref: '#/components/responses/security.update_distinguished_name@200' + '400': + $ref: '#/components/responses/security.update_distinguished_name@400' '403': $ref: '#/components/responses/security.update_distinguished_name@403' deprecated: true @@ -11168,6 +12096,9 @@ paths: operationId: security.patch_distinguished_name.0_superseded x-operation-group: security.patch_distinguished_name x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates a distinguished cluster name for a specific cluster. Only accessible to super-admins and with rest-api permissions when enabled. parameters: - $ref: '#/components/parameters/security.patch_distinguished_name::path.cluster_name' @@ -11181,6 +12112,8 @@ paths: responses: '200': $ref: '#/components/responses/security.patch_distinguished_name@200' + '400': + $ref: '#/components/responses/security.patch_distinguished_name@400' '403': $ref: '#/components/responses/security.patch_distinguished_name@403' deprecated: true @@ -11189,6 +12122,9 @@ paths: operationId: security.delete_distinguished_name.0_superseded x-operation-group: security.delete_distinguished_name x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Deletes all distinguished names in the specified cluster or node allow list. Only accessible to super-admins and with rest-api permissions when enabled. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#delete-distinguished-names @@ -11202,6 +12138,8 @@ paths: responses: '200': $ref: '#/components/responses/security.delete_distinguished_name@200' + '400': + $ref: '#/components/responses/security.delete_distinguished_name@400' '403': $ref: '#/components/responses/security.delete_distinguished_name@403' deprecated: true @@ -11211,6 +12149,9 @@ paths: operationId: security.get_tenancy_config.0_superseded x-operation-group: security.get_tenancy_config x-version-added: '2.7' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves multi-tenancy configuration. Only accessible to admins and users with REST API permissions. externalDocs: url: https://opensearch.org/docs/latest/security/multi-tenancy/dynamic-config/#configuring-multi-tenancy-with-the-rest-api @@ -11231,6 +12172,9 @@ paths: operationId: security.create_update_tenancy_config.0_superseded x-operation-group: security.create_update_tenancy_config x-version-added: '2.7' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the multi-tenancy configuration. Only accessible to admins and users with REST API permissions. externalDocs: url: https://opensearch.org/docs/latest/security/multi-tenancy/dynamic-config/#configuring-multi-tenancy-with-the-rest-api @@ -11254,6 +12198,9 @@ paths: operationId: security.get_tenants.0_superseded x-operation-group: security.get_tenants x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves all tenants. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-tenants @@ -11274,6 +12221,9 @@ paths: operationId: security.patch_tenants.0_superseded x-operation-group: security.patch_tenants x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Add, delete, or modify multiple tenants in a single call. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-tenants @@ -11297,6 +12247,9 @@ paths: operationId: security.get_tenant.0_superseded x-operation-group: security.get_tenant x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves one tenant. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#get-tenant @@ -11316,6 +12269,9 @@ paths: operationId: security.create_tenant.0_superseded x-operation-group: security.create_tenant x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the specified tenant. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#create-tenant @@ -11331,6 +12287,8 @@ paths: responses: '200': $ref: '#/components/responses/security.create_tenant@200' + '201': + $ref: '#/components/responses/security.create_tenant@201' '400': $ref: '#/components/responses/security.create_tenant@400' deprecated: true @@ -11339,6 +12297,9 @@ paths: operationId: security.patch_tenant.0_superseded x-operation-group: security.patch_tenant x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Add, delete, or modify a single tenant. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#patch-tenant @@ -11362,6 +12323,9 @@ paths: operationId: security.delete_tenant.0_superseded x-operation-group: security.delete_tenant x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Delete the specified tenant. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group @@ -11384,6 +12348,9 @@ paths: operationId: security.get_users_legacy.0_superseded x-operation-group: security.get_users_legacy x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieve all internal users. Legacy API. responses: '200': @@ -11401,6 +12368,9 @@ paths: operationId: security.get_user_legacy.0_superseded x-operation-group: security.get_user_legacy x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieve one user. Legacy API. parameters: - $ref: '#/components/parameters/security.get_user_legacy::path.username' @@ -11418,6 +12388,9 @@ paths: operationId: security.create_user_legacy.0_superseded x-operation-group: security.create_user_legacy x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the specified user. Legacy API. parameters: - $ref: '#/components/parameters/security.create_user_legacy::path.username' @@ -11431,12 +12404,17 @@ paths: responses: '200': $ref: '#/components/responses/security.create_user_legacy@200' + '201': + $ref: '#/components/responses/security.create_user_legacy@201' deprecated: true x-ignorable: true delete: operationId: security.delete_user_legacy.0_superseded x-operation-group: security.delete_user_legacy x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Delete the specified user. Legacy API. parameters: - $ref: '#/components/parameters/security.delete_user_legacy::path.username' @@ -11454,8 +12432,11 @@ paths: post: operationId: security.generate_user_token_legacy.0_superseded x-operation-group: security.generate_user_token_legacy - x-version-added: '1.0' - description: Generates authorization token for the given user. Legacy API. + x-version-added: '2.7' + x-distributions-excluded: + - amazon-managed + - amazon-serverless + description: Generates authorization token for the given user. Legacy API. Not Implemented. parameters: - $ref: '#/components/parameters/security.generate_user_token_legacy::path.username' - $ref: '#/components/parameters/_global::query.pretty' @@ -11464,10 +12445,8 @@ paths: - $ref: '#/components/parameters/_global::query.source' - $ref: '#/components/parameters/_global::query.filter_path' responses: - '200': - $ref: '#/components/responses/security.generate_user_token_legacy@200' - '400': - $ref: '#/components/responses/security.generate_user_token_legacy@400' + '501': + $ref: '#/components/responses/security.generate_user_token_legacy@501' deprecated: true x-ignorable: true /_opendistro/_security/api/validate: @@ -11475,6 +12454,9 @@ paths: operationId: security.validate.0_superseded x-operation-group: security.validate x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Checks whether the v6 security configuration is valid and ready to be migrated to v7. parameters: - $ref: '#/components/parameters/security.validate::query.accept_invalid' @@ -11494,13 +12476,18 @@ paths: get: operationId: security.get_allowlist.0_superseded x-operation-group: security.get_allowlist - x-version-added: '1.0' + x-version-added: '2.1' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves the current list of allowed API accessible to normal user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api responses: '200': $ref: '#/components/responses/security.get_allowlist@200' + '403': + $ref: '#/components/responses/security.get_allowlist@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -11512,7 +12499,10 @@ paths: put: operationId: security.create_allowlist.0_superseded x-operation-group: security.create_allowlist - x-version-added: '1.0' + x-version-added: '2.1' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Creates or replaces the allowlisted APIs. Accessible via Super Admin certificate or REST API permission. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api @@ -11521,6 +12511,8 @@ paths: responses: '200': $ref: '#/components/responses/security.create_allowlist@200' + '403': + $ref: '#/components/responses/security.create_allowlist@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -11532,7 +12524,10 @@ paths: patch: operationId: security.patch_allowlist.0_superseded x-operation-group: security.patch_allowlist - x-version-added: '1.0' + x-version-added: '2.1' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates the current list of allowed API accessible to normal user. externalDocs: url: https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api @@ -11541,6 +12536,8 @@ paths: responses: '200': $ref: '#/components/responses/security.patch_allowlist@200' + '403': + $ref: '#/components/responses/security.patch_allowlist@403' parameters: - $ref: '#/components/parameters/_global::query.pretty' - $ref: '#/components/parameters/_global::query.human' @@ -11554,6 +12551,9 @@ paths: operationId: security.authinfo.0_superseded x-operation-group: security.authinfo x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Returns the authentication information. parameters: - $ref: '#/components/parameters/security.authinfo::query.auth_type' @@ -11574,6 +12574,9 @@ paths: operationId: security.authinfo.1_superseded x-operation-group: security.authinfo x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Returns the authentication information. parameters: - $ref: '#/components/parameters/security.authinfo::query.auth_type' @@ -11595,6 +12598,9 @@ paths: operationId: security.health.0_superseded x-operation-group: security.health x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Checks to see if the Security plugin is up and running. parameters: - $ref: '#/components/parameters/security.health::query.mode' @@ -11614,6 +12620,9 @@ paths: operationId: security.health.1_superseded x-operation-group: security.health x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Checks to see if the Security plugin is up and running. parameters: - $ref: '#/components/parameters/security.health::query.mode' @@ -11634,6 +12643,9 @@ paths: operationId: security.get_dashboards_info.0_superseded x-operation-group: security.get_dashboards_info x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves the current security-dashboards plugin configuration. responses: '200': @@ -11652,9 +12664,10 @@ paths: operationId: security.post_dashboards_info.1_superseded x-operation-group: security.post_dashboards_info x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Updates the current security-dashboards plugin configuration. - requestBody: - $ref: '#/components/requestBodies/security.post_dashboards_info' responses: '200': $ref: '#/components/responses/security.post_dashboards_info@200' @@ -11673,10 +12686,15 @@ paths: operationId: security.tenant_info.0_superseded x-operation-group: security.tenant_info x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves the tenant names if any exist. Only accessible to super admins or kibanaserver user. responses: '200': $ref: '#/components/responses/security.tenant_info@200' + '403': + $ref: '#/components/responses/security.tenant_info@403' '500': $ref: '#/components/responses/security.tenant_info@500' parameters: @@ -11691,10 +12709,15 @@ paths: operationId: security.tenant_info.1_superseded x-operation-group: security.tenant_info x-version-added: '1.0' + x-distributions-excluded: + - amazon-managed + - amazon-serverless description: Retrieves the tenant names if any exist. Only accessible to super admins or kibanaserver user. responses: '200': $ref: '#/components/responses/security.tenant_info@200' + '403': + $ref: '#/components/responses/security.tenant_info@403' '500': $ref: '#/components/responses/security.tenant_info@500' parameters: @@ -11774,6 +12797,28 @@ paths: $ref: '#/components/responses/sql.close@200' deprecated: true x-ignorable: true + /_opendistro/_sql/settings: + put: + operationId: sql.settings.0_superseded + x-operation-group: sql.settings + x-version-added: '1.0' + description: Adds SQL settings to the standard OpenSearch cluster settings. + externalDocs: + url: https://opensearch.org/docs/latest/search-plugins/sql/settings/ + parameters: + - $ref: '#/components/parameters/sql.settings::query.format' + - $ref: '#/components/parameters/_global::query.pretty' + - $ref: '#/components/parameters/_global::query.human' + - $ref: '#/components/parameters/_global::query.error_trace' + - $ref: '#/components/parameters/_global::query.source' + - $ref: '#/components/parameters/_global::query.filter_path' + requestBody: + $ref: '#/components/requestBodies/sql.settings' + responses: + '200': + $ref: '#/components/responses/sql.settings@200' + deprecated: true + x-ignorable: true /_opendistro/_sql/stats: get: operationId: sql.get_stats.0_superseded @@ -18991,6 +20036,12 @@ components: required: true schema: type: string + ml.deploy_model::path.model_id: + name: model_id + in: path + required: true + schema: + type: string ml.get_model_group::path.model_group_id: name: model_group_id in: path @@ -19003,6 +20054,12 @@ components: required: true schema: type: string + ml.undeploy_model::path.model_id: + name: model_id + in: path + required: true + schema: + type: string msearch_template::path.index: in: path name: index @@ -19689,6 +20746,98 @@ components: schema: type: string required: true + observability.delete_object::path.object_id: + in: path + name: object_id + description: The ID of the Observability Object. + required: true + schema: + type: string + style: simple + observability.delete_objects::query.objectId: + in: query + name: objectId + description: The ID of a single Observability Object to delete. + required: false + schema: + type: string + style: form + observability.delete_objects::query.objectIdList: + in: query + name: objectIdList + description: A comma-separated list of Observability Object IDs to delete. + required: false + schema: + type: string + style: form + observability.get_object::path.object_id: + in: path + name: object_id + description: The ID of the Observability Object. + required: true + schema: + type: string + style: simple + observability.update_object::path.object_id: + in: path + name: object_id + description: The ID of the Observability Object. + required: true + schema: + type: string + style: simple + ppl.explain::query.format: + name: format + in: query + description: A short version of the Accept header, e.g. json, yaml. + schema: + type: string + ppl.explain::query.sanitize: + name: sanitize + in: query + description: Specifies whether to escape special characters in the results. + schema: + type: boolean + default: true + ppl.get_stats::query.format: + name: format + in: query + description: A short version of the Accept header, e.g. json, yaml. + schema: + type: string + ppl.get_stats::query.sanitize: + name: sanitize + in: query + description: Specifies whether to escape special characters in the results. + schema: + type: boolean + default: true + ppl.post_stats::query.format: + name: format + in: query + description: A short version of the Accept header, e.g. json, yaml. + schema: + type: string + ppl.post_stats::query.sanitize: + name: sanitize + in: query + description: Specifies whether to escape special characters in the results. + schema: + type: boolean + default: true + ppl.query::query.format: + name: format + in: query + description: A short version of the Accept header, e.g. json, yaml. + schema: + type: string + ppl.query::query.sanitize: + name: sanitize + in: query + description: Specifies whether to escape special characters in the results. + schema: + type: boolean + default: true put_script::path.context: in: path name: context @@ -19737,6 +20886,20 @@ components: schema: $ref: '#/components/schemas/_common:Duration' style: form + query.datasource_delete::path.datasource_name: + name: datasource_name + in: path + description: The Name of the DataSource to delete. + schema: + type: string + required: true + query.datasource_retrieve::path.datasource_name: + name: datasource_name + in: path + description: The Name of the DataSource to retrieve. + schema: + type: string + required: true rank_eval::path.index: in: path name: index @@ -20662,120 +21825,168 @@ components: description: The name of the action group to create or replace. schema: type: string - description: The name of the action group to create or replace. required: true security.create_role_mapping::path.role: name: role in: path + description: The name of the role to create a role mapping for. schema: type: string required: true security.create_role::path.role: name: role in: path + description: The name of the role to be created. schema: type: string required: true security.create_tenant::path.tenant: name: tenant in: path + description: The name of the tenant to be created. schema: type: string required: true security.create_user_legacy::path.username: name: username in: path + description: The name of the user to be created. schema: type: string required: true security.create_user::path.username: name: username in: path + description: The name of the user to be created. schema: type: string required: true security.delete_action_group::path.action_group: name: action_group in: path - description: Action group to delete. + description: The name of the action group to delete. schema: type: string - description: Action group to delete. required: true security.delete_distinguished_name::path.cluster_name: name: cluster_name in: path + description: The cluster-name to delete from list of distinguished names. schema: type: string required: true security.delete_role_mapping::path.role: name: role in: path + description: The name of the role whose mapping needs to delete. schema: type: string required: true security.delete_role::path.role: name: role in: path + description: The name of the role to delete. schema: type: string required: true security.delete_tenant::path.tenant: name: tenant in: path + description: The name of the tenant to delete. schema: type: string required: true security.delete_user_legacy::path.username: name: username in: path + description: The name of the user to delete. schema: type: string required: true security.delete_user::path.username: name: username in: path + description: The name of the user to delete. schema: type: string required: true security.generate_user_token_legacy::path.username: name: username in: path + description: The name of the user for whom an auth token is to be vended. schema: type: string required: true security.generate_user_token::path.username: name: username in: path + description: The name of the user for whom an auth token is to be vended. schema: type: string required: true security.get_action_group::path.action_group: name: action_group in: path - description: Action group to retrieve. + description: The name of the action group to retrieve. schema: type: string - description: Action group to retrieve. required: true + security.get_all_certificates::query.cert_type: + name: cert_type + in: query + description: The type of certificates (HTTP, TRANSPORT, ALL) to retrieve from all nodes. + schema: + type: string + required: false + security.get_all_certificates::query.timeout: + name: timeout + in: query + description: The maximum duration, in seconds, to be spent to retrieve certificates from all nodes. + schema: + $ref: '#/components/schemas/_common:Duration' + required: false security.get_distinguished_name::path.cluster_name: name: cluster_name in: path + description: The cluster-name to retrieve nodes DN setting for. schema: type: string required: true security.get_distinguished_name::query.show_all: name: show_all in: query + description: A boolean flag to include/exclude static nodes DN from final result. schema: type: boolean required: false security.get_distinguished_names::query.show_all: name: show_all in: query + description: A boolean flag to include/exclude static nodes DN from final result. schema: type: boolean required: false + security.get_node_certificates::path.node_id: + name: node_id + in: path + description: The full-id of the node to retrieve certificates. + schema: + type: string + required: true + security.get_node_certificates::query.cert_type: + name: cert_type + in: query + description: The type of certificates (HTTP, TRANSPORT, ALL) to retrieve for a node. + schema: + type: string + required: false + security.get_node_certificates::query.timeout: + name: timeout + in: query + description: The maximum duration, in seconds, to be spent to retrieve a node's certificates. + schema: + $ref: '#/components/schemas/_common:Duration' + required: false security.get_role_mapping::path.role: name: role in: path @@ -20791,80 +22002,93 @@ components: security.get_sslinfo::query.show_dn: name: show_dn in: query - description: The domain names from all certificates. + description: A boolean flag to indicate whether all domain names should be returned. schema: - type: string - description: A boolean flag to indicate whether all domain names should be returned. + type: + - boolean + - string required: false security.get_tenant::path.tenant: name: tenant in: path + description: The name of the tenant to retrieve. schema: type: string required: true security.get_user_legacy::path.username: name: username in: path + description: The name of the user to retrieve. schema: type: string required: true security.get_user::path.username: name: username in: path + description: The name of the user to retrieve. schema: type: string required: true security.health::query.mode: name: mode in: query + description: A flag to indicate whether service should consider security-plugin's status before returning health response. `strict` mode indicates service should check security plugin status. schema: type: string required: false security.patch_action_group::path.action_group: name: action_group in: path + description: The name of the action group to update. schema: type: string required: true security.patch_distinguished_name::path.cluster_name: name: cluster_name in: path + description: The cluster-name to update nodesDn value. schema: type: string required: true security.patch_role_mapping::path.role: name: role in: path + description: The name of the role to update role-mapping for. schema: type: string required: true security.patch_role::path.role: name: role in: path + description: The name of the role to update. schema: type: string required: true security.patch_tenant::path.tenant: name: tenant in: path + description: The name of the tenant to update. schema: type: string required: true security.patch_user::path.username: name: username in: path + description: The name of the user to update. schema: type: string required: true security.update_distinguished_name::path.cluster_name: name: cluster_name in: path + description: The cluster-name to create/update nodesDn value for. schema: type: string required: true security.validate::query.accept_invalid: name: accept_invalid in: query + description: A boolean flag to indicate whether invalid v6 configuration should be allowed. schema: type: boolean required: false @@ -21290,7 +22514,6 @@ components: description: A short version of the Accept header, e.g. json, yaml. schema: type: string - description: A short version of the Accept header, e.g. json, yaml. sql.close::query.sanitize: name: sanitize in: query @@ -21298,14 +22521,12 @@ components: schema: type: boolean default: true - description: Specifies whether to escape special characters in the results sql.explain::query.format: name: format in: query description: A short version of the Accept header, e.g. json, yaml. schema: type: string - description: A short version of the Accept header, e.g. json, yaml. sql.explain::query.sanitize: name: sanitize in: query @@ -21313,14 +22534,12 @@ components: schema: type: boolean default: true - description: Specifies whether to escape special characters in the results sql.get_stats::query.format: name: format in: query description: A short version of the Accept header, e.g. json, yaml. schema: type: string - description: A short version of the Accept header, e.g. json, yaml. sql.get_stats::query.sanitize: name: sanitize in: query @@ -21328,14 +22547,12 @@ components: schema: type: boolean default: true - description: Specifies whether to escape special characters in the results sql.post_stats::query.format: name: format in: query description: A short version of the Accept header, e.g. json, yaml. schema: type: string - description: A short version of the Accept header, e.g. json, yaml. sql.post_stats::query.sanitize: name: sanitize in: query @@ -21343,14 +22560,12 @@ components: schema: type: boolean default: true - description: Specifies whether to escape special characters in the results sql.query::query.format: name: format in: query description: A short version of the Accept header, e.g. json, yaml. schema: type: string - description: A short version of the Accept header, e.g. json, yaml. sql.query::query.sanitize: name: sanitize in: query @@ -21358,7 +22573,12 @@ components: schema: type: boolean default: true - description: Specifies whether to escape special characters in the results + sql.settings::query.format: + name: format + in: query + description: A short version of the Accept header, e.g. json, yaml. + schema: + type: string tasks.cancel::path.task_id: in: path name: task_id @@ -22810,7 +24030,8 @@ components: ml.search_models: content: application/json: - $ref: '#/components/schemas/ml._common:SearchModelsQuery' + schema: + $ref: '#/components/schemas/ml._common:SearchModelsQuery' msearch: content: application/x-ndjson: @@ -22887,6 +24108,34 @@ components: schema: $ref: '#/components/schemas/notifications._common:NotificationsConfig' required: true + observability.create_object: + content: + application/json: + schema: + $ref: '#/components/schemas/observability._common:ObservabilityObject' + observability.update_object: + content: + application/json: + schema: + $ref: '#/components/schemas/observability._common:ObservabilityObject' + ppl.explain: + content: + application/json: + schema: + $ref: '#/components/schemas/sql._common:Explain' + required: true + ppl.post_stats: + content: + application/json: + schema: + $ref: '#/components/schemas/sql._common:Stats' + required: true + ppl.query: + content: + application/json: + schema: + $ref: '#/components/schemas/sql._common:Query' + required: true put_script: content: application/json: @@ -22899,6 +24148,16 @@ components: - script description: The document required: true + query.datasources_create: + content: + application/json: + schema: + $ref: '#/components/schemas/query._common:DataSource' + query.datasources_update: + content: + application/json: + schema: + $ref: '#/components/schemas/query._common:DataSource' rank_eval: content: application/json: @@ -22956,7 +24215,6 @@ components: examples: RemoteStoreRestore_example1: summary: Examples for Post Remote Storage Restore Operation. - description: '' value: indices: - books @@ -23243,9 +24501,7 @@ components: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/security._common:MultiTenancyConfig' + $ref: '#/components/schemas/security._common:MultiTenancyConfig' required: true security.create_user: content: @@ -23382,12 +24638,6 @@ components: items: $ref: '#/components/schemas/security._common:PatchOperation' required: true - security.post_dashboards_info: - content: - application/json: - schema: - $ref: '#/components/schemas/security._common:DashboardsInfo' - required: false security.update_audit_configuration: content: application/json: @@ -23404,7 +24654,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/security._common:PatchOperation' + $ref: '#/components/schemas/security._common:DistinguishedNames' snapshot.clone: content: application/json: @@ -23500,19 +24750,27 @@ components: content: application/json: schema: - $ref: '#/components/schemas/sql._common:SqlExplain' + $ref: '#/components/schemas/sql._common:Explain' required: true sql.post_stats: content: application/json: schema: - $ref: '#/components/schemas/sql._common:SqlStats' + $ref: '#/components/schemas/sql._common:Stats' required: true sql.query: content: application/json: schema: - $ref: '#/components/schemas/sql._common:SqlQuery' + $ref: '#/components/schemas/sql._common:Query' + required: true + sql.settings: + content: + application/json: + schema: + anyOf: + - $ref: '#/components/schemas/sql._common:SqlSettingsPlain' + - $ref: '#/components/schemas/sql._common:SqlSettings' required: true termvectors: content: @@ -23587,7 +24845,6 @@ components: description: The search definition using the Query DSL responses: bulk@200: - description: '' content: application/json: schema: @@ -23612,7 +24869,6 @@ components: - items - took cat.aliases@200: - description: '' content: text/plain: type: string @@ -23622,7 +24878,6 @@ components: items: $ref: '#/components/schemas/cat.aliases:AliasesRecord' cat.all_pit_segments@200: - description: '' content: text/plain: type: string @@ -23632,7 +24887,6 @@ components: items: $ref: '#/components/schemas/cat._common:CatPitSegmentsRecord' cat.allocation@200: - description: '' content: text/plain: type: string @@ -23642,7 +24896,6 @@ components: items: $ref: '#/components/schemas/cat.allocation:AllocationRecord' cat.cluster_manager@200: - description: '' content: text/plain: type: string @@ -23652,7 +24905,6 @@ components: items: $ref: '#/components/schemas/cat.cluster_manager:ClusterManagerRecord' cat.count@200: - description: '' content: text/plain: type: string @@ -23662,7 +24914,6 @@ components: items: $ref: '#/components/schemas/cat.count:CountRecord' cat.fielddata@200: - description: '' content: text/plain: type: string @@ -23672,7 +24923,6 @@ components: items: $ref: '#/components/schemas/cat.fielddata:FielddataRecord' cat.health@200: - description: '' content: text/plain: type: string @@ -23697,13 +24947,11 @@ components: items: $ref: '#/components/schemas/cat.health:HealthRecord' cat.help@200: - description: '' content: text/plain: schema: type: string cat.indices@200: - description: '' content: text/plain: type: string @@ -23728,7 +24976,6 @@ components: items: $ref: '#/components/schemas/cat.indices:IndicesRecord' cat.master@200: - description: '' content: text/plain: type: string @@ -23738,7 +24985,6 @@ components: items: $ref: '#/components/schemas/cat.master:MasterRecord' cat.nodeattrs@200: - description: '' content: text/plain: type: string @@ -23748,7 +24994,6 @@ components: items: $ref: '#/components/schemas/cat.nodeattrs:NodeAttributesRecord' cat.nodes@200: - description: '' content: text/plain: type: string @@ -23758,7 +25003,6 @@ components: items: $ref: '#/components/schemas/cat.nodes:NodesRecord' cat.pending_tasks@200: - description: '' content: text/plain: type: string @@ -23768,7 +25012,6 @@ components: items: $ref: '#/components/schemas/cat.pending_tasks:PendingTasksRecord' cat.pit_segments@200: - description: '' content: text/plain: type: string @@ -23778,7 +25021,6 @@ components: items: $ref: '#/components/schemas/cat._common:CatPitSegmentsRecord' cat.plugins@200: - description: '' content: text/plain: type: string @@ -23788,7 +25030,6 @@ components: items: $ref: '#/components/schemas/cat.plugins:PluginsRecord' cat.recovery@200: - description: '' content: text/plain: type: string @@ -23798,7 +25039,6 @@ components: items: $ref: '#/components/schemas/cat.recovery:RecoveryRecord' cat.repositories@200: - description: '' content: text/plain: type: string @@ -23808,7 +25048,6 @@ components: items: $ref: '#/components/schemas/cat.repositories:RepositoriesRecord' cat.segment_replication@200: - description: '' content: text/plain: type: string @@ -23818,7 +25057,6 @@ components: items: $ref: '#/components/schemas/cat._common:CatSegmentReplicationRecord' cat.segments@200: - description: '' content: text/plain: type: string @@ -23828,7 +25066,6 @@ components: items: $ref: '#/components/schemas/cat.segments:SegmentsRecord' cat.shards@200: - description: '' content: text/plain: type: string @@ -23838,7 +25075,6 @@ components: items: $ref: '#/components/schemas/cat.shards:ShardsRecord' cat.snapshots@200: - description: '' content: text/plain: type: string @@ -23848,7 +25084,6 @@ components: items: $ref: '#/components/schemas/cat.snapshots:SnapshotsRecord' cat.tasks@200: - description: '' content: text/plain: type: string @@ -23858,7 +25093,6 @@ components: items: $ref: '#/components/schemas/cat.tasks:TasksRecord' cat.templates@200: - description: '' content: text/plain: type: string @@ -23868,7 +25102,6 @@ components: items: $ref: '#/components/schemas/cat.templates:TemplatesRecord' cat.thread_pool@200: - description: '' content: text/plain: type: string @@ -23878,7 +25111,6 @@ components: items: $ref: '#/components/schemas/cat.thread_pool:ThreadPoolRecord' clear_scroll@200: - description: '' content: application/json: schema: @@ -23892,7 +25124,6 @@ components: - num_freed - succeeded cluster.allocation_explain@200: - description: '' content: application/json: schema: @@ -23960,25 +25191,19 @@ components: - primary - shard cluster.delete_component_template@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' - cluster.delete_decommission_awareness@200: - description: '' + cluster.delete_decommission_awareness@200: {} cluster.delete_voting_config_exclusions@200: - description: '' content: application/json: {} - cluster.delete_weighted_routing@200: - description: '' + cluster.delete_weighted_routing@200: {} cluster.exists_component_template@200: - description: '' content: application/json: {} cluster.get_component_template@200: - description: '' content: application/json: schema: @@ -23990,10 +25215,8 @@ components: $ref: '#/components/schemas/cluster._common:ComponentTemplate' required: - component_templates - cluster.get_decommission_awareness@200: - description: '' + cluster.get_decommission_awareness@200: {} cluster.get_settings@200: - description: '' content: application/json: schema: @@ -24014,16 +25237,13 @@ components: required: - persistent - transient - cluster.get_weighted_routing@200: - description: '' + cluster.get_weighted_routing@200: {} cluster.health@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/cluster.health:HealthResponseBody' cluster.pending_tasks@200: - description: '' content: application/json: schema: @@ -24036,19 +25256,15 @@ components: required: - tasks cluster.post_voting_config_exclusions@200: - description: '' content: application/json: {} cluster.put_component_template@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' - cluster.put_decommission_awareness@200: - description: '' + cluster.put_decommission_awareness@200: {} cluster.put_settings@200: - description: '' content: application/json: schema: @@ -24066,10 +25282,8 @@ components: - acknowledged - persistent - transient - cluster.put_weighted_routing@200: - description: '' + cluster.put_weighted_routing@200: {} cluster.remote_info@200: - description: '' content: application/json: schema: @@ -24077,7 +25291,6 @@ components: additionalProperties: $ref: '#/components/schemas/cluster.remote_info:ClusterRemoteInfo' cluster.reroute@200: - description: '' content: application/json: schema: @@ -24098,19 +25311,16 @@ components: required: - acknowledged cluster.state@200: - description: '' content: application/json: schema: type: object cluster.stats@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/cluster.stats:StatsResponseBase' count@200: - description: '' content: application/json: schema: @@ -24124,7 +25334,6 @@ components: - _shards - count create_pit@200: - description: '' content: application/json: schema: @@ -24138,25 +25347,21 @@ components: type: integer format: int64 create@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:WriteResponseBase' dangling_indices.delete_dangling_index@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' dangling_indices.import_dangling_index@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' dangling_indices.list_dangling_indices@200: - description: '' content: application/json: schema: @@ -24173,7 +25378,6 @@ components: required: - dangling_indices delete_all_pits@200: - description: '' content: application/json: schema: @@ -24184,13 +25388,11 @@ components: items: $ref: '#/components/schemas/_core._common:PitsDetailsDeleteAll' delete_by_query_rethrottle@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/tasks._common:TaskListResponseBase' delete_by_query@200: - description: '' content: application/json: schema: @@ -24231,7 +25433,6 @@ components: version_conflicts: type: number delete_pit@200: - description: '' content: application/json: schema: @@ -24242,27 +25443,22 @@ components: items: $ref: '#/components/schemas/_core._common:DeletedPit' delete_script@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' delete@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:WriteResponseBase' exists_source@200: - description: '' content: application/json: {} exists@200: - description: '' content: application/json: {} explain@200: - description: '' content: application/json: schema: @@ -24283,7 +25479,6 @@ components: - _index - matched field_caps@200: - description: '' content: application/json: schema: @@ -24301,7 +25496,6 @@ components: - fields - indices get_all_pits@200: - description: '' content: application/json: schema: @@ -24312,7 +25506,6 @@ components: items: $ref: '#/components/schemas/_core._common:PitDetail' get_script_context@200: - description: '' content: application/json: schema: @@ -24325,7 +25518,6 @@ components: required: - contexts get_script_languages@200: - description: '' content: application/json: schema: @@ -24343,7 +25535,6 @@ components: - language_contexts - types_allowed get_script@200: - description: '' content: application/json: schema: @@ -24359,31 +25550,26 @@ components: - _id - found get_source@200: - description: '' content: application/json: schema: type: object get@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_core.get:GetResult' index@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:WriteResponseBase' index@201: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:WriteResponseBase' indices.add_block@200: - description: '' content: application/json: schema: @@ -24402,7 +25588,6 @@ components: - indices - shards_acknowledged indices.analyze@200: - description: '' content: application/json: schema: @@ -24415,13 +25600,11 @@ components: items: $ref: '#/components/schemas/indices.analyze:AnalyzeToken' indices.clear_cache@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:ShardsOperationResponseBase' indices.clone@200: - description: '' content: application/json: schema: @@ -24438,7 +25621,6 @@ components: - index - shards_acknowledged indices.close@200: - description: '' content: application/json: schema: @@ -24457,13 +25639,11 @@ components: - indices - shards_acknowledged indices.create_data_stream@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' indices.create@200: - description: '' content: application/json: schema: @@ -24480,7 +25660,6 @@ components: - index - shards_acknowledged indices.data_streams_stats@200: - description: '' content: application/json: schema: @@ -24511,63 +25690,54 @@ components: - data_streams - total_store_size_bytes indices.delete_alias@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' indices.delete_data_stream@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' indices.delete_index_template@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' indices.delete_template@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' indices.delete@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:IndicesResponseBase' indices.exists_alias@200: - description: '' + content: + application/json: {} + indices.exists_alias@404: content: application/json: {} indices.exists_index_template@200: - description: '' content: application/json: {} indices.exists_template@200: - description: '' content: application/json: {} indices.exists@200: - description: '' content: application/json: {} indices.exists@404: - description: '' content: application/json: {} indices.flush@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:ShardsOperationResponseBase' indices.forcemerge@200: - description: '' content: application/json: schema: @@ -24581,15 +25751,16 @@ components: you can use the task_id to get the status of the task at _tasks/ type: string indices.get_alias@200: - description: '' content: application/json: schema: type: object additionalProperties: $ref: '#/components/schemas/indices.get_alias:IndexAliases' + indices.get_alias@404: + content: + application/json: {} indices.get_data_stream@200: - description: '' content: application/json: schema: @@ -24602,7 +25773,6 @@ components: required: - data_streams indices.get_field_mapping@200: - description: '' content: application/json: schema: @@ -24610,7 +25780,6 @@ components: additionalProperties: $ref: '#/components/schemas/indices.get_field_mapping:TypeFieldMappings' indices.get_index_template@200: - description: '' content: application/json: schema: @@ -24623,7 +25792,6 @@ components: required: - index_templates indices.get_mapping@200: - description: '' content: application/json: schema: @@ -24631,7 +25799,6 @@ components: additionalProperties: $ref: '#/components/schemas/indices.get_mapping:IndexMappingRecord' indices.get_settings@200: - description: '' content: application/json: schema: @@ -24639,17 +25806,14 @@ components: additionalProperties: $ref: '#/components/schemas/indices._common:IndexState' indices.get_template@200: - description: '' content: application/json: schema: type: object additionalProperties: $ref: '#/components/schemas/indices._common:TemplateMapping' - indices.get_upgrade@200: - description: '' + indices.get_upgrade@200: {} indices.get@200: - description: '' content: application/json: schema: @@ -24657,7 +25821,6 @@ components: additionalProperties: $ref: '#/components/schemas/indices._common:IndexState' indices.open@200: - description: '' content: application/json: schema: @@ -24678,37 +25841,31 @@ components: - shards_acknowledged additionalProperties: false indices.put_alias@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' indices.put_index_template@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' indices.put_mapping@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:IndicesResponseBase' indices.put_settings@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' indices.put_template@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' indices.recovery@200: - description: '' content: application/json: schema: @@ -24716,13 +25873,11 @@ components: additionalProperties: $ref: '#/components/schemas/indices.recovery:RecoveryStatus' indices.refresh@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:ShardsOperationResponseBase' indices.resolve_index@200: - description: '' content: application/json: schema: @@ -24745,7 +25900,6 @@ components: - data_streams - indices indices.rollover@200: - description: '' content: application/json: schema: @@ -24776,7 +25930,6 @@ components: - rolled_over - shards_acknowledged indices.segments@200: - description: '' content: application/json: schema: @@ -24792,7 +25945,6 @@ components: - _shards - indices indices.shard_stores@200: - description: '' content: application/json: schema: @@ -24805,7 +25957,6 @@ components: required: - indices indices.shrink@200: - description: '' content: application/json: schema: @@ -24822,13 +25973,11 @@ components: - index - shards_acknowledged indices.simulate_index_template@200: - description: '' content: application/json: schema: type: object indices.simulate_template@200: - description: '' content: application/json: schema: @@ -24843,7 +25992,6 @@ components: required: - template indices.split@200: - description: '' content: application/json: schema: @@ -24860,33 +26008,29 @@ components: - index - shards_acknowledged indices.stats@200: - description: '' content: application/json: schema: type: object properties: + _shards: + $ref: '#/components/schemas/_common:ShardStatistics' + _all: + $ref: '#/components/schemas/indices.stats:AllIndicesStats' indices: type: object additionalProperties: $ref: '#/components/schemas/indices.stats:IndicesStats' - _shards: - $ref: '#/components/schemas/_common:ShardStatistics' - _all: - $ref: '#/components/schemas/indices.stats:IndicesStats' required: - _all - _shards indices.update_aliases@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' - indices.upgrade@200: - description: '' + indices.upgrade@200: {} indices.validate_query@200: - description: '' content: application/json: schema: @@ -24905,7 +26049,6 @@ components: required: - valid info@200: - description: '' content: application/json: schema: @@ -24928,13 +26071,11 @@ components: - tagline - version ingest.delete_pipeline@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' ingest.get_pipeline@200: - description: '' content: application/json: schema: @@ -24942,7 +26083,6 @@ components: additionalProperties: $ref: '#/components/schemas/ingest._common:Pipeline' ingest.processor_grok@200: - description: '' content: application/json: schema: @@ -24955,13 +26095,11 @@ components: required: - patterns ingest.put_pipeline@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' ingest.simulate@200: - description: '' content: application/json: schema: @@ -24973,20 +26111,13 @@ components: $ref: '#/components/schemas/ingest.simulate:PipelineSimulation' required: - docs - knn.delete_model@200: - description: '' - knn.get_model@200: - description: '' - knn.search_models@200: - description: '' - knn.stats@200: - description: '' - knn.train_model@200: - description: '' - knn.warmup@200: - description: '' + knn.delete_model@200: {} + knn.get_model@200: {} + knn.search_models@200: {} + knn.stats@200: {} + knn.train_model@200: {} + knn.warmup@200: {} mget@200: - description: '' content: application/json: schema: @@ -25001,45 +26132,77 @@ components: ml.delete_model_group@200: content: application/json: - $ref: '#/components/schemas/ml._common:ModelGroup' + schema: + $ref: '#/components/schemas/_common:WriteResponseBase' ml.delete_model@200: content: application/json: - $ref: '#/components/schemas/ml._common:ModelGroup' + schema: + $ref: '#/components/schemas/_common:WriteResponseBase' + ml.deploy_model@200: + content: + application/json: + schema: + type: object + properties: + status: + type: string + task_id: + type: string + task_type: + type: string + required: + - status + - task_id ml.get_model_group@200: content: application/json: - $ref: '#/components/schemas/ml._common:ModelGroup' + schema: + $ref: '#/components/schemas/ml._common:ModelGroup' ml.get_task@200: content: application/json: - $ref: '#/components/schemas/ml._common:Task' + schema: + $ref: '#/components/schemas/ml._common:Task' ml.register_model_group@200: content: application/json: - $ref: '#/components/schemas/ml._common:ModelGroupRegistration' + schema: + $ref: '#/components/schemas/ml._common:ModelGroupRegistration' ml.register_model@200: content: application/json: - $ref: '#/components/schemas/ml._common:Task' + schema: + type: object + properties: + status: + type: string + task_id: + type: string + required: + - status + - task_id ml.search_models@200: content: application/json: - $ref: '#/components/schemas/ml._common:SearchModelsResponse' + schema: + $ref: '#/components/schemas/ml._common:SearchModelsResponse' + ml.undeploy_model@200: + content: + application/json: + schema: + $ref: '#/components/schemas/ml._common:UndeployModelResponse' msearch_template@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_core.msearch:MultiSearchResult' msearch@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_core.msearch:MultiSearchResult' mtermvectors@200: - description: '' content: application/json: schema: @@ -25051,34 +26214,28 @@ components: $ref: '#/components/schemas/_core.mtermvectors:TermVectorsResult' required: - docs - nodes.hot_threads@200: - description: '' + nodes.hot_threads@200: {} nodes.info@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/nodes.info:ResponseBase' nodes.reload_secure_settings@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/nodes.reload_secure_settings:ResponseBase' nodes.stats@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/nodes.stats:ResponseBase' nodes.usage@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/nodes.usage:ResponseBase' notifications.create_config@200: - description: '' content: application/json: schema: @@ -25087,31 +26244,26 @@ components: config_id: type: string notifications.delete_config@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/notifications._common:DeleteConfigsResponse' notifications.delete_configs@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/notifications._common:DeleteConfigsResponse' notifications.get_config@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/notifications._common:GetConfigsResponse' notifications.get_configs@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/notifications._common:GetConfigsResponse' notifications.list_channels@200: - description: '' content: application/json: schema: @@ -25130,7 +26282,6 @@ components: items: $ref: '#/components/schemas/notifications._common:NotificationChannel' notifications.list_features@200: - description: '' content: application/json: schema: @@ -25143,7 +26294,6 @@ components: plugin_features: $ref: '#/components/schemas/notifications._common:NotificationsPluginFeaturesMap' notifications.send_test@200: - description: '' content: application/json: schema: @@ -25156,7 +26306,6 @@ components: items: $ref: '#/components/schemas/notifications._common:EventStatus' notifications.update_config@200: - description: '' content: application/json: schema: @@ -25164,18 +26313,172 @@ components: properties: config_id: type: string + observability.create_object@200: + description: Created + content: + application/json: + schema: + type: object + properties: + objectId: + type: string + observability.delete_object@200: + description: Deleted + content: + application/json: + schema: + type: object + properties: + deleteResponseList: + type: object + additionalProperties: + type: string + example: OK + observability.delete_object@404: + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/observability._common:NotFoundResponse' + observability.delete_objects@200: + description: Deleted + content: + application/json: + schema: + type: object + properties: + deleteResponseList: + type: object + additionalProperties: + type: string + example: OK + observability.delete_objects@404: + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/observability._common:NotFoundResponse' + observability.get_localstats@200: + description: Retrieves + content: + application/json: + schema: + type: string + observability.get_object@200: + description: Successful response of retrieving specific Observability Object. + content: + application/json: + schema: + $ref: '#/components/schemas/observability._common:ObservabilityObjectList' + observability.get_object@404: + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/observability._common:NotFoundResponse' + observability.list_objects@200: + description: Successful response of retrieving all Observability Objects. + content: + application/json: + schema: + $ref: '#/components/schemas/observability._common:ObservabilityObjectList' + observability.update_object@200: + description: Updated + content: + application/json: + schema: + type: object + properties: + objectId: + type: string + observability.update_object@404: + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/observability._common:NotFoundResponse' ping@200: - description: '' content: application/json: {} - put_script@200: + ppl.explain@200: + content: + application/json: + schema: + $ref: '#/components/schemas/sql._common:ExplainResponse' + required: true + ppl.get_stats@200: + content: + text/plain: + schema: + type: string + required: true + ppl.post_stats@200: + content: + text/plain: + schema: + type: string + required: true + ppl.query@200: description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/sql._common:QueryResponse' + put_script@200: content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' + query.datasource_delete@204: + description: No Content + content: + application/json: + schema: + type: object + properties: {} + query.datasource_delete@404: + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/query._common:DataSourceNotFound' + query.datasource_retrieve@200: + description: Successful response of retrieving Data Source. + content: + application/json: + schema: + $ref: '#/components/schemas/query._common:DataSourceRetrieve' + query.datasource_retrieve@404: + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/query._common:DataSourceNotFound' + query.datasources_create@201: + description: Created + content: + application/json: + schema: + type: string + query.datasources_list@200: + description: Successful response of retrieving all Data Sources. + content: + application/json: + schema: + $ref: '#/components/schemas/query._common:DataSourceList' + query.datasources_update@200: + description: Updated + content: + application/json: + schema: + type: string + query.datasources_update@404: + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/query._common:DataSourceNotFound' rank_eval@200: - description: '' content: application/json: schema: @@ -25198,7 +26501,6 @@ components: - failures - metric_score reindex_rethrottle@200: - description: '' content: application/json: schema: @@ -25211,7 +26513,6 @@ components: required: - nodes reindex@200: - description: '' content: application/json: schema: @@ -25252,7 +26553,6 @@ components: version_conflicts: type: number remote_store.restore@200: - description: '' content: application/json: schema: @@ -25265,7 +26565,6 @@ components: examples: RemoteStoreRestore_example1: summary: Examples for Post Remote Storage Restore Operation. - description: '' value: remote_store: indices: @@ -25275,7 +26574,6 @@ components: failed: 0 successful: 1 render_search_template@200: - description: '' content: application/json: schema: @@ -25287,8 +26585,7 @@ components: type: object required: - template_output - rollups.delete@200: - description: '' + rollups.delete@200: {} rollups.explain@200: content: application/json: @@ -25304,12 +26601,9 @@ components: application/json: schema: $ref: '#/components/schemas/rollups._common:RollupEntity' - rollups.start@200: - description: '' - rollups.stop@200: - description: '' + rollups.start@200: {} + rollups.stop@200: {} scripts_painless_execute@200: - description: '' content: application/json: schema: @@ -25320,13 +26614,11 @@ components: required: - result scroll@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_core.search:ResponseBody' search_pipeline.delete@200: - description: '' content: application/json: schema: @@ -25335,13 +26627,11 @@ components: acknowledged: type: boolean search_pipeline.get@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/search_pipeline._common:SearchPipelineMap' search_pipeline.put@200: - description: '' content: application/json: schema: @@ -25350,7 +26640,6 @@ components: acknowledged: type: boolean search_shards@200: - description: '' content: application/json: schema: @@ -25375,7 +26664,6 @@ components: - nodes - shards search_template@200: - description: '' content: application/json: schema: @@ -25423,265 +26711,282 @@ components: - timed_out - took search@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_core.search:ResponseBody' + search@400: + content: + application/json: + schema: + $ref: '#/components/schemas/query._common:ErrorResponse' + search@404: + content: + application/json: + schema: + $ref: '#/components/schemas/query._common:ErrorResponse' security.authinfo@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:AuthInfo' security.authinfo@500: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:InternalServerError' security.authtoken@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.cache@501: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:MethodNotImplemented' + schema: null security.change_password@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' + security.change_password@403: + content: + application/json: + schema: null security.config_upgrade_check@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:UpgradeCheck' security.config_upgrade_perform@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:UpgradePerform' + security.config_upgrade_perform@400: + content: + application/json: + schema: null security.create_action_group@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' + security.create_action_group@201: + content: + application/json: + schema: + $ref: '#/components/schemas/security._common:Created' security.create_allowlist@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:AllowListConfig' + security.create_allowlist@403: + content: + application/json: + schema: null security.create_role_mapping@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' + security.create_role_mapping@201: + content: + application/json: + schema: + $ref: '#/components/schemas/security._common:Created' security.create_role@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' + security.create_role@201: + content: + application/json: + schema: + $ref: '#/components/schemas/security._common:Created' security.create_tenant@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' - security.create_tenant@400: - description: '' + security.create_tenant@201: content: application/json: schema: - $ref: '#/components/schemas/security._common:BadRequest' + $ref: '#/components/schemas/security._common:Created' + security.create_tenant@400: + content: + application/json: + schema: null security.create_update_tenancy_config@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:MultiTenancyConfig' security.create_update_tenancy_config@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.create_user_legacy@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' + security.create_user_legacy@201: + content: + application/json: + schema: + $ref: '#/components/schemas/security._common:Created' security.create_user@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.delete_action_group@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.delete_distinguished_name@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' + security.delete_distinguished_name@400: + content: + application/json: + schema: null security.delete_distinguished_name@403: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:Unauthorized' + schema: null security.delete_role_mapping@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.delete_role@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.delete_tenant@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.delete_tenant@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.delete_user_legacy@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.delete_user@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.flush_cache@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.generate_obo_token@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:GenerateOBOToken' security.generate_obo_token@400: - description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' - security.generate_user_token_legacy@200: - description: '' content: + text/plain: + type: string application/json: - schema: - $ref: '#/components/schemas/security._common:Ok' - security.generate_user_token_legacy@400: - description: '' + schema: null + security.generate_user_token_legacy@501: content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.generate_user_token@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.generate_user_token@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.get_account_details@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:AccountDetails' security.get_action_group@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:ActionGroupsMap' security.get_action_groups@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:ActionGroupsMap' + security.get_all_certificates@200: + content: + application/json: + schema: + $ref: '#/components/schemas/security._common:GetCertificatesNew' + security.get_all_certificates@403: + content: + application/json: + schema: null + security.get_all_certificates@500: + content: + application/json: + schema: + $ref: '#/components/schemas/security._common:InternalServerError' security.get_allowlist@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:AllowListConfig' + security.get_allowlist@403: + content: + application/json: + schema: null security.get_audit_configuration@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:AuditConfigWithReadOnly' security.get_certificates@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:GetCertificates' security.get_certificates@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null + security.get_certificates@403: + content: + application/json: + schema: null security.get_configuration@200: - description: '' content: application/json: schema: - $ref: '#/components/schemas/security._common:DynamicConfig' + $ref: '#/components/schemas/security._common:SecurityConfig' security.get_dashboards_info@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:DashboardsInfo' security.get_dashboards_info@500: - description: '' content: application/json: schema: @@ -25692,392 +26997,371 @@ components: application/json: schema: $ref: '#/components/schemas/security._common:DistinguishedNames' + security.get_distinguished_name@400: + content: + application/json: + schema: null security.get_distinguished_name@403: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:Unauthorized' + schema: null security.get_distinguished_names@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:DistinguishedNamesMap' + security.get_distinguished_names@400: + description: Show nodesDn setting for given cluster. + content: + application/json: + schema: null security.get_distinguished_names@403: - description: '' + content: + application/json: + schema: null + security.get_node_certificates@200: content: application/json: schema: - $ref: '#/components/schemas/security._common:Unauthorized' + $ref: '#/components/schemas/security._common:GetCertificatesNew' + security.get_node_certificates@403: + content: + application/json: + schema: null + security.get_node_certificates@500: + content: + application/json: + schema: + $ref: '#/components/schemas/security._common:InternalServerError' security.get_permissions_info@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:PermissionsInfo' security.get_permissions_info@500: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:InternalServerError' security.get_role_mapping@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:RoleMappings' security.get_role_mappings@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:RoleMappings' security.get_role@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:RolesMap' security.get_roles@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:RolesMap' security.get_sslinfo@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:SSLInfo' security.get_sslinfo@500: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:InternalServerError' security.get_tenancy_config@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:MultiTenancyConfig' security.get_tenancy_config@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.get_tenant@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:TenantsMap' security.get_tenants@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:TenantsMap' security.get_tenants@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.get_user_legacy@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:UsersMap' security.get_user@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:UsersMap' security.get_users_legacy@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:UsersMap' security.get_users@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:UsersMap' security.health@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:HealthInfo' security.migrate@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.migrate@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.patch_action_group@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.patch_action_groups@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.patch_allowlist@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:AllowListConfig' + security.patch_allowlist@403: + content: + application/json: + schema: null security.patch_audit_configuration@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.patch_configuration@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' + security.patch_configuration@403: + content: + application/json: + schema: null security.patch_distinguished_name@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' + security.patch_distinguished_name@400: + content: + application/json: + schema: null security.patch_distinguished_name@403: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:Unauthorized' + schema: null security.patch_distinguished_names@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' + security.patch_distinguished_names@400: + content: + application/json: + schema: null security.patch_distinguished_names@403: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:Unauthorized' + schema: null security.patch_role_mapping@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.patch_role_mapping@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.patch_role_mappings@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.patch_role_mappings@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.patch_role@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.patch_role@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.patch_roles@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.patch_roles@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.patch_tenant@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.patch_tenant@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.patch_tenants@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.patch_tenants@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.patch_user@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.patch_users@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.post_dashboards_info@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:DashboardsInfo' security.post_dashboards_info@500: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:InternalServerError' security.reload_http_certificates@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.reload_http_certificates@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null + security.reload_http_certificates@403: + content: + application/json: + schema: null security.reload_transport_certificates@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.reload_transport_certificates@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null + security.reload_transport_certificates@403: + content: + application/json: + schema: null security.tenant_info@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:TenantInfo' + security.tenant_info@403: + content: + text/plain: + type: string + application/json: + schema: null security.tenant_info@500: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:InternalServerError' security.update_audit_configuration@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.update_configuration@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' + security.update_configuration@403: + content: + application/json: + schema: null security.update_distinguished_name@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' + security.update_distinguished_name@400: + content: + application/json: + schema: null security.update_distinguished_name@403: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:Unauthorized' + schema: null security.validate@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:Ok' security.validate@400: - description: '' content: application/json: - schema: - $ref: '#/components/schemas/security._common:BadRequest' + schema: null security.who_am_i_protected@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:WhoAmI' security.who_am_i_protected@500: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:InternalServerError' security.who_am_i@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:WhoAmI' security.who_am_i@500: - description: '' content: application/json: schema: $ref: '#/components/schemas/security._common:InternalServerError' snapshot.cleanup_repository@200: - description: '' content: application/json: schema: @@ -26088,19 +27372,16 @@ components: required: - results snapshot.clone@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' snapshot.create_repository@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' snapshot.create@200: - description: '' content: application/json: schema: @@ -26112,19 +27393,16 @@ components: snapshot: $ref: '#/components/schemas/snapshot._common:SnapshotInfo' snapshot.delete_repository@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' snapshot.delete@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' snapshot.get_repository@200: - description: '' content: application/json: schema: @@ -26132,7 +27410,6 @@ components: additionalProperties: $ref: '#/components/schemas/snapshot._common:Repository' snapshot.get@200: - description: '' content: application/json: schema: @@ -26156,7 +27433,6 @@ components: - remaining - total snapshot.restore@200: - description: '' content: application/json: schema: @@ -26167,7 +27443,6 @@ components: required: - snapshot snapshot.status@200: - description: '' content: application/json: schema: @@ -26180,7 +27455,6 @@ components: required: - snapshots snapshot.verify_repository@200: - description: '' content: application/json: schema: @@ -26202,7 +27476,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/sql._common:SqlExplainResponse' + $ref: '#/components/schemas/sql._common:ExplainResponse' required: true sql.get_stats@200: content: @@ -26217,19 +27491,21 @@ components: type: string required: true sql.query@200: - description: '' content: application/json: schema: - $ref: '#/components/schemas/sql._common:SqlQueryResponse' + $ref: '#/components/schemas/sql._common:QueryResponse' + sql.settings@200: + content: + application/json: + schema: + $ref: '#/components/schemas/sql._common:SqlSettingsResponse' tasks.cancel@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/tasks._common:TaskListResponseBase' tasks.get@200: - description: '' content: application/json: schema: @@ -26247,13 +27523,11 @@ components: - completed - task tasks.list@200: - description: '' content: application/json: schema: $ref: '#/components/schemas/tasks._common:TaskListResponseBase' termvectors@200: - description: '' content: application/json: schema: @@ -26279,8 +27553,7 @@ components: - _version - found - took - transforms.delete@200: - description: '' + transforms.delete@200: {} transforms.explain@200: content: application/json: @@ -26317,7 +27590,6 @@ components: schema: $ref: '#/components/schemas/_common:AcknowledgedResponseBase' update_by_query_rethrottle@200: - description: '' content: application/json: schema: @@ -26330,7 +27602,6 @@ components: required: - nodes update_by_query@200: - description: '' content: application/json: schema: @@ -26371,7 +27642,6 @@ components: throttled_until_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' update@200: - description: '' content: application/json: schema: @@ -26434,33 +27704,6 @@ components: - index - status - type - _common:BulkStats: - type: object - properties: - total_operations: - type: number - total_time: - $ref: '#/components/schemas/_common:Duration' - total_time_in_millis: - $ref: '#/components/schemas/_common:DurationValueUnitMillis' - total_size: - $ref: '#/components/schemas/_common:ByteSize' - total_size_in_bytes: - type: number - avg_time: - $ref: '#/components/schemas/_common:Duration' - avg_time_in_millis: - $ref: '#/components/schemas/_common:DurationValueUnitMillis' - avg_size: - $ref: '#/components/schemas/_common:ByteSize' - avg_size_in_bytes: - type: number - required: - - avg_size_in_bytes - - avg_time_in_millis - - total_operations - - total_size_in_bytes - - total_time_in_millis _common:byte: type: number _common:Bytes: @@ -26661,12 +27904,10 @@ components: description: |- A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. - pattern: ^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$ + pattern: ^([0-9\.]+)(?:d|h|m|s|ms|micros|nanos)$ type: string _common:DurationLarge: - description: |- - A date histogram interval. Similar to `Duration` with additional units: `w` (week), `M` (month), `q` (quarter) and - `y` (year) + description: 'A date histogram interval. Similar to `Duration` with additional units: `w` (week), `M` (month), `q` (quarter) and `y` (year).' type: string _common:DurationValueUnitMillis: allOf: @@ -26708,7 +27949,7 @@ components: - type additionalProperties: title: metadata - description: Additional details about the error + description: Additional details about the error. _common:ErrorResponseBase: type: object properties: @@ -26808,7 +28049,7 @@ components: - as 4 top/bottom/left/right coordinates - as 2 top_left / bottom_right points - as 2 top_right / bottom_left points - - as a WKT bounding box + - as a WKT bounding box. oneOf: - $ref: '#/components/schemas/_common:CoordsGeoBounds' - $ref: '#/components/schemas/_common:TopLeftBottomRightGeoBounds' @@ -26847,7 +28088,7 @@ components: - type: number - type: string _common:GeoHexCell: - description: A map hex cell (H3) reference + description: A map hex cell (H3) reference. type: string _common:GeoLine: type: object @@ -26871,7 +28112,7 @@ components: - as a `{lat, long}` object - as a geo hash value - as a `[lon, lat]` array - - as a string in `", "` or WKT point formats + - as a string in `", "` or WKT point formats. oneOf: - $ref: '#/components/schemas/_common:LatLonGeoLocation' - $ref: '#/components/schemas/_common:GeoHashLocation' @@ -26887,32 +28128,32 @@ components: - intersects - within _common:GeoTile: - description: A map tile reference, represented as `{zoom}/{x}/{y}` + description: A map tile reference, represented as `{zoom}/{x}/{y}`. type: string _common:GeoTilePrecision: type: number _common:GetStats: type: object properties: - current: + total: type: number - exists_time: + time: $ref: '#/components/schemas/_common:Duration' - exists_time_in_millis: + time_in_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' exists_total: type: number - missing_time: + exists_time: $ref: '#/components/schemas/_common:Duration' - missing_time_in_millis: + exists_time_in_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' missing_total: type: number - time: + missing_time: $ref: '#/components/schemas/_common:Duration' - time_in_millis: + missing_time_in_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' - total: + current: type: number required: - current @@ -26981,40 +28222,39 @@ components: _common:IndexingStats: type: object properties: + index_total: + type: number + index_time: + $ref: '#/components/schemas/_common:Duration' + index_time_in_millis: + $ref: '#/components/schemas/_common:DurationValueUnitMillis' index_current: type: number - delete_current: + index_failed: + type: number + delete_total: type: number delete_time: $ref: '#/components/schemas/_common:Duration' delete_time_in_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' - delete_total: + delete_current: type: number - doc_status: - $ref: '#/components/schemas/_common:DocStatus' - is_throttled: - type: boolean noop_update_total: type: number + is_throttled: + type: boolean throttle_time: $ref: '#/components/schemas/_common:Duration' throttle_time_in_millis: $ref: '#/components/schemas/_common:DurationValueUnitMillis' - index_time: - $ref: '#/components/schemas/_common:Duration' - index_time_in_millis: - $ref: '#/components/schemas/_common:DurationValueUnitMillis' - index_total: - type: number - index_failed: - type: number + doc_status: + $ref: '#/components/schemas/_common:DocStatus' types: + x-version-removed: '2.0' type: object additionalProperties: $ref: '#/components/schemas/_common:IndexingStats' - write_load: - type: number required: - delete_current - delete_time_in_millis @@ -27206,7 +28446,7 @@ components: items: type: string _common:MinimumShouldMatch: - description: The minimum number of terms that should match as integer, percentage or range + description: The minimum number of terms that should match as integer, percentage or range. oneOf: - type: number - type: string @@ -27287,7 +28527,7 @@ components: - transform - voting_only _common:NodeRoles: - description: '* @doc_id node-roles' + description: Node roles. type: array items: $ref: '#/components/schemas/_common:NodeRole' @@ -27840,6 +29080,21 @@ components: _common:SearchStats: type: object properties: + open_contexts: + description: The number of open search contexts. + type: number + query_current: + description: The number of shard query operations that are currently running. + type: number + query_time: + description: The total amount of time for all shard query operations. + $ref: '#/components/schemas/_common:Duration' + query_time_in_millis: + description: The total amount of time for all shard query operations, in milliseconds. + $ref: '#/components/schemas/_common:DurationValueUnitMillis' + query_total: + description: The total number of shard query operations. + type: number concurrent_query_total: description: The total number of query operations that use concurrent segment search. type: number @@ -27866,39 +29121,6 @@ components: fetch_total: description: The total number of shard fetch operations. type: number - open_contexts: - description: The number of open search contexts. - type: number - point_in_time_total: - description: The total number of shard Point in Time (PIT) contexts that have been created (completed and active) since the node last restarted. - type: number - point_in_time_time: - $ref: '#/components/schemas/_common:Duration' - point_in_time_time_in_millis: - description: The amount of time that shard PIT contexts have been held open since the node last restarted, in milliseconds. - $ref: '#/components/schemas/_common:DurationValueUnitMillis' - point_in_time_current: - description: The number of shard PIT contexts currently open. - type: number - query_current: - description: The number of shard query operations that are currently running. - type: number - query_time: - description: The total amount of time for all shard query operations. - $ref: '#/components/schemas/_common:Duration' - query_time_in_millis: - description: The total amount of time for all shard query operations, in milliseconds. - $ref: '#/components/schemas/_common:DurationValueUnitMillis' - query_total: - description: The total number of shard query operations. - type: number - request: - type: object - description: Statistics about coordinator search operations for the node. - additionalProperties: - $ref: '#/components/schemas/_common:RequestStats' - search_idle_reactivate_count_total: - type: number scroll_current: description: The number of shard scroll operations that are currently running. type: number @@ -27911,6 +29133,17 @@ components: scroll_total: description: The total number of shard scroll operations. type: number + point_in_time_total: + description: The total number of shard Point in Time (PIT) contexts that have been created (completed and active) since the node last restarted. + type: number + point_in_time_time: + $ref: '#/components/schemas/_common:Duration' + point_in_time_time_in_millis: + description: The amount of time that shard PIT contexts have been held open since the node last restarted, in milliseconds. + $ref: '#/components/schemas/_common:DurationValueUnitMillis' + point_in_time_current: + description: The number of shard PIT contexts currently open. + type: number suggest_current: description: The number of shard suggest operations that are currently running. type: number @@ -27923,6 +29156,13 @@ components: suggest_total: description: The total number of shard suggest operations. type: number + search_idle_reactivate_count_total: + type: number + request: + type: object + description: Statistics about coordinator search operations for the node. + additionalProperties: + $ref: '#/components/schemas/_common:RequestStats' groups: type: object additionalProperties: @@ -28188,13 +29428,6 @@ components: reserved_in_bytes: description: A prediction, in bytes, of how much larger the shard stores will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities. type: number - total_data_set_size: - $ref: '#/components/schemas/_common:ByteSize' - total_data_set_size_in_bytes: - description: |- - Total data set size, in bytes, of all shards assigned to selected nodes. - This includes the size of shards not stored fully on the nodes, such as the cache for partially mounted indices. - type: number required: - reserved_in_bytes - size_in_bytes @@ -28285,7 +29518,7 @@ components: - model_id - model_text _common:TimeOfDay: - description: Time of day, expressed as HH:MM:SS + description: Time of day, expressed as HH:MM:SS. type: string _common:TimeUnit: type: string @@ -28354,14 +29587,14 @@ components: _common:ulong: type: number _common:UnitMillis: - description: Time unit for milliseconds + description: Time unit for milliseconds. type: number format: int64 _common:UnitNanos: - description: Time unit for nanoseconds + description: Time unit for nanoseconds. type: number _common:UnitSeconds: - description: Time unit for seconds + description: Time unit for seconds. type: number _common:Username: type: string @@ -28385,7 +29618,7 @@ components: Although "void" is generally used for the unit type that has only one value, this is to be interpreted as the bottom type that has no value at all. Most languages have a unit type, but few have a bottom type. - See https://en.m.wikipedia.org/wiki/Unit_type and https://en.m.wikipedia.org/wiki/Bottom_type + See https://en.m.wikipedia.org/wiki/Unit_type and https://en.m.wikipedia.org/wiki/Bottom_type. type: object _common:WaitForActiveShardOptions: type: string @@ -34463,6 +35696,41 @@ components: - keyword required: - type + _common.mapping:KnnVectorMethod: + type: object + properties: + name: + type: string + space_type: + type: string + engine: + type: string + parameters: + type: object + additionalProperties: + type: object + required: + - name + _common.mapping:KnnVectorProperty: + allOf: + - $ref: '#/components/schemas/_common.mapping:KnnVectorPropertyBase' + - type: object + properties: + type: + type: string + enum: + - knn_vector + required: + - type + _common.mapping:KnnVectorPropertyBase: + type: object + properties: + dimension: + type: number + method: + $ref: '#/components/schemas/_common.mapping:KnnVectorMethod' + required: + - dimension _common.mapping:LongNumberProperty: allOf: - $ref: '#/components/schemas/_common.mapping:NumberPropertyBase' @@ -34661,6 +35929,7 @@ components: - $ref: '#/components/schemas/_common.mapping:IntegerRangeProperty' - $ref: '#/components/schemas/_common.mapping:IpRangeProperty' - $ref: '#/components/schemas/_common.mapping:LongRangeProperty' + - $ref: '#/components/schemas/_common.mapping:KnnVectorProperty' _common.mapping:PropertyBase: type: object properties: @@ -35447,10 +36716,7 @@ components: validation_method: $ref: '#/components/schemas/_common.query_dsl:GeoValidationMethod' ignore_unmapped: - description: |- - Set to `true` to ignore an unmapped field and not match any documents for this query. - Set to `false` to throw an exception if the field is not mapped. - type: boolean + $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' _common.query_dsl:GeoDecayFunction: allOf: - $ref: '#/components/schemas/_common.query_dsl:DecayFunctionBase' @@ -35471,11 +36737,7 @@ components: validation_method: $ref: '#/components/schemas/_common.query_dsl:GeoValidationMethod' ignore_unmapped: - description: |- - Set to `true` to ignore an unmapped field and not match any documents for this query. - Set to `false` to throw an exception if the field is not mapped. - type: boolean - default: false + $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' field: type: object required: @@ -35494,17 +36756,14 @@ components: validation_method: $ref: '#/components/schemas/_common.query_dsl:GeoValidationMethod' ignore_unmapped: - type: boolean + $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' _common.query_dsl:GeoShapeQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl:QueryBase' - type: object properties: ignore_unmapped: - description: |- - Set to `true` to ignore an unmapped field and not match any documents for this query. - Set to `false` to throw an exception if the field is not mapped. - type: boolean + $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' _common.query_dsl:GeoValidationMethod: type: string enum: @@ -35517,8 +36776,8 @@ components: - type: object properties: ignore_unmapped: + $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' description: Indicates whether to ignore an unmapped `type` and not return any documents instead of an error. - type: boolean inner_hits: $ref: '#/components/schemas/_core.search:InnerHits' max_children: @@ -35546,10 +36805,10 @@ components: - type: object properties: ignore_unmapped: + $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' description: |- Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error. You can use this parameter to query multiple indices that may not contain the `parent_type`. - type: boolean inner_hits: $ref: '#/components/schemas/_core.search:InnerHits' parent_type: @@ -35569,6 +36828,12 @@ components: properties: values: $ref: '#/components/schemas/_common:Ids' + _common.query_dsl:IgnoreUnmapped: + type: boolean + default: false + description: |- + Set to `true` to ignore an unmapped field and not match any documents for this query. + Set to `false` to throw an exception if the field is not mapped. _common.query_dsl:IntervalsAllOf: type: object properties: @@ -36036,8 +37301,8 @@ components: - type: object properties: ignore_unmapped: + $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' description: Indicates whether to ignore an unmapped path and not return any documents instead of an error. - type: boolean inner_hits: $ref: '#/components/schemas/_core.search:InnerHits' path: @@ -36049,6 +37314,30 @@ components: required: - path - query + _common.query_dsl:NeuralQuery: + allOf: + - $ref: '#/components/schemas/_common.query_dsl:QueryBase' + - type: object + additionalProperties: + $ref: '#/components/schemas/_common.query_dsl:NeuralQueryVectorField' + _common.query_dsl:NeuralQueryVectorField: + type: object + properties: + query_text: + type: string + query_image: + type: string + contentEncoding: base64 + model_id: + type: string + k: + type: integer + min_score: + type: number + max_distance: + type: number + filter: + $ref: '#/components/schemas/_common.query_dsl:QueryContainer' _common.query_dsl:NumberRangeQuery: allOf: - $ref: '#/components/schemas/_common.query_dsl:RangeQueryBase' @@ -36093,8 +37382,8 @@ components: id: $ref: '#/components/schemas/_common:Id' ignore_unmapped: + $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' description: Indicates whether to ignore an unmapped `type` and not return any documents instead of an error. - type: boolean type: $ref: '#/components/schemas/_common:RelationName' _common.query_dsl:PercolateQuery: @@ -36296,6 +37585,8 @@ components: $ref: '#/components/schemas/_common.query_dsl:MultiMatchQuery' nested: $ref: '#/components/schemas/_common.query_dsl:NestedQuery' + neural: + $ref: '#/components/schemas/_common.query_dsl:NeuralQuery' parent_id: $ref: '#/components/schemas/_common.query_dsl:ParentIdQuery' percolate: @@ -36644,8 +37935,7 @@ components: - type: object properties: ignore_unmapped: - description: When set to `true` the query ignores an unmapped field and will not match any documents. - type: boolean + $ref: '#/components/schemas/_common.query_dsl:IgnoreUnmapped' _common.query_dsl:SimpleQueryStringFlag: type: string enum: @@ -36663,7 +37953,7 @@ components: - SLOP - WHITESPACE _common.query_dsl:SimpleQueryStringFlags: - description: Query flags can be either a single flag or a combination of flags, e.g. `OR|AND|PREFIX` + description: Query flags can be either a single flag or a combination of flags, e.g. `OR|AND|PREFIX`. allOf: - $ref: '#/components/schemas/_common:PipeSeparatedFlagsSimpleQueryStringFlag' _common.query_dsl:SimpleQueryStringQuery: @@ -42317,6 +43607,7 @@ components: $ref: '#/components/schemas/_common:Stringifiedboolean' indices._common:IndexSettings: type: object + description: The index settings to be updated. properties: index: $ref: '#/components/schemas/indices._common:IndexSettings' @@ -42447,7 +43738,6 @@ components: store: $ref: '#/components/schemas/indices._common:Storage' additionalProperties: {} - description: The index settings to be updated indices._common:IndexSettingsAnalysis: type: object properties: @@ -42561,7 +43851,7 @@ components: $ref: '#/components/schemas/indices._common:IndexTemplateDataStreamConfiguration' required: - index_patterns - description: New index template definition to be simulated, if no index template name is specified + description: New index template definition to be simulated, if no index template name is specified. indices._common:IndexTemplateDataStreamConfiguration: type: object properties: @@ -43653,83 +44943,89 @@ components: - aliases - mappings - settings - indices.stats:IndexMetadataState: - type: string - enum: - - close - - open + indices.stats:AllIndicesStats: + type: object + properties: + primaries: + $ref: '#/components/schemas/indices.stats:IndexStats' + total: + $ref: '#/components/schemas/indices.stats:IndexStats' + required: + - primaries + - total + indices.stats:IndexShardStats: + allOf: + - $ref: '#/components/schemas/indices.stats:IndexStatsBase' + - type: object + properties: + routing: + $ref: '#/components/schemas/indices.stats:ShardRouting' + commit: + $ref: '#/components/schemas/indices.stats:ShardCommit' + seq_no: + $ref: '#/components/schemas/indices.stats:ShardSequenceNumber' + retention_leases: + $ref: '#/components/schemas/indices.stats:ShardRetentionLeases' + shard_path: + $ref: '#/components/schemas/indices.stats:ShardPath' indices.stats:IndexStats: + allOf: + - $ref: '#/components/schemas/indices.stats:IndexStatsBase' + - type: object + indices.stats:IndexStatsBase: type: object properties: - completion: - $ref: '#/components/schemas/_common:CompletionStats' docs: $ref: '#/components/schemas/_common:DocStats' - fielddata: - $ref: '#/components/schemas/_common:FielddataStats' - flush: - $ref: '#/components/schemas/_common:FlushStats' - get: - $ref: '#/components/schemas/_common:GetStats' + store: + $ref: '#/components/schemas/_common:StoreStats' indexing: $ref: '#/components/schemas/_common:IndexingStats' - indices: - $ref: '#/components/schemas/indices.stats:IndicesStats' + get: + $ref: '#/components/schemas/_common:GetStats' + search: + $ref: '#/components/schemas/_common:SearchStats' merges: $ref: '#/components/schemas/_common:MergesStats' - query_cache: - $ref: '#/components/schemas/_common:QueryCacheStats' - recovery: - $ref: '#/components/schemas/_common:RecoveryStats' refresh: $ref: '#/components/schemas/_common:RefreshStats' - request_cache: - $ref: '#/components/schemas/_common:RequestCacheStats' - search: - $ref: '#/components/schemas/_common:SearchStats' + flush: + $ref: '#/components/schemas/_common:FlushStats' + warmer: + $ref: '#/components/schemas/_common:WarmerStats' + query_cache: + $ref: '#/components/schemas/_common:QueryCacheStats' + fielddata: + $ref: '#/components/schemas/_common:FielddataStats' + completion: + $ref: '#/components/schemas/_common:CompletionStats' segments: $ref: '#/components/schemas/_common:SegmentsStats' - store: - $ref: '#/components/schemas/_common:StoreStats' translog: $ref: '#/components/schemas/_common:TranslogStats' - warmer: - $ref: '#/components/schemas/_common:WarmerStats' - bulk: - $ref: '#/components/schemas/_common:BulkStats' - shard_stats: - $ref: '#/components/schemas/indices.stats:ShardsTotalStats' + request_cache: + $ref: '#/components/schemas/_common:RequestCacheStats' + recovery: + $ref: '#/components/schemas/_common:RecoveryStats' indices.stats:IndicesStats: type: object properties: + uuid: + $ref: '#/components/schemas/_common:Uuid' primaries: $ref: '#/components/schemas/indices.stats:IndexStats' + total: + $ref: '#/components/schemas/indices.stats:IndexStats' shards: type: object additionalProperties: type: array items: - $ref: '#/components/schemas/indices.stats:ShardStats' - total: - $ref: '#/components/schemas/indices.stats:IndexStats' - uuid: - $ref: '#/components/schemas/_common:Uuid' - health: - $ref: '#/components/schemas/_common:HealthStatus' - status: - $ref: '#/components/schemas/indices.stats:IndexMetadataState' - indices.stats:MappingStats: - type: object - properties: - total_count: - type: number - total_estimated_overhead: - $ref: '#/components/schemas/_common:ByteSize' - total_estimated_overhead_in_bytes: - type: number + $ref: '#/components/schemas/indices.stats:IndexShardStats' required: - - total_count - - total_estimated_overhead_in_bytes + - primaries + - total + - uuid indices.stats:ShardCommit: type: object properties: @@ -43795,31 +45091,6 @@ components: - data_path - is_custom_data_path - state_path - indices.stats:ShardQueryCache: - type: object - properties: - cache_count: - type: number - cache_size: - type: number - evictions: - type: number - hit_count: - type: number - memory_size_in_bytes: - type: number - miss_count: - type: number - total_count: - type: number - required: - - cache_count - - cache_size - - evictions - - hit_count - - memory_size_in_bytes - - miss_count - - total_count indices.stats:ShardRetentionLeases: type: object properties: @@ -43872,70 +45143,6 @@ components: - global_checkpoint - local_checkpoint - max_seq_no - indices.stats:ShardStats: - type: object - properties: - commit: - $ref: '#/components/schemas/indices.stats:ShardCommit' - completion: - $ref: '#/components/schemas/_common:CompletionStats' - docs: - $ref: '#/components/schemas/_common:DocStats' - fielddata: - $ref: '#/components/schemas/_common:FielddataStats' - flush: - $ref: '#/components/schemas/_common:FlushStats' - get: - $ref: '#/components/schemas/_common:GetStats' - indexing: - $ref: '#/components/schemas/_common:IndexingStats' - mappings: - $ref: '#/components/schemas/indices.stats:MappingStats' - merges: - $ref: '#/components/schemas/_common:MergesStats' - shard_path: - $ref: '#/components/schemas/indices.stats:ShardPath' - query_cache: - $ref: '#/components/schemas/indices.stats:ShardQueryCache' - recovery: - $ref: '#/components/schemas/_common:RecoveryStats' - refresh: - $ref: '#/components/schemas/_common:RefreshStats' - request_cache: - $ref: '#/components/schemas/_common:RequestCacheStats' - retention_leases: - $ref: '#/components/schemas/indices.stats:ShardRetentionLeases' - routing: - $ref: '#/components/schemas/indices.stats:ShardRouting' - search: - $ref: '#/components/schemas/_common:SearchStats' - segments: - $ref: '#/components/schemas/_common:SegmentsStats' - seq_no: - $ref: '#/components/schemas/indices.stats:ShardSequenceNumber' - store: - $ref: '#/components/schemas/_common:StoreStats' - translog: - $ref: '#/components/schemas/_common:TranslogStats' - warmer: - $ref: '#/components/schemas/_common:WarmerStats' - bulk: - $ref: '#/components/schemas/_common:BulkStats' - shards: - type: object - additionalProperties: - type: object - shard_stats: - $ref: '#/components/schemas/indices.stats:ShardsTotalStats' - indices: - $ref: '#/components/schemas/indices.stats:IndicesStats' - indices.stats:ShardsTotalStats: - type: object - properties: - total_count: - type: number - required: - - total_count indices.update_aliases:Action: type: object properties: @@ -45091,10 +46298,10 @@ components: properties: model_id: type: string - description: The model ID. + task_id: + type: string state: type: string - description: The state. enum: - CANCELLED - COMPLETED @@ -45107,6 +46314,7 @@ components: description: Task type. enum: - DEPLOY_MODEL + - REGISTER_MODEL function_name: type: string worker_node: @@ -45121,8 +46329,22 @@ components: format: int64 is_async: type: boolean + error: + type: string required: - state + ml._common:UndeployModelResponse: + type: object + additionalProperties: + $ref: '#/components/schemas/ml._common:UndeployModelResponseModels' + ml._common:UndeployModelResponseModels: + type: object + properties: + stats: + $ref: '#/components/schemas/ml._common:UndeployModelResponseStats' + ml._common:UndeployModelResponseStats: + type: object + additionalProperties: true nodes._common:AdaptiveSelection: type: object properties: @@ -45602,6 +46824,14 @@ components: write_operations: description: The total number of write operations for the device completed since starting OpenSearch. type: number + read_time: + type: number + write_time: + type: number + queue_size: + type: number + io_time_in_millis: + $ref: '#/components/schemas/_common:DurationValueUnitMillis' nodes._common:IoStats: type: object properties: @@ -46003,8 +47233,10 @@ components: type: boolean enforced: type: boolean + total_rejections_breakup: + $ref: '#/components/schemas/nodes._common:TotalRejectionsBreakup' total_rejections_breakup_shadow_mode: - $ref: '#/components/schemas/nodes._common:TotalRejectionsBreakupShadowMode' + $ref: '#/components/schemas/nodes._common:TotalRejectionsBreakup' nodes._common:ShardRepositoriesStats: type: array nodes._common:ShardResourceUsageStats: @@ -46049,6 +47281,10 @@ components: type: number cancellation_limit_reached_count: type: number + cancelled_task_percentage: + type: number + current_cancellation_eligible_tasks_count: + type: number nodes._common:ShardSearchBackpressureTaskResourceTrackerCpuUsageTrackerStats: type: object properties: @@ -46094,6 +47330,9 @@ components: $ref: '#/components/schemas/nodes._common:ShardSearchBackpressureTaskResourceTrackerStats' cancellation_stats: $ref: '#/components/schemas/nodes._common:ShardSearchBackpressureTaskCancellationStats' + completion_count: + x-version-added: '3.0' + type: number nodes._common:ShardSearchPipelineStats: type: object properties: @@ -46210,7 +47449,7 @@ components: indexing_pressure: $ref: '#/components/schemas/nodes._common:IndexingPressure' indices: - $ref: '#/components/schemas/indices.stats:ShardStats' + $ref: '#/components/schemas/indices.stats:IndexShardStats' shard_indexing_pressure: $ref: '#/components/schemas/nodes._common:ShardIndexingPressureStats' search_backpressure: @@ -46259,7 +47498,7 @@ components: The total amount of time that tasks spend waiting in the thread pool queue. Currently, only `search`, `search_throttled`, and `index_searcher` thread pools support this metric. type: number - nodes._common:TotalRejectionsBreakupShadowMode: + nodes._common:TotalRejectionsBreakup: type: object properties: node_limits: @@ -46423,14 +47662,10 @@ components: search_pipelines: $ref: '#/components/schemas/nodes.info:NodeInfoSearchPipelines' required: - - attributes - build_hash - build_type - - host - - ip - name - roles - - transport_address - version nodes.info:NodeInfoAction: type: object @@ -46936,7 +48171,9 @@ components: bundled_jdk: type: boolean using_bundled_jdk: - type: boolean + type: + - boolean + - 'null' using_compressed_ordinary_object_pointers: oneOf: - type: boolean @@ -46947,16 +48184,9 @@ components: type: string required: - bundled_jdk - - gc_collectors - - input_arguments - mem - - memory_pools - pid - start_time_in_millis - - version - - vm_name - - vm_vendor - - vm_version nodes.info:NodeOperatingSystemInfo: type: object properties: @@ -46984,12 +48214,8 @@ components: swap: $ref: '#/components/schemas/nodes.info:NodeInfoMemory' required: - - arch - available_processors - - name - - pretty_name - refresh_interval_in_millis - - version nodes.info:NodeProcessInfo: type: object properties: @@ -47453,6 +48679,351 @@ components: $ref: '#/components/schemas/notifications._common:HeaderParamsMap' required: - url + observability._common:ErrorResponse: + type: object + properties: + root_cause: + type: array + items: + $ref: '#/components/schemas/observability._common:RootCause' + type: + type: string + example: status_exception + reason: + type: string + example: ObservabilityObject {objectId} not found + required: + - reason + - root_cause + - type + observability._common:NotFoundResponse: + type: object + properties: + error: + $ref: '#/components/schemas/observability._common:ErrorResponse' + status: + type: integer + example: 404 + required: + - error + - status + observability._common:ObservabilityObject: + type: object + properties: + objectId: + type: string + lastUpdatedTimeMs: + type: integer + createdTimeMs: + type: integer + tenant: + type: string + operationalPanel: + $ref: '#/components/schemas/observability._common:OperationalPanel' + savedVisualization: + $ref: '#/components/schemas/observability._common:SavedVisualization' + savedQuery: + $ref: '#/components/schemas/observability._common:SavedQuery' + required: + - objectId + - tenant + observability._common:ObservabilityObjectList: + type: object + properties: + startIndex: + type: integer + totalHits: + type: integer + totalHitRelation: + type: string + observabilityObjectList: + type: array + items: + $ref: '#/components/schemas/observability._common:ObservabilityObject' + required: + - observabilityObjectList + - startIndex + - totalHitRelation + - totalHits + observability._common:OperationalPanel: + type: object + properties: + name: + type: string + visualizations: + type: array + items: + $ref: '#/components/schemas/observability._common:Visualization' + timeRange: + $ref: '#/components/schemas/observability._common:TimeRange' + queryFilter: + $ref: '#/components/schemas/observability._common:QueryFilter' + applicationId: + type: string + required: + - applicationId + - name + - queryFilter + - timeRange + - visualizations + observability._common:QueryFilter: + type: object + properties: + query: + type: string + language: + type: string + required: + - language + - query + observability._common:RootCause: + type: object + properties: + type: + type: string + example: status_exception + reason: + type: string + example: ObservabilityObject {objectId} not found + required: + - reason + - type + observability._common:SavedQuery: + type: object + properties: + name: + type: string + description: + type: string + query: + type: string + selected_date_range: + $ref: '#/components/schemas/observability._common:SelectedDateRange' + selected_timestamp: + $ref: '#/components/schemas/observability._common:SelectedTimestamp' + selected_fields: + $ref: '#/components/schemas/observability._common:SelectedFields' + required: + - description + - name + - query + - selected_date_range + - selected_fields + - selected_timestamp + observability._common:SavedVisualization: + type: object + properties: + name: + type: string + description: + type: string + query: + type: string + type: + type: string + selected_date_range: + $ref: '#/components/schemas/observability._common:SelectedDateRange' + selected_timestamp: + $ref: '#/components/schemas/observability._common:SelectedTimestamp' + selected_fields: + $ref: '#/components/schemas/observability._common:SelectedFields' + required: + - description + - name + - query + - selected_date_range + - selected_fields + - selected_timestamp + - type + observability._common:SelectedDateRange: + type: object + properties: + start: + type: string + end: + type: string + text: + type: string + required: + - end + - start + - text + observability._common:SelectedFields: + type: object + properties: + text: + type: string + tokens: + type: array + items: + $ref: '#/components/schemas/observability._common:Token' + required: + - text + - tokens + observability._common:SelectedTimestamp: + type: object + properties: + name: + type: string + type: + type: string + required: + - name + - type + observability._common:TimeRange: + type: object + properties: + to: + type: string + from: + type: string + required: + - from + - to + observability._common:Token: + type: object + properties: + name: + type: string + type: + type: string + required: + - name + - type + observability._common:Visualization: + type: object + properties: + id: + type: string + savedVisualizationId: + type: string + x: + type: integer + y: + type: integer + w: + type: integer + h: + type: integer + required: + - h + - id + - savedVisualizationId + - w + - x + - y + query._common:Credentials: + type: object + properties: + username: + type: string + password: + type: string + required: + - password + - username + query._common:DataSource: + type: object + properties: + name: + type: string + description: + type: string + connector: + type: string + allowedRoles: + type: array + items: + type: string + properties: + type: object + additionalProperties: true + resultIndex: + type: string + status: + type: string + configuration: + $ref: '#/components/schemas/query._common:DataSourceConfiguration' + required: + - connector + - name + - properties + - resultIndex + - status + query._common:DataSourceConfiguration: + type: object + properties: + endpoint: + type: string + credentials: + $ref: '#/components/schemas/query._common:Credentials' + required: + - credentials + - endpoint + query._common:DataSourceList: + type: array + items: + $ref: '#/components/schemas/query._common:DataSource' + query._common:DataSourceNotFound: + type: object + properties: + error: + $ref: '#/components/schemas/query._common:ErrorResponse' + required: + - error + query._common:DataSourceRetrieve: + type: object + properties: + name: + type: string + description: + type: string + connector: + type: string + allowedRoles: + type: array + items: + type: string + properties: + type: object + additionalProperties: true + resultIndex: + type: string + status: + type: string + configuration: + $ref: '#/components/schemas/query._common:DataSourceConfiguration' + required: + - connector + - name + - properties + - resultIndex + - status + query._common:ErrorResponse: + type: object + properties: + root_cause: + type: array + items: + $ref: '#/components/schemas/query._common:RootCause' + type: + type: string + reason: + type: string + required: + - reason + - root_cause + - type + query._common:RootCause: + type: object + properties: + type: + type: string + reason: + type: string + required: + - reason + - type remote_store._common:RemoteStoreRestoreInfo: type: object properties: @@ -47662,6 +49233,21 @@ components: type: string target_field: type: string + search_pipeline._common:CollapseResponseProcessor: + type: object + properties: + tag: + type: string + description: + type: string + ignore_failure: + type: boolean + field: + type: string + context_prefix: + type: string + required: + - field search_pipeline._common:FilterQueryRequestProcessor: type: object properties: @@ -47673,6 +49259,13 @@ components: type: boolean query: $ref: '#/components/schemas/search_pipeline._common:UserDefinedObjectStructure' + search_pipeline._common:MLOpenSearchReranker: + type: object + properties: + model_id: + type: string + required: + - model_id search_pipeline._common:NeuralFieldMap: type: object additionalProperties: @@ -47717,6 +49310,30 @@ components: type: string required: - sample_factor + search_pipeline._common:PersonalizeSearchRankingResponseProcessor: + type: object + properties: + tag: + type: string + description: + type: string + ignore_failure: + type: boolean + campaign_arn: + type: string + recipe: + type: string + weight: + type: number + format: float + item_id_field: + type: string + iam_role_arn: + type: string + required: + - campaign_arn + - recipe + - weight search_pipeline._common:PhaseResultsProcessor: oneOf: - type: object @@ -47726,6 +49343,22 @@ components: $ref: '#/components/schemas/search_pipeline._common:NormalizationPhaseResultsProcessor' required: - normalization-processor + search_pipeline._common:RenameFieldResponseProcessor: + type: object + properties: + tag: + type: string + description: + type: string + ignore_failure: + type: boolean + field: + type: string + target_field: + type: string + required: + - field + - target_field search_pipeline._common:RequestProcessor: oneOf: - type: object @@ -47756,6 +49389,106 @@ components: $ref: '#/components/schemas/search_pipeline._common:OversampleRequestProcessor' required: - oversample + search_pipeline._common:RerankContext: + type: object + properties: + document_fields: + type: array + items: + type: string + required: + - document_fields + search_pipeline._common:RerankResponseProcessor: + type: object + properties: + tag: + type: string + description: + type: string + ignore_failure: + type: boolean + ml_opensearch: + $ref: '#/components/schemas/search_pipeline._common:MLOpenSearchReranker' + context: + $ref: '#/components/schemas/search_pipeline._common:RerankContext' + search_pipeline._common:ResponseProcessor: + oneOf: + - type: object + title: personalize_search_ranking + properties: + personalize_search_ranking: + $ref: '#/components/schemas/search_pipeline._common:PersonalizeSearchRankingResponseProcessor' + required: + - personalize_search_ranking + - type: object + title: retrieval_augmented_generation + properties: + retrieval_augmented_generation: + $ref: '#/components/schemas/search_pipeline._common:RetrievalAugmentedGenerationResponseProcessor' + required: + - retrieval_augmented_generation + - type: object + title: rename_field + properties: + rename_field: + $ref: '#/components/schemas/search_pipeline._common:RenameFieldResponseProcessor' + required: + - rename_field + - type: object + title: rerank + properties: + rerank: + $ref: '#/components/schemas/search_pipeline._common:RerankResponseProcessor' + required: + - rerank + - type: object + title: collapse + properties: + collapse: + $ref: '#/components/schemas/search_pipeline._common:CollapseResponseProcessor' + required: + - collapse + - type: object + title: truncate_hits + properties: + truncate_hits: + $ref: '#/components/schemas/search_pipeline._common:TruncateHitsResponseProcessor' + required: + - truncate_hits + - type: object + title: sort + properties: + sort: + $ref: '#/components/schemas/search_pipeline._common:SortResponseProcessor' + required: + - sort + - type: object + title: split + properties: + split: + $ref: '#/components/schemas/search_pipeline._common:SplitResponseProcessor' + required: + - split + search_pipeline._common:RetrievalAugmentedGenerationResponseProcessor: + type: object + properties: + tag: + type: string + description: + type: string + model_id: + type: string + context_field_list: + type: array + items: + type: string + system_prompt: + type: string + user_instructions: + type: string + required: + - context_field_list + - model_id search_pipeline._common:ScoreCombination: type: object properties: @@ -47799,7 +49532,7 @@ components: response_processors: type: array items: - $ref: '#/components/schemas/search_pipeline._common:RequestProcessor' + $ref: '#/components/schemas/search_pipeline._common:ResponseProcessor' phase_results_processors: type: array items: @@ -47819,6 +49552,57 @@ components: type: string required: - source + search_pipeline._common:SortResponseProcessor: + type: object + properties: + tag: + type: string + description: + type: string + ignore_failure: + type: boolean + field: + type: string + order: + type: string + target_field: + type: string + required: + - field + search_pipeline._common:SplitResponseProcessor: + type: object + properties: + tag: + type: string + description: + type: string + ignore_failure: + type: boolean + field: + type: string + separator: + type: string + preserve_trailing: + type: boolean + target_field: + type: string + required: + - field + - separator + search_pipeline._common:TruncateHitsResponseProcessor: + type: object + properties: + tag: + type: string + description: + type: string + ignore_failure: + type: boolean + target_size: + type: integer + format: int32 + context_prefix: + type: string search_pipeline._common:UserDefinedObjectStructure: type: object properties: @@ -47903,7 +49687,9 @@ components: is_internal_user: type: boolean user_requested_tenant: - type: string + type: + - 'null' + - string backend_roles: type: array items: @@ -47939,7 +49725,7 @@ components: type: object additionalProperties: $ref: '#/components/schemas/security._common:ActionGroup' - security._common:AllowConfig: + security._common:AllowListConfig: type: object properties: enabled: @@ -47947,11 +49733,6 @@ components: requests: type: object description: An object with APIs as key and array of http methods as values. - security._common:AllowListConfig: - type: object - properties: - config: - $ref: '#/components/schemas/security._common:AllowConfig' security._common:AuditConfig: type: object properties: @@ -47981,6 +49762,14 @@ components: type: array items: type: string + ignore_headers: + type: array + items: + type: string + ignore_url_params: + type: array + items: + type: string disabled_rest_categories: type: array items: @@ -48011,31 +49800,47 @@ components: type: string description: User's name. user_requested_tenant: - type: string + type: + - 'null' + - string description: Name of the tenant the user wants to switch to. remote_address: - type: string + type: + - 'null' + - string description: The IP address of remote user. backend_roles: type: array description: Backend roles associated with the user. + items: + type: string custom_attribute_names: type: array description: Name of the attributes associated with the user. + items: + type: string roles: type: array description: Roles associated with the user. + items: + type: string tenants: type: object description: Tenants the user has access to with read-write or read-only access indicator. principal: - type: string + type: + - 'null' + - string description: User principal. peer_certificates: - type: number + type: + - number + - string description: Number of peer certificates. sso_logout_url: - type: string + type: + - 'null' + - string description: Logout url. size_of_user: type: string @@ -48046,16 +49851,18 @@ components: size_of_backendroles: type: string description: Size of backend roles in bytes. - security._common:BadRequest: + security._common:CertificateCountPerNode: type: object properties: - status: - type: string - enum: - - 400 - message: - type: string - description: Message returned as part of BAD_REQUEST response. + total: + type: number + description: Total number of nodes. + successful: + type: number + description: Number of nodes for which certificates could be fetched. + failed: + type: number + description: Number of nodes for which certificates could not be fetched. security._common:CertificatesDetail: type: object properties: @@ -48069,6 +49876,31 @@ components: type: string not_after: type: string + security._common:CertificatesPerNode: + type: object + properties: + name: + type: string + description: Name of the node. + certificates: + type: object + additionalProperties: + $ref: '#/components/schemas/security._common:CertificateTypes' + security._common:CertificateTypes: + type: object + properties: + http: + type: array + items: + type: object + additionalProperties: + $ref: '#/components/schemas/security._common:CertificatesDetail' + transport: + type: array + items: + type: object + additionalProperties: + $ref: '#/components/schemas/security._common:CertificatesDetail' security._common:ChangePasswordRequestContent: type: object properties: @@ -48115,6 +49947,18 @@ components: config: type: array description: List of configs to be upgraded. + items: + type: string + security._common:Created: + type: object + properties: + status: + type: + - number + - string + message: + type: string + description: Message returned as part of CREATED response. security._common:CreateTenantParams: type: object properties: @@ -48150,6 +49994,8 @@ components: sign_in_options: type: array description: List of available sign-in options available. + items: + type: string password_validation_error_message: type: string description: Error message when password validation fails. @@ -48175,27 +50021,36 @@ components: security._common:DynamicOptions: type: object properties: - filteredAliasMode: + filtered_alias_mode: type: string - disableRestAuth: + disable_rest_auth: type: boolean - disableIntertransportAuth: + disable_intertransport_auth: type: boolean - respectRequestIndicesOptions: + respect_request_indices_options: type: boolean - kibana: {} - http: {} - authc: {} - authz: {} - authFailureListeners: {} - doNotFailOnForbidden: + opensearch-dashboards: + type: object + kibana: + type: object + http: + type: object + authc: + type: object + authz: + type: object + auth_failure_listeners: + type: object + do_not_fail_on_forbidden: type: boolean - multiRolespanEnabled: + multi_rolespan_enabled: type: boolean - hostsResolverMode: + hosts_resolver_mode: type: string - doNotFailOnForbiddenEmpty: + do_not_fail_on_forbidden_empty: type: boolean + on_behalf_of: + type: object security._common:GenerateOBOToken: type: object properties: @@ -48219,11 +50074,27 @@ components: type: array items: $ref: '#/components/schemas/security._common:CertificatesDetail' + security._common:GetCertificatesNew: + type: object + properties: + _nodes: + type: object + additionalProperties: + $ref: '#/components/schemas/security._common:CertificateCountPerNode' + cluster_name: + type: string + description: Name of this cluster. + nodes: + type: object + additionalProperties: + $ref: '#/components/schemas/security._common:CertificatesPerNode' security._common:HealthInfo: type: object properties: message: - type: string + type: + - 'null' + - string mode: type: string status: @@ -48255,16 +50126,6 @@ components: error: type: string description: Error message during request execution. - security._common:MethodNotImplemented: - type: object - properties: - status: - type: string - enum: - - 501 - message: - type: string - description: Message returned as part of NOT_IMPLEMENTED response. security._common:MultiTenancyConfig: type: object properties: @@ -48278,7 +50139,6 @@ components: type: array items: type: string - description: Value in seconds. security._common:OBOToken: type: object properties: @@ -48297,9 +50157,9 @@ components: type: object properties: status: - type: string - enum: - - 200 + type: + - number + - string message: type: string description: Message returned as part of OK response. @@ -48385,38 +50245,63 @@ components: type: object additionalProperties: $ref: '#/components/schemas/security._common:Role' + security._common:SecurityConfig: + type: object + properties: + config: + $ref: '#/components/schemas/security._common:DynamicConfig' security._common:SSLInfo: type: object properties: principal: - type: string + type: + - 'null' + - string description: User principal. peer_certificates: - type: number + type: + - number + - string description: Number of certificates. peer_certificates_list: - type: array + type: + - array + - 'null' description: List of domain names from peer certificates. + items: + type: string local_certificates_list: type: array description: List of domain names from local certificates. + items: + type: string ssl_protocol: - type: string + type: + - 'null' + - string description: Protocol for this ssl setup. ssl_cipher: - type: string + type: + - 'null' + - string description: Cipher for this ssl setup. ssl_openssl_available: type: boolean description: A boolean to indicate if OpenSSL is available. ssl_openssl_version: - type: string + type: + - number + - string description: Version of openssl. ssl_openssl_version_string: - type: string + type: + - 'null' + - string description: Full version string for openssl version. ssl_openssl_non_available_cause: - type: string + type: + - 'null' + - string description: Reason for openssl unavailability. ssl_openssl_supports_key_manager_factory: type: boolean @@ -48425,7 +50310,9 @@ components: type: boolean description: Indicates whether hostname validation is supported. ssl_provider_http: - type: string + type: + - 'null' + - string description: Returns http provider's name. ssl_provider_transport_server: type: string @@ -48433,6 +50320,20 @@ components: ssl_provider_transport_client: type: string description: Returns transport client's name. + required: + - peer_certificates + - principal + - ssl_cipher + - ssl_openssl_available + - ssl_openssl_non_available_cause + - ssl_openssl_supports_hostname_validation + - ssl_openssl_supports_key_manager_factory + - ssl_openssl_version + - ssl_openssl_version_string + - ssl_protocol + - ssl_provider_http + - ssl_provider_transport_client + - ssl_provider_transport_server security._common:Tenant: type: object properties: @@ -48463,16 +50364,6 @@ components: type: object additionalProperties: $ref: '#/components/schemas/security._common:Tenant' - security._common:Unauthorized: - type: object - properties: - status: - type: string - enum: - - 403 - message: - type: string - description: Message returned as part of FORBIDDEN response. security._common:UpgradeCheck: type: object properties: @@ -48492,6 +50383,8 @@ components: security._common:User: type: object properties: + password: + type: string hash: type: string reserved: @@ -48533,11 +50426,13 @@ components: type: object properties: dn: - type: string + type: + - 'null' + - string is_admin: - type: string + type: boolean is_node_certificate_request: - type: string + type: boolean snapshot._common:FileCountSnapshotStats: type: object properties: @@ -48861,7 +50756,21 @@ components: $ref: '#/components/schemas/_common:Name' required: - name + sql._common:Cursor: + type: object + properties: + keep_alive: + type: string sql._common:Explain: + type: object + properties: + query: + type: string + filter: + type: object + fetch_size: + type: integer + sql._common:ExplainBody: type: object properties: name: @@ -48871,32 +50780,38 @@ components: children: type: array items: - $ref: '#/components/schemas/sql._common:Explain' - sql._common:SqlClose: + $ref: '#/components/schemas/sql._common:ExplainBody' + sql._common:ExplainResponse: type: object properties: - cursor: - type: string - sql._common:SqlCloseResponse: + root: + $ref: '#/components/schemas/sql._common:ExplainBody' + sql._common:Plugins: type: object properties: - succeeded: - type: boolean - sql._common:SqlExplain: + ppl: + $ref: '#/components/schemas/sql._common:Ppl' + query: + $ref: '#/components/schemas/sql._common:PluginsQuery' + sql: + $ref: '#/components/schemas/sql._common:Sql' + sql._common:PluginsQuery: type: object properties: - query: + memory_limit: type: string - filter: - type: object - fetch_size: - type: integer - sql._common:SqlExplainResponse: + size_limit: + anyOf: + - type: string + - type: integer + sql._common:Ppl: type: object properties: - root: - $ref: '#/components/schemas/sql._common:Explain' - sql._common:SqlQuery: + enabled: + anyOf: + - type: boolean + - type: string + sql._common:Query: type: object properties: query: @@ -48905,7 +50820,7 @@ components: type: object fetch_size: type: integer - sql._common:SqlQueryResponse: + sql._common:QueryResponse: type: object properties: schema: @@ -48924,7 +50839,49 @@ components: type: integer status: type: integer - sql._common:SqlStats: + sql._common:Sql: + type: object + properties: + enabled: + anyOf: + - type: boolean + - type: string + slowlog: + anyOf: + - type: integer + - type: string + cursor: + $ref: '#/components/schemas/sql._common:Cursor' + sql._common:SqlClose: + type: object + properties: + cursor: + type: string + sql._common:SqlCloseResponse: + type: object + properties: + succeeded: + type: boolean + sql._common:SqlSettings: + type: object + properties: + transient: + $ref: '#/components/schemas/sql._common:Transient' + sql._common:SqlSettingsPlain: + type: object + properties: + transient: + $ref: '#/components/schemas/sql._common:TransientPlain' + sql._common:SqlSettingsResponse: + type: object + properties: + acknowledged: + type: boolean + persistent: + type: object + transient: + $ref: '#/components/schemas/sql._common:Transient' + sql._common:Stats: type: object properties: start_time: @@ -48941,6 +50898,26 @@ components: type: object execution_time: type: object + sql._common:Transient: + type: object + properties: + plugins: + $ref: '#/components/schemas/sql._common:Plugins' + sql._common:TransientPlain: + type: object + properties: + plugins.sql.enabled: + type: boolean + plugins.ppl.enabled: + type: boolean + plugins.sql.slowlog: + type: integer + plugins.sql.cursor.keep_alive: + type: string + plugins.query.memory_limit: + type: string + plugins.query.size_limit: + type: integer tasks._common:GroupBy: type: string enum: From 7ef944902a44bda5fcc235c36b8d3005c03166df Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Thu, 22 Aug 2024 12:58:16 +1200 Subject: [PATCH 9/9] spotlessApply Signed-off-by: Thomas Farr --- .../client/codegen/model/RequestShape.java | 6 ++- .../client/codegen/model/SpecTransformer.java | 42 ++++++++----------- .../client/codegen/openapi/OpenApiSchema.java | 9 ++-- 3 files changed, 27 insertions(+), 30 deletions(-) diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/RequestShape.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/RequestShape.java index 53bab6deaf..3e332ca8b8 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/RequestShape.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/RequestShape.java @@ -167,8 +167,10 @@ private static String responseClassName(@Nonnull OperationGroup operationGroup) private static String classBaseName(@Nonnull OperationGroup operationGroup) { Objects.requireNonNull(operationGroup, "operationGroup must not be null"); switch (operationGroup.toString()) { - case "tasks.get": return "GetTasks"; - default: return Strings.toPascalCase(operationGroup.getName()); + case "tasks.get": + return "GetTasks"; + default: + return Strings.toPascalCase(operationGroup.getName()); } } } diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java b/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java index 2906236e00..55e6a45609 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/model/SpecTransformer.java @@ -284,15 +284,9 @@ private void visitInto(OpenApiSchema schema, ObjectShape shape) { final var additionalProperties = new ArrayList(); final var required = collectObjectProperties(schema, properties, additionalProperties); - properties.forEach((k, v) -> { - shape.addBodyField(new Field( - k, - mapType(v), - required.contains(k), - v.getDescription().orElse(null), - null - )); - }); + properties.forEach( + (k, v) -> { shape.addBodyField(new Field(k, mapType(v), required.contains(k), v.getDescription().orElse(null), null)); } + ); if (!additionalProperties.isEmpty()) { var valueSchema = additionalProperties.size() == 1 ? additionalProperties.get(0) : OpenApiSchema.ANONYMOUS_UNTYPED; @@ -310,9 +304,9 @@ private void visitInto(OpenApiSchema schema, ObjectShape shape) { } private Set collectObjectProperties( - OpenApiSchema schema, - Map properties, - List additionalProperties + OpenApiSchema schema, + Map properties, + List additionalProperties ) { if (schema.has$ref()) { return collectObjectProperties(schema.resolve(), properties, additionalProperties); @@ -339,18 +333,18 @@ private Set collectObjectProperties( return required; } - schema.getProperties() - .ifPresent(props -> props.forEach((k, v) -> { - var existing = properties.get(k); - if (existing != null) { - var existingType = existing.determineSingleType().orElse(null); - var newType = v.determineSingleType().orElse(null); - if (existingType != null && (existingType == OpenApiSchemaType.Object || existingType == OpenApiSchemaType.Array || existingType != newType)) { - v = OpenApiSchema.ANONYMOUS_UNTYPED; - } - } - properties.put(k, v); - })); + schema.getProperties().ifPresent(props -> props.forEach((k, v) -> { + var existing = properties.get(k); + if (existing != null) { + var existingType = existing.determineSingleType().orElse(null); + var newType = v.determineSingleType().orElse(null); + if (existingType != null + && (existingType == OpenApiSchemaType.Object || existingType == OpenApiSchemaType.Array || existingType != newType)) { + v = OpenApiSchema.ANONYMOUS_UNTYPED; + } + } + properties.put(k, v); + })); schema.getAdditionalProperties().ifPresent(additionalProperties::add); diff --git a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java index 514fa917bb..5928c63fce 100644 --- a/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java +++ b/java-codegen/src/main/java/org/opensearch/client/codegen/openapi/OpenApiSchema.java @@ -28,8 +28,7 @@ public class OpenApiSchema extends OpenApiRefElement { private static final JsonPointer ANONYMOUS = JsonPointer.of(""); - public static final OpenApiSchema ANONYMOUS_UNTYPED = builder().withPointer(ANONYMOUS.append("untyped")) - .build(); + public static final OpenApiSchema ANONYMOUS_UNTYPED = builder().withPointer(ANONYMOUS.append("untyped")).build(); public static final OpenApiSchema ANONYMOUS_OBJECT = builder().withPointer(ANONYMOUS.append("object")) .withTypes(OpenApiSchemaType.Object) .build(); @@ -134,7 +133,7 @@ protected OpenApiSchema(@Nullable OpenApiElement parent, @Nonnull JsonPointer var extensions = schema.getExtensions(); - //noinspection unchecked + // noinspection unchecked deprecatedEnums = Maps.tryGet(extensions, "x-deprecated-enums").map(e -> (Collection) e).map(HashSet::new).orElse(null); } @@ -225,7 +224,9 @@ public Optional> getEnums() { } @Nonnull - public Optional> getDeprecatedEnums() { return Sets.unmodifiableOpt(deprecatedEnums); } + public Optional> getDeprecatedEnums() { + return Sets.unmodifiableOpt(deprecatedEnums); + } @Nonnull public Optional getItems() {