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 LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.OAuth2ClientsApi();
let oauthClientPost = new LaunchDarklyApi.OauthClientPost(); // OauthClientPost |
apiInstance.createOAuth2Client(oauthClientPost, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
oauthClientPost | OauthClientPost |
- Content-Type: application/json
- Accept: application/json
deleteOAuthClient(clientId)
Delete OAuth 2.0 client
Delete an existing OAuth 2.0 client by unique client ID.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.OAuth2ClientsApi();
let clientId = "clientId_example"; // String | The client ID
apiInstance.deleteOAuthClient(clientId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
Name | Type | Description | Notes |
---|---|---|---|
clientId | String | The client ID |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
Client getOAuthClientById(clientId)
Get client by ID
Get a registered OAuth 2.0 client by unique client ID.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.OAuth2ClientsApi();
let clientId = "clientId_example"; // String | The client ID
apiInstance.getOAuthClientById(clientId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
clientId | String | The client ID |
- Content-Type: Not defined
- Accept: application/json
ClientCollection getOAuthClients()
Get clients
Get all OAuth 2.0 clients registered by your account.
import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.OAuth2ClientsApi();
apiInstance.getOAuthClients((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
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 LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';
let apiInstance = new LaunchDarklyApi.OAuth2ClientsApi();
let clientId = "clientId_example"; // String | The client ID
let patchOperation = [{"op":"replace","path":"/name","value":"Example Client V2"}]; // [PatchOperation] |
apiInstance.patchOAuthClient(clientId, patchOperation, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
clientId | String | The client ID | |
patchOperation | [PatchOperation] |
- Content-Type: application/json
- Accept: application/json