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:

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 =“”).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:
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 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 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,