Skip to content

Latest commit

 

History

History
266 lines (178 loc) · 7.1 KB

OAuth2ClientsApi.md

File metadata and controls

266 lines (178 loc) · 7.1 KB

LaunchDarklyApi.OAuth2ClientsApi

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

createOAuth2Client

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.

Example

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

Parameters

Name Type Description Notes
oauthClientPost OauthClientPost

Return type

Client

Authorization

ApiKey

HTTP request headers

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

deleteOAuthClient

deleteOAuthClient(clientId)

Delete OAuth 2.0 client

Delete an existing OAuth 2.0 client by unique client ID.

Example

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.');
  }
});

Parameters

Name Type Description Notes
clientId String The client ID

Return type

null (empty response body)

Authorization

ApiKey

HTTP request headers

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

getOAuthClientById

Client getOAuthClientById(clientId)

Get client by ID

Get a registered OAuth 2.0 client by unique client ID.

Example

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

Parameters

Name Type Description Notes
clientId String The client ID

Return type

Client

Authorization

ApiKey

HTTP request headers

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

getOAuthClients

ClientCollection getOAuthClients()

Get clients

Get all OAuth 2.0 clients registered by your account.

Example

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

Parameters

This endpoint does not need any parameter.

Return type

ClientCollection

Authorization

ApiKey

HTTP request headers

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

patchOAuthClient

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.

Example

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

Parameters

Name Type Description Notes
clientId String The client ID
patchOperation [PatchOperation]

Return type

Client

Authorization

ApiKey

HTTP request headers

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