public async Task CreateAPIKeyIfNotFound()
        {
            string value = string.Empty;

            try
            {
                value = this.keyVaultClient.GetValue("Grafana--APIKey");
            }
            catch (Exception)
            {
            }

            if (string.IsNullOrEmpty(value))
            {
                string      svcCredentials = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes("admin:admin"));
                HttpRequest request        = this.PrepareRequest(
                    "api/auth/keys",
                    svcCredentials,
                    "BasicAuth");

                GrafanaAPIKeyRequestModel requestData = new GrafanaAPIKeyRequestModel("adminAPIKey", GrafanaRoleType.Admin);

                request.SetContent(requestData);

                var response = await this.httpClient.PostAsync(request);

                var result = JsonConvert.DeserializeObject <GrafanaAPIKeyResponseModel>(response.Content);

                await this.keyVaultClient.SetValueAsync("Grafana--APIKey", result.Key);
            }
        }
        public async Task <string> CreateAPIKey(string orgId)
        {
            string      svcCredentials = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes("admin:admin"));
            HttpRequest request        = this.PrepareRequest(
                "api/auth/keys",
                svcCredentials,
                "BasicAuth");

            GrafanaAPIKeyRequestModel requestData = new GrafanaAPIKeyRequestModel("adminAPIKey", GrafanaRoleType.Admin);

            if (!string.IsNullOrEmpty(orgId))
            {
                request.Headers.Add("X-Grafana-Org-Id", orgId);
            }

            request.SetContent(requestData);

            var response = await this.httpClient.PostAsync(request);

            var result = JsonConvert.DeserializeObject <GrafanaAPIKeyResponseModel>(response.Content);

            return(result.Key);
        }