All URIs are relative to https://app.launchdarkly.com
Method | HTTP request | Description |
---|---|---|
createOAuth2Client | POST /api/v2/oauth/clients | Create a LaunchDarkly OAuth 2.0 client |
deleteOAuthClient | DELETE /api/v2/oauth/clients/{clientId} | Delete OAuth 2.0 client |
getOAuthClientById | GET /api/v2/oauth/clients/{clientId} | Get client by ID |
getOAuthClients | GET /api/v2/oauth/clients | Get clients |
patchOAuthClient | PATCH /api/v2/oauth/clients/{clientId} | Patch client by ID |
Client createOAuth2Client(oauthClientPost)
Create a LaunchDarkly OAuth 2.0 client
Create (register) a LaunchDarkly OAuth2 client. OAuth2 clients allow you to build custom integrations using LaunchDarkly as your identity provider.
// 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.OAuth2ClientsApi;
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");
OAuth2ClientsApi apiInstance = new OAuth2ClientsApi(defaultClient);
OauthClientPost oauthClientPost = new OauthClientPost(); // OauthClientPost |
try {
Client result = apiInstance.createOAuth2Client(oauthClientPost);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OAuth2ClientsApi#createOAuth2Client");
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 |
---|---|---|---|
oauthClientPost | OauthClientPost |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | OAuth 2.0 client response | - |
400 | Invalid request | - |
401 | Invalid access token | - |
403 | Forbidden | - |
deleteOAuthClient(clientId)
Delete OAuth 2.0 client
Delete an existing OAuth 2.0 client by unique client ID.
// 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.OAuth2ClientsApi;
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");
OAuth2ClientsApi apiInstance = new OAuth2ClientsApi(defaultClient);
String clientId = "clientId_example"; // String | The client ID
try {
apiInstance.deleteOAuthClient(clientId);
} catch (ApiException e) {
System.err.println("Exception when calling OAuth2ClientsApi#deleteOAuthClient");
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 |
---|---|---|---|
clientId | String | The client ID |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Action succeeded | - |
400 | Invalid request | - |
401 | Invalid access token | - |
403 | Forbidden | - |
404 | Invalid resource identifier | - |
Client getOAuthClientById(clientId)
Get client by ID
Get a registered OAuth 2.0 client by unique client ID.
// 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.OAuth2ClientsApi;
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");
OAuth2ClientsApi apiInstance = new OAuth2ClientsApi(defaultClient);
String clientId = "clientId_example"; // String | The client ID
try {
Client result = apiInstance.getOAuthClientById(clientId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OAuth2ClientsApi#getOAuthClientById");
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 |
---|---|---|---|
clientId | String | The client ID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OAuth 2.0 client response | - |
400 | Invalid request | - |
401 | Invalid access token | - |
403 | Forbidden | - |
404 | Invalid resource identifier | - |
ClientCollection getOAuthClients()
Get clients
Get all OAuth 2.0 clients registered by your account.
// 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.OAuth2ClientsApi;
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");
OAuth2ClientsApi apiInstance = new OAuth2ClientsApi(defaultClient);
try {
ClientCollection result = apiInstance.getOAuthClients();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OAuth2ClientsApi#getOAuthClients");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OAuth 2.0 client collection response | - |
400 | Invalid request | - |
401 | Invalid access token | - |
403 | Forbidden | - |
Client patchOAuthClient(clientId, patchOperation)
Patch client by ID
Patch an existing OAuth 2.0 client by client ID. Updating an OAuth2 client uses a JSON patch representation of the desired changes. To learn more, read Updates. Only `name`, `description`, and `redirectUri` may be patched.
// 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.OAuth2ClientsApi;
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");
OAuth2ClientsApi apiInstance = new OAuth2ClientsApi(defaultClient);
String clientId = "clientId_example"; // String | The client ID
List<PatchOperation> patchOperation = Arrays.asList(); // List<PatchOperation> |
try {
Client result = apiInstance.patchOAuthClient(clientId, patchOperation);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OAuth2ClientsApi#patchOAuthClient");
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 |
---|---|---|---|
clientId | String | The client ID | |
patchOperation | List<PatchOperation> |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OAuth 2.0 client response | - |
400 | Invalid request | - |
401 | Invalid access token | - |
403 | Forbidden | - |
404 | Invalid resource identifier | - |