Skip to content

Latest commit

 

History

History
234 lines (182 loc) · 8.79 KB

File metadata and controls

234 lines (182 loc) · 8.79 KB

InsightsRepositoriesBetaApi

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

Method HTTP request Description
associateRepositoriesAndProjects PUT /api/v2/engineering-insights/repositories/projects Associate repositories with projects
deleteRepositoryProject DELETE /api/v2/engineering-insights/repositories/{repositoryKey}/projects/{projectKey} Remove repository project association
getInsightsRepositories GET /api/v2/engineering-insights/repositories List repositories

associateRepositoriesAndProjects

InsightsRepositoryProjectCollection associateRepositoriesAndProjects(insightsRepositoryProjectMappings)

Associate repositories with projects

Associate repositories with projects

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.InsightsRepositoriesBetaApi;

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");

    InsightsRepositoriesBetaApi apiInstance = new InsightsRepositoriesBetaApi(defaultClient);
    InsightsRepositoryProjectMappings insightsRepositoryProjectMappings = new InsightsRepositoryProjectMappings(); // InsightsRepositoryProjectMappings | 
    try {
      InsightsRepositoryProjectCollection result = apiInstance.associateRepositoriesAndProjects(insightsRepositoryProjectMappings);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling InsightsRepositoriesBetaApi#associateRepositoriesAndProjects");
      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
insightsRepositoryProjectMappings InsightsRepositoryProjectMappings

Return type

InsightsRepositoryProjectCollection

Authorization

ApiKey

HTTP request headers

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

HTTP response details

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

deleteRepositoryProject

deleteRepositoryProject(repositoryKey, projectKey)

Remove repository project association

Remove repository project association

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.InsightsRepositoriesBetaApi;

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");

    InsightsRepositoriesBetaApi apiInstance = new InsightsRepositoriesBetaApi(defaultClient);
    String repositoryKey = "repositoryKey_example"; // String | The repository key
    String projectKey = "projectKey_example"; // String | The project key
    try {
      apiInstance.deleteRepositoryProject(repositoryKey, projectKey);
    } catch (ApiException e) {
      System.err.println("Exception when calling InsightsRepositoriesBetaApi#deleteRepositoryProject");
      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
repositoryKey String The repository key
projectKey String The project 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 -

getInsightsRepositories

InsightsRepositoryCollection getInsightsRepositories(expand)

List repositories

Get a list of repositories ### Expanding the repository collection response LaunchDarkly supports expanding the repository collection response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `projects` includes details on all of the LaunchDarkly projects associated with each repository For example, use `?expand=projects` to include the `projects` 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.InsightsRepositoriesBetaApi;

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");

    InsightsRepositoriesBetaApi apiInstance = new InsightsRepositoriesBetaApi(defaultClient);
    String expand = "expand_example"; // String | Expand properties in response. Options: `projects`
    try {
      InsightsRepositoryCollection result = apiInstance.getInsightsRepositories(expand);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling InsightsRepositoriesBetaApi#getInsightsRepositories");
      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
expand String Expand properties in response. Options: `projects` [optional]

Return type

InsightsRepositoryCollection

Authorization

ApiKey

HTTP request headers

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

HTTP response details

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