REST requests via .NET SDK?

I’m currently working in project, where I have access to most of the .NET SDK API functions and I’m facing some limitations. I don’t have access to API REST directly - which would solve my problems. The question is, is there a method or way to issue the API REST part i.e.: " /pools/default" and get full output as would it be in case of API REST way: “curl -u admin:pass http://localhost:8091/pools/default”?

Hi @radon

The .NET does expose some of the functionality via the REST endpoints. These are mainly behind the cluster / bucket management APIs.

What exactly are you looking for / trying to do?


Hi @MikeGoldsmith, thanks for respond.
Well, generally it’s convenience of using (1*)API REST and (2*)future project flow.

  1. I’m bit struggling with documentation of .NET SDK vs. API REST (which is way more convenient to work on). Or maybe I missed something?
    For example, it’s not too clear how to retrieve an information from .NET knowing the source: " /settings/alerts" .
  2. Currently, I have only a few classes and methods exposed inside my project and I have no possibility to implement more methods and react quickly of future needs.

I’m not really following what you’re trying to achieve. Is there a specific issue you’re trying to do or looking for a way to execute potential future Couchbase functionality directly via REST through the SDK?

There isn’t a way using the .NET SDK to execute direct REST calls and return the result directly to the consumer.

FYI all the Couchbase SDKs have a regular release cadence of 1st Tuesday of each month so we’re normally on top of server changes / features and fixing bugs in the SDK.

I’m sorry for the misunderstanding. The topic is not related to a technical issue/bug.
To simplify the case, how do you find a particular .NET method based only on REST calls? For example: I want to use the REST call: “/settings/alerts”. Which .NET method gives me the same results?

Unfortunately none of the SDKs expose the /system/alerts REST endpoint. That one is probably best used directly with a native HTTP Client.

We also don’t have a direct mapping of REST > SDK. The SDKs are primarily focused on exposing cluster core functionality (KV, N1QL, etc) plus some service management. It does not reflect the REST APIs perfectly.

1 Like