Skip to content

Latest commit

 

History

History
1201 lines (957 loc) · 43.9 KB

AiConfigsBetaApi.md

File metadata and controls

1201 lines (957 loc) · 43.9 KB

AiConfigsBetaApi

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

Method HTTP request Description
deleteAIConfig DELETE /api/v2/projects/{projectKey}/ai-configs/{configKey} Delete AI Config
deleteAIConfigVariation DELETE /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey} Delete AI Config variation
deleteModelConfig DELETE /api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey} Delete an AI model config
getAIConfig GET /api/v2/projects/{projectKey}/ai-configs/{configKey} Get AI Config
getAIConfigMetrics GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics Get AI Config metrics
getAIConfigMetricsByVariation GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics-by-variation Get AI Config metrics by variation
getAIConfigVariation GET /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey} Get AI Config variation
getAIConfigs GET /api/v2/projects/{projectKey}/ai-configs List AI Configs
getModelConfig GET /api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey} Get AI model config
listModelConfigs GET /api/v2/projects/{projectKey}/ai-configs/model-configs List AI model configs
patchAIConfig PATCH /api/v2/projects/{projectKey}/ai-configs/{configKey} Update AI Config
patchAIConfigVariation PATCH /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey} Update AI Config variation
postAIConfig POST /api/v2/projects/{projectKey}/ai-configs Create new AI Config
postAIConfigVariation POST /api/v2/projects/{projectKey}/ai-configs/{configKey}/variations Create AI Config variation
postModelConfig POST /api/v2/projects/{projectKey}/ai-configs/model-configs Create an AI model config

deleteAIConfig

deleteAIConfig(ldAPIVersion, projectKey, configKey)

Delete AI Config

Delete an existing AI Config.

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "default"; // String | 
    String configKey = "configKey_example"; // String | 
    try {
      apiInstance.deleteAIConfig(ldAPIVersion, projectKey, configKey);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#deleteAIConfig");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
configKey String

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 No content -
400 Bad request -
403 Forbidden -
404 Not found -
500 Internal server error -

deleteAIConfigVariation

deleteAIConfigVariation(ldAPIVersion, projectKey, configKey, variationKey)

Delete AI Config variation

Delete a specific variation of an AI Config by config key and variation key.

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "projectKey_example"; // String | 
    String configKey = "configKey_example"; // String | 
    String variationKey = "variationKey_example"; // String | 
    try {
      apiInstance.deleteAIConfigVariation(ldAPIVersion, projectKey, configKey, variationKey);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#deleteAIConfigVariation");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
configKey String
variationKey String

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 No content -
400 Bad request -
403 Forbidden -
404 Not found -
500 Internal server error -

deleteModelConfig

deleteModelConfig(ldAPIVersion, projectKey, modelConfigKey)

Delete an AI model config

Delete an AI model config.

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "default"; // String | 
    String modelConfigKey = "modelConfigKey_example"; // String | 
    try {
      apiInstance.deleteModelConfig(ldAPIVersion, projectKey, modelConfigKey);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#deleteModelConfig");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
modelConfigKey String

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 No content -
400 Bad request -
403 Forbidden -
404 Not found -
500 Internal server error -

getAIConfig

AIConfig getAIConfig(ldAPIVersion, projectKey, configKey)

Get AI Config

Retrieve a specific AI Config by its key.

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "projectKey_example"; // String | 
    String configKey = "configKey_example"; // String | 
    try {
      AIConfig result = apiInstance.getAIConfig(ldAPIVersion, projectKey, configKey);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#getAIConfig");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
configKey String

Return type

AIConfig

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 AI Config found -
400 Bad request -
403 Forbidden -
404 Not found -
500 Internal server error -

getAIConfigMetrics

Metrics getAIConfigMetrics(ldAPIVersion, projectKey, configKey, from, to, env)

Get AI Config metrics

Retrieve usage metrics for an AI Config by config key.

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "projectKey_example"; // String | 
    String configKey = "configKey_example"; // String | 
    Integer from = 56; // Integer | The starting time, as milliseconds since epoch (inclusive).
    Integer to = 56; // Integer | The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`.
    String env = "env_example"; // String | An environment key. Only metrics from this environment will be included.
    try {
      Metrics result = apiInstance.getAIConfigMetrics(ldAPIVersion, projectKey, configKey, from, to, env);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#getAIConfigMetrics");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
configKey String
from Integer The starting time, as milliseconds since epoch (inclusive).
to Integer The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`.
env String An environment key. Only metrics from this environment will be included.

Return type

Metrics

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Metrics computed -
400 Bad request -
403 Forbidden -
404 Not found -
500 Internal server error -

getAIConfigMetricsByVariation

List<MetricByVariation> getAIConfigMetricsByVariation(ldAPIVersion, projectKey, configKey, from, to, env)

Get AI Config metrics by variation

Retrieve usage metrics for an AI Config by config key, with results split by variation.

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "projectKey_example"; // String | 
    String configKey = "configKey_example"; // String | 
    Integer from = 56; // Integer | The starting time, as milliseconds since epoch (inclusive).
    Integer to = 56; // Integer | The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`.
    String env = "env_example"; // String | An environment key. Only metrics from this environment will be included.
    try {
      List<MetricByVariation> result = apiInstance.getAIConfigMetricsByVariation(ldAPIVersion, projectKey, configKey, from, to, env);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#getAIConfigMetricsByVariation");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
configKey String
from Integer The starting time, as milliseconds since epoch (inclusive).
to Integer The ending time, as milliseconds since epoch (exclusive). May not be more than 100 days after `from`.
env String An environment key. Only metrics from this environment will be included.

Return type

List<MetricByVariation>

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Metrics computed -
400 Bad request -
403 Forbidden -
404 Not found -
500 Internal server error -

getAIConfigVariation

AIConfigVariationsResponse getAIConfigVariation(ldAPIVersion, projectKey, configKey, variationKey)

Get AI Config variation

Get an AI Config variation by key. The response includes all variation versions for the given variation key.

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "default"; // String | 
    String configKey = "default"; // String | 
    String variationKey = "default"; // String | 
    try {
      AIConfigVariationsResponse result = apiInstance.getAIConfigVariation(ldAPIVersion, projectKey, configKey, variationKey);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#getAIConfigVariation");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
configKey String
variationKey String

Return type

AIConfigVariationsResponse

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
400 Bad request -
403 Forbidden -
404 Not found -
500 Internal server error -

getAIConfigs

AIConfigs getAIConfigs(ldAPIVersion, projectKey, sort, limit, offset, filter)

List AI Configs

Get a list of all AI Configs in the given project.

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "default"; // String | 
    String sort = "sort_example"; // String | A sort to apply to the list of AI Configs.
    Integer limit = 56; // Integer | The number of AI Configs to return.
    Integer offset = 56; // Integer | 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 filter = "filter_example"; // String | A filter to apply to the list of AI Configs.
    try {
      AIConfigs result = apiInstance.getAIConfigs(ldAPIVersion, projectKey, sort, limit, offset, filter);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#getAIConfigs");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
sort String A sort to apply to the list of AI Configs. [optional]
limit Integer The number of AI Configs to return. [optional]
offset Integer 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]
filter String A filter to apply to the list of AI Configs. [optional]

Return type

AIConfigs

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
400 Bad request -
403 Forbidden -
404 Not found -
500 Internal server error -

getModelConfig

ModelConfig getModelConfig(ldAPIVersion, projectKey, modelConfigKey)

Get AI model config

Get an AI model config by key.

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "default"; // String | 
    String modelConfigKey = "default"; // String | 
    try {
      ModelConfig result = apiInstance.getModelConfig(ldAPIVersion, projectKey, modelConfigKey);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#getModelConfig");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
modelConfigKey String

Return type

ModelConfig

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
400 Bad request -
403 Forbidden -
404 Not found -
500 Internal server error -

listModelConfigs

List<ModelConfig> listModelConfigs(ldAPIVersion, projectKey)

List AI model configs

Get all AI model configs for a project.

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "default"; // String | 
    try {
      List<ModelConfig> result = apiInstance.listModelConfigs(ldAPIVersion, projectKey);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#listModelConfigs");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String

Return type

List<ModelConfig>

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
400 Bad request -
403 Forbidden -
404 Not found -
500 Internal server error -

patchAIConfig

AIConfig patchAIConfig(ldAPIVersion, projectKey, configKey, aiConfigPatch)

Update AI Config

Edit an existing AI Config. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here's an example: ``` { &quot;description&quot;: &quot;Example updated description&quot;, &quot;tags&quot;: [&quot;new-tag&quot;] } ```

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "projectKey_example"; // String | 
    String configKey = "configKey_example"; // String | 
    AIConfigPatch aiConfigPatch = new AIConfigPatch(); // AIConfigPatch | AI Config object to update
    try {
      AIConfig result = apiInstance.patchAIConfig(ldAPIVersion, projectKey, configKey, aiConfigPatch);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#patchAIConfig");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
configKey String
aiConfigPatch AIConfigPatch AI Config object to update [optional]

Return type

AIConfig

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 AI Config updated -
400 Bad request -
403 Forbidden -
404 Not found -
500 Internal server error -

patchAIConfigVariation

AIConfigVariation patchAIConfigVariation(ldAPIVersion, projectKey, configKey, variationKey, aiConfigVariationPatch)

Update AI Config variation

Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here's an example: ``` { &quot;messages&quot;: [ { &quot;role&quot;: &quot;system&quot;, &quot;content&quot;: &quot;The new message&quot; } ] } ```

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "projectKey_example"; // String | 
    String configKey = "configKey_example"; // String | 
    String variationKey = "variationKey_example"; // String | 
    AIConfigVariationPatch aiConfigVariationPatch = new AIConfigVariationPatch(); // AIConfigVariationPatch | AI Config variation object to update
    try {
      AIConfigVariation result = apiInstance.patchAIConfigVariation(ldAPIVersion, projectKey, configKey, variationKey, aiConfigVariationPatch);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#patchAIConfigVariation");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
configKey String
variationKey String
aiConfigVariationPatch AIConfigVariationPatch AI Config variation object to update [optional]

Return type

AIConfigVariation

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 AI Config variation updated -
400 Bad request -
403 Forbidden -
404 Not found -
500 Internal server error -

postAIConfig

AIConfig postAIConfig(ldAPIVersion, projectKey, aiConfigPost)

Create new AI Config

Create a new AI Config within the given project.

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "projectKey_example"; // String | 
    AIConfigPost aiConfigPost = new AIConfigPost(); // AIConfigPost | AI Config object to create
    try {
      AIConfig result = apiInstance.postAIConfig(ldAPIVersion, projectKey, aiConfigPost);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#postAIConfig");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
aiConfigPost AIConfigPost AI Config object to create

Return type

AIConfig

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 AI Config created -
400 Bad request -
403 Forbidden -
500 Internal server error -

postAIConfigVariation

AIConfigVariation postAIConfigVariation(ldAPIVersion, projectKey, configKey, aiConfigVariationPost)

Create AI Config variation

Create a new variation for a given AI Config. The <code>model</code> in the request body requires a <code>modelName</code> and <code>parameters</code>, for example: ``` &quot;model&quot;: { &quot;modelName&quot;: &quot;claude-3-opus-20240229&quot;, &quot;parameters&quot;: { &quot;max_tokens&quot;: 1024 } } ```

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "projectKey_example"; // String | 
    String configKey = "configKey_example"; // String | 
    AIConfigVariationPost aiConfigVariationPost = new AIConfigVariationPost(); // AIConfigVariationPost | AI Config variation object to create
    try {
      AIConfigVariation result = apiInstance.postAIConfigVariation(ldAPIVersion, projectKey, configKey, aiConfigVariationPost);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#postAIConfigVariation");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
configKey String
aiConfigVariationPost AIConfigVariationPost AI Config variation object to create

Return type

AIConfigVariation

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 AI Config variation created -
400 Bad request -
403 Forbidden -
500 Internal server error -

postModelConfig

ModelConfig postModelConfig(ldAPIVersion, projectKey, modelConfigPost)

Create an AI model config

Create an AI model config. You can use this in any variation for any AI Config in your project.

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

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

    AiConfigsBetaApi apiInstance = new AiConfigsBetaApi(defaultClient);
    String ldAPIVersion = "beta"; // String | Version of the endpoint.
    String projectKey = "default"; // String | 
    ModelConfigPost modelConfigPost = new ModelConfigPost(); // ModelConfigPost | AI model config object to create
    try {
      ModelConfig result = apiInstance.postModelConfig(ldAPIVersion, projectKey, modelConfigPost);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AiConfigsBetaApi#postModelConfig");
      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
ldAPIVersion String Version of the endpoint. [enum: beta]
projectKey String
modelConfigPost ModelConfigPost AI model config object to create

Return type

ModelConfig

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
400 Bad request -
403 Forbidden -
404 Not found -
500 Internal server error -