I am using below code
var settings = new ConnectionSettings(new Uri("https://10.8.173.179:9200"));
settings.BasicAuthentication("elastic", "password");
settings.ServerCertificateValidationCallback(CertificateValidations.AllowAll);
var lowlevelClient = new ElasticLowLevelClient(settings);
var health = lowlevelClient.Cluster.Health<StringResponse>().DebugInformation;
Getting : "security","suppressed":[{"type":"security_exception","reason":"current license is non-compliant for [security]","license.expired.feature":"security"}]},"status":403}
It sounds like you may have been using a trial license. You can check which license you are running with by using the Get License API
var client = new ElasticLowLevelClient();
var getLicenseResponse = client.License.Get<StringResponse>();
which will issue the request
GET http://localhost:9200/_license
If the "type" is "trial" in the returned response, you are using a trial license.
You can revert to using a free basic license. If you're running
Core security features such as TLS, basic and native realm and role-based access control can be used with the basic license..
To start the basic license, you can use the Start Basic License API
var startBasicResponse = client.License.StartBasic<StringResponse>();
which sends a request to
POST http://localhost:9200/_license/start_basic
NOTE As per the API documentation, you must submit the API request with the acknowledge parameter set to "true" for the changes to take effect; you can submit the API call first without setting this parameter, to understand what changes it makes it terms of access to features.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With