Skip to content

Latest commit

 

History

History
365 lines (257 loc) · 9.88 KB

OAuth2ClientsBetaApi.md

File metadata and controls

365 lines (257 loc) · 9.88 KB

LaunchDarklyApi::OAuth2ClientsBetaApi

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

Method HTTP request Description
create_o_auth2_client POST /api/v2/oauth/clients Create a LaunchDarkly OAuth 2.0 client
delete_o_auth_client DELETE /api/v2/oauth/clients/{clientId} Delete OAuth 2.0 client
get_o_auth_client_by_id GET /api/v2/oauth/clients/{clientId} Get client by ID
get_o_auth_clients GET /api/v2/oauth/clients Get clients
patch_o_auth_client PATCH /api/v2/oauth/clients/{clientId} Patch client by ID

create_o_auth2_client

create_o_auth2_client(oauth_client_post)

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.

Examples

require 'time'
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
  # Configure API key authorization: ApiKey
  config.api_key['ApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['ApiKey'] = 'Bearer'
end

api_instance = LaunchDarklyApi::OAuth2ClientsBetaApi.new
oauth_client_post = LaunchDarklyApi::OauthClientPost.new # OauthClientPost | 

begin
  # Create a LaunchDarkly OAuth 2.0 client
  result = api_instance.create_o_auth2_client(oauth_client_post)
  p result
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OAuth2ClientsBetaApi->create_o_auth2_client: #{e}"
end

Using the create_o_auth2_client_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> create_o_auth2_client_with_http_info(oauth_client_post)

begin
  # Create a LaunchDarkly OAuth 2.0 client
  data, status_code, headers = api_instance.create_o_auth2_client_with_http_info(oauth_client_post)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Client>
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OAuth2ClientsBetaApi->create_o_auth2_client_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
oauth_client_post OauthClientPost

Return type

Client

Authorization

ApiKey

HTTP request headers

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

delete_o_auth_client

delete_o_auth_client(client_id)

Delete OAuth 2.0 client

Delete an existing OAuth 2.0 client by unique client ID.

Examples

require 'time'
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
  # Configure API key authorization: ApiKey
  config.api_key['ApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['ApiKey'] = 'Bearer'
end

api_instance = LaunchDarklyApi::OAuth2ClientsBetaApi.new
client_id = 'client_id_example' # String | The client ID

begin
  # Delete OAuth 2.0 client
  api_instance.delete_o_auth_client(client_id)
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OAuth2ClientsBetaApi->delete_o_auth_client: #{e}"
end

Using the delete_o_auth_client_with_http_info variant

This returns an Array which contains the response data (nil in this case), status code and headers.

<Array(nil, Integer, Hash)> delete_o_auth_client_with_http_info(client_id)

begin
  # Delete OAuth 2.0 client
  data, status_code, headers = api_instance.delete_o_auth_client_with_http_info(client_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OAuth2ClientsBetaApi->delete_o_auth_client_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
client_id String The client ID

Return type

nil (empty response body)

Authorization

ApiKey

HTTP request headers

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

get_o_auth_client_by_id

get_o_auth_client_by_id(client_id)

Get client by ID

Get a registered OAuth 2.0 client by unique client ID.

Examples

require 'time'
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
  # Configure API key authorization: ApiKey
  config.api_key['ApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['ApiKey'] = 'Bearer'
end

api_instance = LaunchDarklyApi::OAuth2ClientsBetaApi.new
client_id = 'client_id_example' # String | The client ID

begin
  # Get client by ID
  result = api_instance.get_o_auth_client_by_id(client_id)
  p result
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OAuth2ClientsBetaApi->get_o_auth_client_by_id: #{e}"
end

Using the get_o_auth_client_by_id_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_o_auth_client_by_id_with_http_info(client_id)

begin
  # Get client by ID
  data, status_code, headers = api_instance.get_o_auth_client_by_id_with_http_info(client_id)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Client>
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OAuth2ClientsBetaApi->get_o_auth_client_by_id_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
client_id String The client ID

Return type

Client

Authorization

ApiKey

HTTP request headers

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

get_o_auth_clients

get_o_auth_clients

Get clients

Get all OAuth 2.0 clients registered by your account.

Examples

require 'time'
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
  # Configure API key authorization: ApiKey
  config.api_key['ApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['ApiKey'] = 'Bearer'
end

api_instance = LaunchDarklyApi::OAuth2ClientsBetaApi.new

begin
  # Get clients
  result = api_instance.get_o_auth_clients
  p result
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OAuth2ClientsBetaApi->get_o_auth_clients: #{e}"
end

Using the get_o_auth_clients_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> get_o_auth_clients_with_http_info

begin
  # Get clients
  data, status_code, headers = api_instance.get_o_auth_clients_with_http_info
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <ClientCollection>
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OAuth2ClientsBetaApi->get_o_auth_clients_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

ClientCollection

Authorization

ApiKey

HTTP request headers

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

patch_o_auth_client

patch_o_auth_client(client_id, patch_operation)

Patch client by ID

Patch an existing OAuth 2.0 client by client ID. Requires a JSON Patch representation of the desired changes to the client. Only name, description, and redirectUri may be patched.

Examples

require 'time'
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
  # Configure API key authorization: ApiKey
  config.api_key['ApiKey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['ApiKey'] = 'Bearer'
end

api_instance = LaunchDarklyApi::OAuth2ClientsBetaApi.new
client_id = 'client_id_example' # String | The client ID
patch_operation = [LaunchDarklyApi::PatchOperation.new({op: 'replace', path: '/exampleField', value: new example value})] # Array<PatchOperation> | 

begin
  # Patch client by ID
  result = api_instance.patch_o_auth_client(client_id, patch_operation)
  p result
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OAuth2ClientsBetaApi->patch_o_auth_client: #{e}"
end

Using the patch_o_auth_client_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> patch_o_auth_client_with_http_info(client_id, patch_operation)

begin
  # Patch client by ID
  data, status_code, headers = api_instance.patch_o_auth_client_with_http_info(client_id, patch_operation)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <Client>
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OAuth2ClientsBetaApi->patch_o_auth_client_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
client_id String The client ID
patch_operation Array<PatchOperation>

Return type

Client

Authorization

ApiKey

HTTP request headers

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