diff --git a/CHANGELOG.md b/CHANGELOG.md
index c368cd2f88562..c0f6d1cc3d09a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -65,6 +65,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Quickly compute terms aggregations when the top-level query is functionally match-all for a segment ([#11643](https://github.com/opensearch-project/OpenSearch/pull/11643))
- Mark fuzzy filter GA and remove experimental setting ([12631](https://github.com/opensearch-project/OpenSearch/pull/12631))
- Keep the election scheduler open until cluster state has been applied ([#11699](https://github.com/opensearch-project/OpenSearch/pull/11699))
+- [BWC and API enforcement] Enforcing the presence of API annotations at build time ([#12872](https://github.com/opensearch-project/OpenSearch/pull/12872))
### Deprecated
diff --git a/server/build.gradle b/server/build.gradle
index 99e335c03ae76..a10d010c07b00 100644
--- a/server/build.gradle
+++ b/server/build.gradle
@@ -141,7 +141,7 @@ tasks.withType(JavaCompile).configureEach {
compileJava {
options.compilerArgs += ['-processor', ['org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor',
- 'org.opensearch.common.annotation.processor.ApiAnnotationProcessor'].join(','), '-AcontinueOnFailingChecks']
+ 'org.opensearch.common.annotation.processor.ApiAnnotationProcessor'].join(',')]
}
tasks.named("internalClusterTest").configure {
diff --git a/server/src/main/java/org/opensearch/action/ActionModule.java b/server/src/main/java/org/opensearch/action/ActionModule.java
index 0a0a1c01dc2d0..2c3e8512a5c73 100644
--- a/server/src/main/java/org/opensearch/action/ActionModule.java
+++ b/server/src/main/java/org/opensearch/action/ActionModule.java
@@ -288,6 +288,7 @@
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
import org.opensearch.cluster.node.DiscoveryNodes;
import org.opensearch.common.NamedRegistry;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.AbstractModule;
import org.opensearch.common.inject.TypeLiteral;
import org.opensearch.common.inject.multibindings.MapBinder;
@@ -1029,8 +1030,9 @@ public RestController getRestController() {
*
* This class is modeled after {@link NamedRegistry} but provides both register and unregister capabilities.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "2.7.0")
public static class DynamicActionRegistry {
// This is the unmodifiable actions map created during node bootstrap, which
// will continue to link ActionType and TransportAction pairs from core and plugin
diff --git a/server/src/main/java/org/opensearch/action/ActionRequest.java b/server/src/main/java/org/opensearch/action/ActionRequest.java
index 80511a7ded4f6..0ffb91804641c 100644
--- a/server/src/main/java/org/opensearch/action/ActionRequest.java
+++ b/server/src/main/java/org/opensearch/action/ActionRequest.java
@@ -32,6 +32,7 @@
package org.opensearch.action;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
import org.opensearch.transport.TransportRequest;
@@ -43,6 +44,7 @@
*
* @opensearch.internal
*/
+@PublicApi(since = "1.0.0")
public abstract class ActionRequest extends TransportRequest {
public ActionRequest() {
diff --git a/server/src/main/java/org/opensearch/action/ActionType.java b/server/src/main/java/org/opensearch/action/ActionType.java
index b9798507705d4..ddf1ccf0c659d 100644
--- a/server/src/main/java/org/opensearch/action/ActionType.java
+++ b/server/src/main/java/org/opensearch/action/ActionType.java
@@ -32,6 +32,7 @@
package org.opensearch.action;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.settings.Settings;
import org.opensearch.core.action.ActionResponse;
import org.opensearch.core.common.io.stream.StreamInput;
@@ -43,6 +44,7 @@
*
* @opensearch.internal
*/
+@PublicApi(since = "1.0.0")
public class ActionType {
private final String name;
diff --git a/server/src/main/java/org/opensearch/action/support/TransportAction.java b/server/src/main/java/org/opensearch/action/support/TransportAction.java
index 72aae210d61ae..f71347f6f1d07 100644
--- a/server/src/main/java/org/opensearch/action/support/TransportAction.java
+++ b/server/src/main/java/org/opensearch/action/support/TransportAction.java
@@ -36,6 +36,7 @@
import org.apache.logging.log4j.Logger;
import org.opensearch.action.ActionRequest;
import org.opensearch.action.ActionRequestValidationException;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.lease.Releasable;
import org.opensearch.common.lease.Releasables;
import org.opensearch.common.util.concurrent.ThreadContext;
@@ -52,8 +53,9 @@
/**
* Base class for a transport action
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public abstract class TransportAction {
public final String actionName;
diff --git a/server/src/main/java/org/opensearch/client/node/NodeClient.java b/server/src/main/java/org/opensearch/client/node/NodeClient.java
index 6e1bb6ce79349..5780e4c1e648a 100644
--- a/server/src/main/java/org/opensearch/client/node/NodeClient.java
+++ b/server/src/main/java/org/opensearch/client/node/NodeClient.java
@@ -39,6 +39,7 @@
import org.opensearch.client.Client;
import org.opensearch.client.support.AbstractClient;
import org.opensearch.cluster.node.DiscoveryNode;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.settings.Settings;
import org.opensearch.core.action.ActionListener;
import org.opensearch.core.action.ActionResponse;
@@ -53,8 +54,9 @@
/**
* Client that executes actions on the local node.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public class NodeClient extends AbstractClient {
private DynamicActionRegistry actionRegistry;
diff --git a/server/src/main/java/org/opensearch/common/inject/Binder.java b/server/src/main/java/org/opensearch/common/inject/Binder.java
index a733a19608ac1..a9d16becfb5ab 100644
--- a/server/src/main/java/org/opensearch/common/inject/Binder.java
+++ b/server/src/main/java/org/opensearch/common/inject/Binder.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.binder.AnnotatedBindingBuilder;
import org.opensearch.common.inject.binder.AnnotatedConstantBindingBuilder;
import org.opensearch.common.inject.binder.LinkedBindingBuilder;
@@ -198,8 +199,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @author kevinb@google.com (Kevin Bourrillion)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface Binder {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/Binding.java b/server/src/main/java/org/opensearch/common/inject/Binding.java
index 53d02e37502af..a42237697a1d2 100644
--- a/server/src/main/java/org/opensearch/common/inject/Binding.java
+++ b/server/src/main/java/org/opensearch/common/inject/Binding.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.spi.BindingScopingVisitor;
import org.opensearch.common.inject.spi.BindingTargetVisitor;
import org.opensearch.common.inject.spi.Element;
@@ -69,8 +70,9 @@
* @author crazybob@google.com (Bob Lee)
* @author jessewilson@google.com (Jesse Wilson)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface Binding extends Element {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/ConfigurationException.java b/server/src/main/java/org/opensearch/common/inject/ConfigurationException.java
index 4379a93482560..e3a32754a1bdb 100644
--- a/server/src/main/java/org/opensearch/common/inject/ConfigurationException.java
+++ b/server/src/main/java/org/opensearch/common/inject/ConfigurationException.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.internal.Errors;
import org.opensearch.common.inject.spi.Message;
@@ -46,8 +47,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class ConfigurationException extends RuntimeException {
private final Set messages;
private Object partialValue = null;
diff --git a/server/src/main/java/org/opensearch/common/inject/Injector.java b/server/src/main/java/org/opensearch/common/inject/Injector.java
index ff212c6313371..772578dd6bb2c 100644
--- a/server/src/main/java/org/opensearch/common/inject/Injector.java
+++ b/server/src/main/java/org/opensearch/common/inject/Injector.java
@@ -29,6 +29,8 @@
package org.opensearch.common.inject;
+import org.opensearch.common.annotation.PublicApi;
+
import java.util.List;
/**
@@ -54,8 +56,9 @@
* @author crazybob@google.com (Bob Lee)
* @author jessewilson@google.com (Jesse Wilson)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface Injector {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/Key.java b/server/src/main/java/org/opensearch/common/inject/Key.java
index cd305353a555d..32f168d18e523 100644
--- a/server/src/main/java/org/opensearch/common/inject/Key.java
+++ b/server/src/main/java/org/opensearch/common/inject/Key.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.internal.Annotations;
import org.opensearch.common.inject.internal.MoreTypes;
import org.opensearch.common.inject.internal.ToStringBuilder;
@@ -59,8 +60,9 @@
*
* @author crazybob@google.com (Bob Lee)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public class Key {
private final AnnotationStrategy annotationStrategy;
diff --git a/server/src/main/java/org/opensearch/common/inject/MembersInjector.java b/server/src/main/java/org/opensearch/common/inject/MembersInjector.java
index 891762375d5a2..872ae883e246b 100644
--- a/server/src/main/java/org/opensearch/common/inject/MembersInjector.java
+++ b/server/src/main/java/org/opensearch/common/inject/MembersInjector.java
@@ -29,6 +29,8 @@
package org.opensearch.common.inject;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* Injects dependencies into the fields and methods on instances of type {@code T}. Ignores the
* presence or absence of an injectable constructor.
@@ -38,8 +40,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface MembersInjector {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/Module.java b/server/src/main/java/org/opensearch/common/inject/Module.java
index b1fc031192ea0..e66044ff26c40 100644
--- a/server/src/main/java/org/opensearch/common/inject/Module.java
+++ b/server/src/main/java/org/opensearch/common/inject/Module.java
@@ -29,6 +29,8 @@
package org.opensearch.common.inject;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* A module contributes configuration information, typically interface
* bindings, which will be used to create an {@link Injector}. A Guice-based
@@ -43,8 +45,9 @@
* Use scope and binding annotations on these methods to configure the
* bindings.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface Module {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/PrivateBinder.java b/server/src/main/java/org/opensearch/common/inject/PrivateBinder.java
index 87635880e29d8..2b6b2e0aad146 100644
--- a/server/src/main/java/org/opensearch/common/inject/PrivateBinder.java
+++ b/server/src/main/java/org/opensearch/common/inject/PrivateBinder.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.binder.AnnotatedElementBuilder;
/**
@@ -38,8 +39,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface PrivateBinder extends Binder {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/Provider.java b/server/src/main/java/org/opensearch/common/inject/Provider.java
index 97f9e9ae503cd..988143b328828 100644
--- a/server/src/main/java/org/opensearch/common/inject/Provider.java
+++ b/server/src/main/java/org/opensearch/common/inject/Provider.java
@@ -29,6 +29,8 @@
package org.opensearch.common.inject;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* An object capable of providing instances of type {@code T}. Providers are used in numerous ways
* by Guice:
@@ -50,8 +52,9 @@
* @param the type of object this provides
* @author crazybob@google.com (Bob Lee)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface Provider {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/Scope.java b/server/src/main/java/org/opensearch/common/inject/Scope.java
index a21495f522d5e..6fb9f560981ef 100644
--- a/server/src/main/java/org/opensearch/common/inject/Scope.java
+++ b/server/src/main/java/org/opensearch/common/inject/Scope.java
@@ -29,6 +29,8 @@
package org.opensearch.common.inject;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* A scope is a level of visibility that instances provided by Guice may have.
* By default, an instance created by the {@link Injector} has no scope,
@@ -42,8 +44,9 @@
*
* @author crazybob@google.com (Bob Lee)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface Scope {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/Stage.java b/server/src/main/java/org/opensearch/common/inject/Stage.java
index d5996bd1363e9..fbb6e389ef43f 100644
--- a/server/src/main/java/org/opensearch/common/inject/Stage.java
+++ b/server/src/main/java/org/opensearch/common/inject/Stage.java
@@ -29,13 +29,16 @@
package org.opensearch.common.inject;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* The stage we're running in.
*
* @author crazybob@google.com (Bob Lee)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public enum Stage {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/TypeLiteral.java b/server/src/main/java/org/opensearch/common/inject/TypeLiteral.java
index f0cca2990b407..8ac04e5d0ac1d 100644
--- a/server/src/main/java/org/opensearch/common/inject/TypeLiteral.java
+++ b/server/src/main/java/org/opensearch/common/inject/TypeLiteral.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.internal.MoreTypes;
import org.opensearch.common.inject.util.Types;
@@ -77,8 +78,9 @@
* @author crazybob@google.com (Bob Lee)
* @author jessewilson@google.com (Jesse Wilson)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public class TypeLiteral {
final Class super T> rawType;
diff --git a/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedBindingBuilder.java b/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedBindingBuilder.java
index bcd593a8cbf7b..5c3c6eac9bd3a 100644
--- a/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedBindingBuilder.java
+++ b/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedBindingBuilder.java
@@ -29,6 +29,8 @@
package org.opensearch.common.inject.binder;
+import org.opensearch.common.annotation.PublicApi;
+
import java.lang.annotation.Annotation;
/**
@@ -36,8 +38,9 @@
*
* @author crazybob@google.com (Bob Lee)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface AnnotatedBindingBuilder extends LinkedBindingBuilder {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedConstantBindingBuilder.java b/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedConstantBindingBuilder.java
index 42c208a2b37ea..71ea1ba0a5207 100644
--- a/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedConstantBindingBuilder.java
+++ b/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedConstantBindingBuilder.java
@@ -29,6 +29,8 @@
package org.opensearch.common.inject.binder;
+import org.opensearch.common.annotation.PublicApi;
+
import java.lang.annotation.Annotation;
/**
@@ -36,8 +38,9 @@
*
* @author crazybob@google.com (Bob Lee)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface AnnotatedConstantBindingBuilder {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedElementBuilder.java b/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedElementBuilder.java
index f2d0916790b6b..54fcb915d83c9 100644
--- a/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedElementBuilder.java
+++ b/server/src/main/java/org/opensearch/common/inject/binder/AnnotatedElementBuilder.java
@@ -29,6 +29,8 @@
package org.opensearch.common.inject.binder;
+import org.opensearch.common.annotation.PublicApi;
+
import java.lang.annotation.Annotation;
/**
@@ -37,8 +39,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface AnnotatedElementBuilder {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/binder/ConstantBindingBuilder.java b/server/src/main/java/org/opensearch/common/inject/binder/ConstantBindingBuilder.java
index 595c477d3e28b..feaee3ed59f46 100644
--- a/server/src/main/java/org/opensearch/common/inject/binder/ConstantBindingBuilder.java
+++ b/server/src/main/java/org/opensearch/common/inject/binder/ConstantBindingBuilder.java
@@ -29,11 +29,14 @@
package org.opensearch.common.inject.binder;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* Binds to a constant value.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface ConstantBindingBuilder {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/binder/LinkedBindingBuilder.java b/server/src/main/java/org/opensearch/common/inject/binder/LinkedBindingBuilder.java
index 2368fef16471c..e8c4b197253b5 100644
--- a/server/src/main/java/org/opensearch/common/inject/binder/LinkedBindingBuilder.java
+++ b/server/src/main/java/org/opensearch/common/inject/binder/LinkedBindingBuilder.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.binder;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Key;
import org.opensearch.common.inject.Provider;
import org.opensearch.common.inject.TypeLiteral;
@@ -38,8 +39,9 @@
*
* @author crazybob@google.com (Bob Lee)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface LinkedBindingBuilder extends ScopedBindingBuilder {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/binder/ScopedBindingBuilder.java b/server/src/main/java/org/opensearch/common/inject/binder/ScopedBindingBuilder.java
index 73dd4414f17a2..c360b9571bc4a 100644
--- a/server/src/main/java/org/opensearch/common/inject/binder/ScopedBindingBuilder.java
+++ b/server/src/main/java/org/opensearch/common/inject/binder/ScopedBindingBuilder.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.binder;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Scope;
import java.lang.annotation.Annotation;
@@ -38,8 +39,9 @@
*
* @author crazybob@google.com (Bob Lee)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface ScopedBindingBuilder {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/matcher/Matcher.java b/server/src/main/java/org/opensearch/common/inject/matcher/Matcher.java
index 21bb63cfef097..4e254f8641350 100644
--- a/server/src/main/java/org/opensearch/common/inject/matcher/Matcher.java
+++ b/server/src/main/java/org/opensearch/common/inject/matcher/Matcher.java
@@ -29,13 +29,16 @@
package org.opensearch.common.inject.matcher;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* Returns {@code true} or {@code false} for a given input.
*
* @author crazybob@google.com (Bob Lee)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface Matcher {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/BindingScopingVisitor.java b/server/src/main/java/org/opensearch/common/inject/spi/BindingScopingVisitor.java
index d7c7d9d65051d..b4fbdf2fdb72b 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/BindingScopingVisitor.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/BindingScopingVisitor.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Scope;
import java.lang.annotation.Annotation;
@@ -40,8 +41,9 @@
* {@code return null} if no return type is needed.
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface BindingScopingVisitor {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/BindingTargetVisitor.java b/server/src/main/java/org/opensearch/common/inject/spi/BindingTargetVisitor.java
index 91df812b58ac4..9543e731308bd 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/BindingTargetVisitor.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/BindingTargetVisitor.java
@@ -29,6 +29,8 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* Visits each of the strategies used to find an instance to satisfy an injection.
*
@@ -36,8 +38,9 @@
* {@code return null} if no return type is needed.
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface BindingTargetVisitor {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ConstructorBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ConstructorBinding.java
index 997bf78234fd1..8eec6cefe53c7 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/ConstructorBinding.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/ConstructorBinding.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binding;
import java.util.Set;
@@ -40,8 +41,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface ConstructorBinding extends Binding, HasDependencies {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ConvertedConstantBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ConvertedConstantBinding.java
index e8d6b346f8596..a07da68a88931 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/ConvertedConstantBinding.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/ConvertedConstantBinding.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binding;
import org.opensearch.common.inject.Key;
@@ -41,8 +42,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface ConvertedConstantBinding extends Binding, HasDependencies {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/Dependency.java b/server/src/main/java/org/opensearch/common/inject/spi/Dependency.java
index be1336ad0f297..e541ba0b73bf5 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/Dependency.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/Dependency.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Key;
import java.util.HashSet;
@@ -47,8 +48,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class Dependency {
private final InjectionPoint injectionPoint;
private final Key key;
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/Element.java b/server/src/main/java/org/opensearch/common/inject/spi/Element.java
index 660aca1bd45ab..58a696fb7ffa9 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/Element.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/Element.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binder;
/**
@@ -43,8 +44,9 @@
* @author crazybob@google.com (Bob Lee)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface Element {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ElementVisitor.java b/server/src/main/java/org/opensearch/common/inject/spi/ElementVisitor.java
index d415560fc03c8..b88f11b9378aa 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/ElementVisitor.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/ElementVisitor.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binding;
/**
@@ -38,8 +39,9 @@
* {@code return null} if no return type is needed.
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface ElementVisitor {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ExposedBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ExposedBinding.java
index d2563bc2728cd..6c1679432abe5 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/ExposedBinding.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/ExposedBinding.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binder;
import org.opensearch.common.inject.Binding;
@@ -38,8 +39,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface ExposedBinding extends Binding, HasDependencies {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/InjectionListener.java b/server/src/main/java/org/opensearch/common/inject/spi/InjectionListener.java
index 7a760d2b84e9f..878e919cda4cc 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/InjectionListener.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/InjectionListener.java
@@ -29,6 +29,8 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* Listens for injections into instances of type {@code I}. Useful for performing further
* injections, post-injection initialization, and more.
@@ -37,8 +39,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface InjectionListener {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/InjectionPoint.java b/server/src/main/java/org/opensearch/common/inject/spi/InjectionPoint.java
index c88b2281107ed..542cbd780a8b6 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/InjectionPoint.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/InjectionPoint.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.ConfigurationException;
import org.opensearch.common.inject.Inject;
import org.opensearch.common.inject.Key;
@@ -66,8 +67,9 @@
* @author crazybob@google.com (Bob Lee)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class InjectionPoint {
private final boolean optional;
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/InjectionRequest.java b/server/src/main/java/org/opensearch/common/inject/spi/InjectionRequest.java
index 6ce5febbb6711..a5faca6264424 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/InjectionRequest.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/InjectionRequest.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binder;
import org.opensearch.common.inject.ConfigurationException;
import org.opensearch.common.inject.TypeLiteral;
@@ -46,8 +47,9 @@
* @author mikeward@google.com (Mike Ward)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class InjectionRequest implements Element {
private final Object source;
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/InstanceBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/InstanceBinding.java
index fd7c1303ed6fc..f73b284ae2e8c 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/InstanceBinding.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/InstanceBinding.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binding;
import java.util.Set;
@@ -39,8 +40,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface InstanceBinding extends Binding, HasDependencies {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/LinkedKeyBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/LinkedKeyBinding.java
index 10b270e499603..01da905f8da47 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/LinkedKeyBinding.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/LinkedKeyBinding.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binding;
import org.opensearch.common.inject.Key;
@@ -38,8 +39,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface LinkedKeyBinding extends Binding {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/MembersInjectorLookup.java b/server/src/main/java/org/opensearch/common/inject/spi/MembersInjectorLookup.java
index 1f652708de875..b8a07146812c1 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/MembersInjectorLookup.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/MembersInjectorLookup.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binder;
import org.opensearch.common.inject.MembersInjector;
import org.opensearch.common.inject.TypeLiteral;
@@ -45,8 +46,9 @@
* @author crazybob@google.com (Bob Lee)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class MembersInjectorLookup implements Element {
private final Object source;
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/Message.java b/server/src/main/java/org/opensearch/common/inject/spi/Message.java
index 78829e82c150e..13184a7d82f0c 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/Message.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/Message.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binder;
import org.opensearch.common.inject.internal.Errors;
import org.opensearch.common.inject.internal.SourceProvider;
@@ -50,8 +51,9 @@
*
* @author crazybob@google.com (Bob Lee)
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class Message implements Element {
private final String message;
private final Throwable cause;
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/PrivateElements.java b/server/src/main/java/org/opensearch/common/inject/spi/PrivateElements.java
index e4d86a356cd53..6330cbe33de58 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/PrivateElements.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/PrivateElements.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Injector;
import org.opensearch.common.inject.Key;
@@ -42,8 +43,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface PrivateElements extends Element {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ProviderBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ProviderBinding.java
index 0a63fefc0a9e9..dd55e9805843f 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/ProviderBinding.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/ProviderBinding.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binding;
import org.opensearch.common.inject.Key;
import org.opensearch.common.inject.Provider;
@@ -40,8 +41,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface ProviderBinding> extends Binding {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ProviderInstanceBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ProviderInstanceBinding.java
index 654f40e627e4b..25bac3b5df34c 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/ProviderInstanceBinding.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/ProviderInstanceBinding.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binding;
import org.opensearch.common.inject.Provider;
@@ -41,8 +42,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface ProviderInstanceBinding extends Binding, HasDependencies {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ProviderKeyBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ProviderKeyBinding.java
index 6f1ae8f2b9a03..f68e1662ad124 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/ProviderKeyBinding.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/ProviderKeyBinding.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binding;
import org.opensearch.common.inject.Key;
import org.opensearch.common.inject.Provider;
@@ -40,8 +41,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface ProviderKeyBinding extends Binding {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ProviderLookup.java b/server/src/main/java/org/opensearch/common/inject/spi/ProviderLookup.java
index 16060ddd3e222..6afe7346a1431 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/ProviderLookup.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/ProviderLookup.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binder;
import org.opensearch.common.inject.Key;
import org.opensearch.common.inject.Provider;
@@ -45,8 +46,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class ProviderLookup implements Element {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/ScopeBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/ScopeBinding.java
index 7a619456e06e3..ca03f4291a062 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/ScopeBinding.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/ScopeBinding.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binder;
import org.opensearch.common.inject.Scope;
@@ -46,8 +47,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class ScopeBinding implements Element {
private final Object source;
private final Class extends Annotation> annotationType;
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/StaticInjectionRequest.java b/server/src/main/java/org/opensearch/common/inject/spi/StaticInjectionRequest.java
index 494e35e6c4490..c426639d85cab 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/StaticInjectionRequest.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/StaticInjectionRequest.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binder;
import org.opensearch.common.inject.ConfigurationException;
@@ -45,8 +46,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class StaticInjectionRequest implements Element {
private final Object source;
private final Class> type;
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/TypeConverter.java b/server/src/main/java/org/opensearch/common/inject/spi/TypeConverter.java
index 93a0f607ddc27..2386c1e528db6 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/TypeConverter.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/TypeConverter.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.TypeLiteral;
/**
@@ -37,8 +38,9 @@
* @author crazybob@google.com (Bob Lee)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface TypeConverter {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/TypeConverterBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/TypeConverterBinding.java
index 00b8c7c013b5a..59311de0fb3f5 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/TypeConverterBinding.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/TypeConverterBinding.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binder;
import org.opensearch.common.inject.TypeLiteral;
import org.opensearch.common.inject.matcher.Matcher;
@@ -45,8 +46,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class TypeConverterBinding implements Element {
private final Object source;
private final Matcher super TypeLiteral>> typeMatcher;
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/TypeEncounter.java b/server/src/main/java/org/opensearch/common/inject/spi/TypeEncounter.java
index e06751668c0f1..61756a5bcad95 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/TypeEncounter.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/TypeEncounter.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Key;
import org.opensearch.common.inject.MembersInjector;
import org.opensearch.common.inject.Provider;
@@ -43,8 +44,9 @@
* @param the injectable type encountered
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
@SuppressWarnings("overloads")
public interface TypeEncounter {
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/TypeListener.java b/server/src/main/java/org/opensearch/common/inject/spi/TypeListener.java
index fd7004aa80df0..3157fa15f471b 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/TypeListener.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/TypeListener.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.TypeLiteral;
/**
@@ -43,8 +44,9 @@
*
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface TypeListener {
/**
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/TypeListenerBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/TypeListenerBinding.java
index 505028f09232d..4ddcf3fc11bc1 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/TypeListenerBinding.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/TypeListenerBinding.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binder;
import org.opensearch.common.inject.TypeLiteral;
import org.opensearch.common.inject.matcher.Matcher;
@@ -42,8 +43,9 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class TypeListenerBinding implements Element {
private final Object source;
diff --git a/server/src/main/java/org/opensearch/common/inject/spi/UntargettedBinding.java b/server/src/main/java/org/opensearch/common/inject/spi/UntargettedBinding.java
index 37e40d45cb5a9..56890efdfcd8d 100644
--- a/server/src/main/java/org/opensearch/common/inject/spi/UntargettedBinding.java
+++ b/server/src/main/java/org/opensearch/common/inject/spi/UntargettedBinding.java
@@ -29,6 +29,7 @@
package org.opensearch.common.inject.spi;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.inject.Binding;
/**
@@ -38,6 +39,7 @@
* @author jessewilson@google.com (Jesse Wilson)
* @since 2.0
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface UntargettedBinding extends Binding {}
diff --git a/server/src/main/java/org/opensearch/extensions/rest/RestSendToExtensionAction.java b/server/src/main/java/org/opensearch/extensions/rest/RestSendToExtensionAction.java
index 41783b89ccc69..f4503ce55e6bc 100644
--- a/server/src/main/java/org/opensearch/extensions/rest/RestSendToExtensionAction.java
+++ b/server/src/main/java/org/opensearch/extensions/rest/RestSendToExtensionAction.java
@@ -12,6 +12,7 @@
import org.apache.logging.log4j.Logger;
import org.opensearch.action.ActionModule.DynamicActionRegistry;
import org.opensearch.client.node.NodeClient;
+import org.opensearch.common.annotation.ExperimentalApi;
import org.opensearch.core.common.bytes.BytesReference;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.rest.RestStatus;
@@ -52,7 +53,10 @@
/**
* An action that forwards REST requests to an extension
+ *
+ * @opensearch.experimental
*/
+@ExperimentalApi
public class RestSendToExtensionAction extends BaseRestHandler {
private static final String SEND_TO_EXTENSION_ACTION = "send_to_extension_action";
diff --git a/server/src/main/java/org/opensearch/rest/NamedRoute.java b/server/src/main/java/org/opensearch/rest/NamedRoute.java
index 109f688a4924e..c2b3ea5fdeaaf 100644
--- a/server/src/main/java/org/opensearch/rest/NamedRoute.java
+++ b/server/src/main/java/org/opensearch/rest/NamedRoute.java
@@ -9,6 +9,7 @@
package org.opensearch.rest;
import org.opensearch.OpenSearchException;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.transport.TransportService;
import java.util.HashSet;
@@ -20,8 +21,9 @@
/**
* A named Route
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "2.7.0")
public class NamedRoute extends RestHandler.Route {
private static final String VALID_ACTION_NAME_PATTERN = "^[a-zA-Z0-9:/*_]*$";
diff --git a/server/src/main/java/org/opensearch/rest/RestHandler.java b/server/src/main/java/org/opensearch/rest/RestHandler.java
index 294dc3ffbe329..e9cab2852a8a3 100644
--- a/server/src/main/java/org/opensearch/rest/RestHandler.java
+++ b/server/src/main/java/org/opensearch/rest/RestHandler.java
@@ -46,6 +46,7 @@
*
* @opensearch.api
*/
+@PublicApi(since = "1.0.0")
@FunctionalInterface
public interface RestHandler {
@@ -231,7 +232,10 @@ public boolean equals(Object o) {
/**
* Represents an API that has been deprecated and is slated for removal.
+ *
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
class DeprecatedRoute extends Route {
private final String deprecationMessage;
@@ -249,7 +253,10 @@ public String getDeprecationMessage() {
/**
* Represents an API that has had its {@code path} or {@code method} changed. Holds both the
* new and previous {@code path} and {@code method} combination.
+ *
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
class ReplacedRoute extends Route {
private final String deprecatedPath;
diff --git a/server/src/main/java/org/opensearch/tasks/TaskListener.java b/server/src/main/java/org/opensearch/tasks/TaskListener.java
index 97df8eacee584..7ec08984a7f07 100644
--- a/server/src/main/java/org/opensearch/tasks/TaskListener.java
+++ b/server/src/main/java/org/opensearch/tasks/TaskListener.java
@@ -32,11 +32,14 @@
package org.opensearch.tasks;
+import org.opensearch.common.annotation.PublicApi;
+
/**
* Listener for Task success or failure.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public interface TaskListener {
/**
* Handle task response. This response may constitute a failure or a success
diff --git a/server/src/main/java/org/opensearch/transport/RemoteClusterService.java b/server/src/main/java/org/opensearch/transport/RemoteClusterService.java
index 35691cc5f8a1e..fc2cc601e4892 100644
--- a/server/src/main/java/org/opensearch/transport/RemoteClusterService.java
+++ b/server/src/main/java/org/opensearch/transport/RemoteClusterService.java
@@ -40,6 +40,7 @@
import org.opensearch.client.Client;
import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.node.DiscoveryNodeRole;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.settings.ClusterSettings;
import org.opensearch.common.settings.Setting;
import org.opensearch.common.settings.Settings;
@@ -73,8 +74,9 @@
/**
* Basic service for accessing remote clusters via gateway nodes
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class RemoteClusterService extends RemoteClusterAware implements Closeable {
private final Logger logger = LogManager.getLogger(RemoteClusterService.class);
diff --git a/server/src/main/java/org/opensearch/transport/RemoteConnectionInfo.java b/server/src/main/java/org/opensearch/transport/RemoteConnectionInfo.java
index 029b44c548b0e..a126a2db8e5c3 100644
--- a/server/src/main/java/org/opensearch/transport/RemoteConnectionInfo.java
+++ b/server/src/main/java/org/opensearch/transport/RemoteConnectionInfo.java
@@ -33,6 +33,7 @@
package org.opensearch.transport;
import org.opensearch.LegacyESVersion;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.unit.TimeValue;
import org.opensearch.core.common.io.stream.StreamInput;
import org.opensearch.core.common.io.stream.StreamOutput;
@@ -55,8 +56,9 @@
* This class encapsulates all remote cluster information to be rendered on
* {@code _remote/info} requests.
*
- * @opensearch.internal
+ * @opensearch.api
*/
+@PublicApi(since = "1.0.0")
public final class RemoteConnectionInfo implements ToXContentFragment, Writeable {
final ModeInfo modeInfo;
@@ -225,8 +227,9 @@ public int hashCode() {
/**
* Mode information
*
- * @opensearch.internal
+ * @opensearch.api
*/
+ @PublicApi(since = "1.0.0")
public interface ModeInfo extends ToXContentFragment, Writeable {
boolean isConnected();
diff --git a/server/src/main/java/org/opensearch/transport/RemoteConnectionStrategy.java b/server/src/main/java/org/opensearch/transport/RemoteConnectionStrategy.java
index f0b37c617725e..f2c159d1380e8 100644
--- a/server/src/main/java/org/opensearch/transport/RemoteConnectionStrategy.java
+++ b/server/src/main/java/org/opensearch/transport/RemoteConnectionStrategy.java
@@ -38,6 +38,7 @@
import org.apache.lucene.store.AlreadyClosedException;
import org.opensearch.action.support.ContextPreservingActionListener;
import org.opensearch.cluster.node.DiscoveryNode;
+import org.opensearch.common.annotation.PublicApi;
import org.opensearch.common.settings.Setting;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.unit.TimeValue;
@@ -75,7 +76,13 @@
*/
public abstract class RemoteConnectionStrategy implements TransportConnectionListener, Closeable {
- enum ConnectionStrategy {
+ /**
+ * Strategy to connect to remote nodes
+ *
+ * @opensearch.api
+ */
+ @PublicApi(since = "1.0.0")
+ public enum ConnectionStrategy {
SNIFF(
SniffConnectionStrategy.CHANNELS_PER_CONNECTION,
SniffConnectionStrategy::enablementSettings,