Skip to content

Latest commit

 

History

History
473 lines (373 loc) · 18.5 KB

File metadata and controls

473 lines (373 loc) · 18.5 KB

InsightsScoresBetaApi

All URIs are relative to https://app.launchdarkly.com

Method HTTP request Description
createInsightGroup POST /api/v2/engineering-insights/insights/group Create insight group
deleteInsightGroup DELETE /api/v2/engineering-insights/insights/groups/{insightGroupKey} Delete insight group
getInsightGroup GET /api/v2/engineering-insights/insights/groups/{insightGroupKey} Get insight group
getInsightGroups GET /api/v2/engineering-insights/insights/groups List insight groups
getInsightsScores GET /api/v2/engineering-insights/insights/scores Get insight scores
patchInsightGroup PATCH /api/v2/engineering-insights/insights/groups/{insightGroupKey} Patch insight group

createInsightGroup

InsightGroup createInsightGroup(postInsightGroupParams)

Create insight group

Create insight group

Example

// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.InsightsScoresBetaApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app.launchdarkly.com");
    
    // Configure API key authorization: ApiKey
    ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKey.setApiKeyPrefix("Token");

    InsightsScoresBetaApi apiInstance = new InsightsScoresBetaApi(defaultClient);
    PostInsightGroupParams postInsightGroupParams = new PostInsightGroupParams(); // PostInsightGroupParams | 
    try {
      InsightGroup result = apiInstance.createInsightGroup(postInsightGroupParams);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling InsightsScoresBetaApi#createInsightGroup");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
postInsightGroupParams PostInsightGroupParams

Return type

InsightGroup

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Created -
400 Invalid request -
401 Invalid access token -
403 Forbidden -
404 Invalid resource identifier -
409 Status conflict -
429 Rate limited -

deleteInsightGroup

deleteInsightGroup(insightGroupKey)

Delete insight group

Delete insight group

Example

// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.InsightsScoresBetaApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app.launchdarkly.com");
    
    // Configure API key authorization: ApiKey
    ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKey.setApiKeyPrefix("Token");

    InsightsScoresBetaApi apiInstance = new InsightsScoresBetaApi(defaultClient);
    String insightGroupKey = "insightGroupKey_example"; // String | The insight group key
    try {
      apiInstance.deleteInsightGroup(insightGroupKey);
    } catch (ApiException e) {
      System.err.println("Exception when calling InsightsScoresBetaApi#deleteInsightGroup");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
insightGroupKey String The insight group key

Return type

null (empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 Action succeeded -
400 Invalid request -
401 Invalid access token -
403 Forbidden -
404 Invalid resource identifier -
429 Rate limited -

getInsightGroup

InsightGroup getInsightGroup(insightGroupKey, expand)

Get insight group

Get insight group ### Expanding the insight group response LaunchDarkly supports expanding the insight group response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `scores` includes details on all of the scores used in the engineering insights metrics views for this group * `environment` includes details on each environment associated with this group For example, use `?expand=scores` to include the `scores` field in the response. By default, this field is not included in the response.

Example

// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.InsightsScoresBetaApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app.launchdarkly.com");
    
    // Configure API key authorization: ApiKey
    ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKey.setApiKeyPrefix("Token");

    InsightsScoresBetaApi apiInstance = new InsightsScoresBetaApi(defaultClient);
    String insightGroupKey = "insightGroupKey_example"; // String | The insight group key
    String expand = "expand_example"; // String | Options: `scores`, `environment`
    try {
      InsightGroup result = apiInstance.getInsightGroup(insightGroupKey, expand);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling InsightsScoresBetaApi#getInsightGroup");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
insightGroupKey String The insight group key
expand String Options: `scores`, `environment` [optional]

Return type

InsightGroup

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Insight group response -
400 Invalid request -
401 Invalid access token -
403 Forbidden -
404 Invalid resource identifier -
429 Rate limited -

getInsightGroups

InsightGroupCollection getInsightGroups(limit, offset, sort, query, expand)

List insight groups

List groups for which you are collecting insights ### Expanding the insight groups collection response LaunchDarkly supports expanding the insight groups collection response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `scores` includes details on all of the scores used in the engineering insights metrics views for each group * `environment` includes details on each environment associated with each group * `metadata` includes counts of the number of insight groups with particular indicators, such as "excellent," "good," "fair," and so on. For example, use `?expand=scores` to include the `scores` field in the response. By default, this field is not included in the response.

Example

// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.InsightsScoresBetaApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app.launchdarkly.com");
    
    // Configure API key authorization: ApiKey
    ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKey.setApiKeyPrefix("Token");

    InsightsScoresBetaApi apiInstance = new InsightsScoresBetaApi(defaultClient);
    Long limit = 56L; // Long | The number of insight groups to return. Default is 20. Must be between 1 and 20 inclusive.
    Long offset = 56L; // Long | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.
    String sort = "sort_example"; // String | Sort flag list by field. Prefix field with <code>-</code> to sort in descending order. Allowed fields: name
    String query = "query_example"; // String | Filter list of insights groups by name.
    String expand = "expand_example"; // String | Options: `scores`, `environment`, `metadata`
    try {
      InsightGroupCollection result = apiInstance.getInsightGroups(limit, offset, sort, query, expand);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling InsightsScoresBetaApi#getInsightGroups");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
limit Long The number of insight groups to return. Default is 20. Must be between 1 and 20 inclusive. [optional]
offset Long Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. [optional]
sort String Sort flag list by field. Prefix field with <code>-</code> to sort in descending order. Allowed fields: name [optional]
query String Filter list of insights groups by name. [optional]
expand String Options: `scores`, `environment`, `metadata` [optional]

Return type

InsightGroupCollection

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Insight groups collection response -
400 Invalid request -
401 Invalid access token -
403 Forbidden -
429 Rate limited -

getInsightsScores

InsightScores getInsightsScores(projectKey, environmentKey, applicationKey)

Get insight scores

Return insights scores, based on the given parameters. This data is also used in engineering insights metrics views.

Example

// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.InsightsScoresBetaApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app.launchdarkly.com");
    
    // Configure API key authorization: ApiKey
    ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKey.setApiKeyPrefix("Token");

    InsightsScoresBetaApi apiInstance = new InsightsScoresBetaApi(defaultClient);
    String projectKey = "projectKey_example"; // String | The project key
    String environmentKey = "environmentKey_example"; // String | The environment key
    String applicationKey = "applicationKey_example"; // String | Comma separated list of application keys
    try {
      InsightScores result = apiInstance.getInsightsScores(projectKey, environmentKey, applicationKey);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling InsightsScoresBetaApi#getInsightsScores");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
projectKey String The project key
environmentKey String The environment key
applicationKey String Comma separated list of application keys [optional]

Return type

InsightScores

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Insight score response -
400 Invalid request -
401 Invalid access token -
403 Forbidden -
429 Rate limited -

patchInsightGroup

InsightGroup patchInsightGroup(insightGroupKey, patchOperation)

Patch insight group

Update an insight group. Updating an insight group uses a JSON patch representation of the desired changes. To learn more, read Updates.

Example

// Import classes:
import com.launchdarkly.api.ApiClient;
import com.launchdarkly.api.ApiException;
import com.launchdarkly.api.Configuration;
import com.launchdarkly.api.auth.*;
import com.launchdarkly.api.models.*;
import com.launchdarkly.api.api.InsightsScoresBetaApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app.launchdarkly.com");
    
    // Configure API key authorization: ApiKey
    ApiKeyAuth ApiKey = (ApiKeyAuth) defaultClient.getAuthentication("ApiKey");
    ApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKey.setApiKeyPrefix("Token");

    InsightsScoresBetaApi apiInstance = new InsightsScoresBetaApi(defaultClient);
    String insightGroupKey = "insightGroupKey_example"; // String | The insight group key
    List<PatchOperation> patchOperation = Arrays.asList(); // List<PatchOperation> | 
    try {
      InsightGroup result = apiInstance.patchInsightGroup(insightGroupKey, patchOperation);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling InsightsScoresBetaApi#patchInsightGroup");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
insightGroupKey String The insight group key
patchOperation List<PatchOperation>

Return type

InsightGroup

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Insight group response -
400 Invalid request -
401 Invalid access token -
403 Forbidden -
404 Invalid resource identifier -
422 Invalid patch content -
429 Rate limited -