All URIs are relative to https://app.launchdarkly.com
| Method | HTTP request | Description |
|---|---|---|
| deleteReleasePolicy | DELETE /api/v2/projects/{projectKey}/release-policies/{policyKey} | Delete a release policy |
| getReleasePolicies | GET /api/v2/projects/{projectKey}/release-policies | List release policies |
| getReleasePolicy | GET /api/v2/projects/{projectKey}/release-policies/{policyKey} | Get a release policy by key |
| postReleasePoliciesOrder | POST /api/v2/projects/{projectKey}/release-policies/order | Update the order of existing release policies |
| postReleasePolicy | POST /api/v2/projects/{projectKey}/release-policies | Create a release policy |
| putReleasePolicy | PUT /api/v2/projects/{projectKey}/release-policies/{policyKey} | Update a release policy |
deleteReleasePolicy(ldAPIVersion, projectKey, policyKey)
Delete a release policy
Delete an existing release policy for the specified project.
// 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.ReleasePoliciesBetaApi;
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");
ReleasePoliciesBetaApi apiInstance = new ReleasePoliciesBetaApi(defaultClient);
String ldAPIVersion = "beta"; // String | Version of the endpoint.
String projectKey = "default"; // String | The project key
String policyKey = "production-release"; // String | The human-readable key of the release policy
try {
apiInstance.deleteReleasePolicy(ldAPIVersion, projectKey, policyKey);
} catch (ApiException e) {
System.err.println("Exception when calling ReleasePoliciesBetaApi#deleteReleasePolicy");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ldAPIVersion | String | Version of the endpoint. | [enum: beta] |
| projectKey | String | The project key | |
| policyKey | String | The human-readable key of the release policy |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | Release policy deleted successfully | - |
| 400 | Bad request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
ReleasePoliciesResponse getReleasePolicies(ldAPIVersion, projectKey, excludeDefault)
List release policies
Get a list of release policies for the specified project with optional filtering.
// 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.ReleasePoliciesBetaApi;
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");
ReleasePoliciesBetaApi apiInstance = new ReleasePoliciesBetaApi(defaultClient);
String ldAPIVersion = "beta"; // String | Version of the endpoint.
String projectKey = "default"; // String | The project key
Boolean excludeDefault = false; // Boolean | When true, exclude the default release policy from the response. When false or omitted, include the default policy if an environment filter is present.
try {
ReleasePoliciesResponse result = apiInstance.getReleasePolicies(ldAPIVersion, projectKey, excludeDefault);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReleasePoliciesBetaApi#getReleasePolicies");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ldAPIVersion | String | Version of the endpoint. | [enum: beta] |
| projectKey | String | The project key | |
| excludeDefault | Boolean | When true, exclude the default release policy from the response. When false or omitted, include the default policy if an environment filter is present. | [optional] [default to false] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List of release policies | - |
| 400 | Bad request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
ReleasePolicy getReleasePolicy(ldAPIVersion, projectKey, policyKey)
Get a release policy by key
Retrieve a single release policy by its key for the specified project.
// 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.ReleasePoliciesBetaApi;
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");
ReleasePoliciesBetaApi apiInstance = new ReleasePoliciesBetaApi(defaultClient);
String ldAPIVersion = "beta"; // String | Version of the endpoint.
String projectKey = "default"; // String | The project key
String policyKey = "production-release"; // String | The release policy key
try {
ReleasePolicy result = apiInstance.getReleasePolicy(ldAPIVersion, projectKey, policyKey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReleasePoliciesBetaApi#getReleasePolicy");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ldAPIVersion | String | Version of the endpoint. | [enum: beta] |
| projectKey | String | The project key | |
| policyKey | String | The release policy key |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Release policy found | - |
| 400 | Bad request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
List<ReleasePolicy> postReleasePoliciesOrder(ldAPIVersion, projectKey, requestBody)
Update the order of existing release policies
Update the order of existing release policies for the specified project.
// 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.ReleasePoliciesBetaApi;
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");
ReleasePoliciesBetaApi apiInstance = new ReleasePoliciesBetaApi(defaultClient);
String ldAPIVersion = "beta"; // String | Version of the endpoint.
String projectKey = "default"; // String | The project key
List<String> requestBody = Arrays.asList(); // List<String> | Array of release policy keys in the desired rank order (scoped policies only). These keys must include _all_ of the scoped release policies for the project.
try {
List<ReleasePolicy> result = apiInstance.postReleasePoliciesOrder(ldAPIVersion, projectKey, requestBody);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReleasePoliciesBetaApi#postReleasePoliciesOrder");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ldAPIVersion | String | Version of the endpoint. | [enum: beta] |
| projectKey | String | The project key | |
| requestBody | List<String> | Array of release policy keys in the desired rank order (scoped policies only). These keys must include all of the scoped release policies for the project. |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Release policies updated successfully | - |
| 400 | Bad request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |
ReleasePolicy postReleasePolicy(ldAPIVersion, projectKey, postReleasePolicyRequest)
Create a release policy
Create a new release policy for the specified project.
// 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.ReleasePoliciesBetaApi;
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");
ReleasePoliciesBetaApi apiInstance = new ReleasePoliciesBetaApi(defaultClient);
String ldAPIVersion = "beta"; // String | Version of the endpoint.
String projectKey = "default"; // String | The project key
PostReleasePolicyRequest postReleasePolicyRequest = new PostReleasePolicyRequest(); // PostReleasePolicyRequest | Release policy to create
try {
ReleasePolicy result = apiInstance.postReleasePolicy(ldAPIVersion, projectKey, postReleasePolicyRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReleasePoliciesBetaApi#postReleasePolicy");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ldAPIVersion | String | Version of the endpoint. | [enum: beta] |
| projectKey | String | The project key | |
| postReleasePolicyRequest | PostReleasePolicyRequest | Release policy to create |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Release policy created successfully | - |
| 400 | Bad request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 409 | Conflict | - |
| 500 | Internal server error | - |
ReleasePolicy putReleasePolicy(ldAPIVersion, projectKey, policyKey, putReleasePolicyRequest)
Update a release policy
Update an existing release policy for the specified project.
// 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.ReleasePoliciesBetaApi;
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");
ReleasePoliciesBetaApi apiInstance = new ReleasePoliciesBetaApi(defaultClient);
String ldAPIVersion = "beta"; // String | Version of the endpoint.
String projectKey = "default"; // String | The project key
String policyKey = "production-release"; // String | The human-readable key of the release policy
PutReleasePolicyRequest putReleasePolicyRequest = new PutReleasePolicyRequest(); // PutReleasePolicyRequest | Release policy data to update
try {
ReleasePolicy result = apiInstance.putReleasePolicy(ldAPIVersion, projectKey, policyKey, putReleasePolicyRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReleasePoliciesBetaApi#putReleasePolicy");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ldAPIVersion | String | Version of the endpoint. | [enum: beta] |
| projectKey | String | The project key | |
| policyKey | String | The human-readable key of the release policy | |
| putReleasePolicyRequest | PutReleasePolicyRequest | Release policy data to update |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Release policy updated successfully | - |
| 400 | Bad request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Not found | - |
| 500 | Internal server error | - |