Is it possible to call Rest APIs on 9102 through java SDK

Looking at code, it seems port 8091 is hardcoded there, and only Rest calls to that port are allowed.
So is it impossible to call Rest APIs to get Indexes or Eventing functions etc ?

@zxcvmnb you can use :8091/indexStatus to get Indexes I believe. Generally I use curl -v Administrator:yourpassword@indexeripaddress:9102/getIndexStatement to get all the indexes

This is from the Java SDK 2.7. Here is the link: https://docs.couchbase.com/java-sdk/current/managing-clusters.html

You can manage indexes in the Java SDK using the BucketManager class, with its various N1QL related methods: listN1qlIndexes() , createN1qlIndex(…) , etc…

The following example creates a N1QL secondary index named “fooBar” on the “test” bucket, indexing fields “foo” and “bar”:

BucketManager testManager = CouchbaseCluster.open(“127.0.0.1”).openBucket(“test”).bucketManager();
boolean ignoreIfExists = true; // if index exists, don’t throw exception
boolean defer = false; // create the index immediately
testManager.createN1qlIndex(“fooBar”, ignoreIfExists, defer, “foo”, “bar”);

Similarly you can use listN1qlIndexes().

More details are here: https://docs.couchbase.com/sdk-api/couchbase-java-client-2.7.5/
Search for BucketManager >> listN1qlIndexes

Note that getting information about eventing functions is not available. what are you looking for explicitly?

That does not get me replication info ie replica count or replica nodes.
It is available through https://docs.couchbase.com/server/current/rest-api/get-statement-indexes.html call running on 9102

We want to fetch Eventing functions and save them so we can use them later on same or different buckets if needed.

@zxcvmnb Exporting Functions | Couchbase Docs should help. Let me know if that does not resolve your question

My query was , is it possible to get Eventing functions through java SDK ?

@zxcvmnb Currently, it’s not possible to create eventing functions via SDK.

We do have a REST API that allows eventing lifecycle operations however:

Best Regards,
Siri