Skip to content

Files

Latest commit

e44d477 · Apr 4, 2025

History

History
351 lines (243 loc) · 8.58 KB

OtherApi.md

File metadata and controls

351 lines (243 loc) · 8.58 KB

LaunchDarklyApi::OtherApi

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

Method HTTP request Description
get_caller_identity GET /api/v2/caller-identity Identify the caller
get_ips GET /api/v2/public-ip-list Gets the public IP list
get_openapi_spec GET /api/v2/openapi.json Gets the OpenAPI spec in json
get_root GET /api/v2 Root resource
get_versions GET /api/v2/versions Get version information

get_caller_identity

get_caller_identity

Identify the caller

Get basic information about the identity used (session cookie, API token, SDK keys, etc.) to call the API

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::OtherApi.new

begin
  # Identify the caller
  result = api_instance.get_caller_identity
  p result
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OtherApi->get_caller_identity: #{e}"
end

Using the get_caller_identity_with_http_info variant

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

<Array(, Integer, Hash)> get_caller_identity_with_http_info

begin
  # Identify the caller
  data, status_code, headers = api_instance.get_caller_identity_with_http_info
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <CallerIdentityRep>
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OtherApi->get_caller_identity_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

CallerIdentityRep

Authorization

ApiKey

HTTP request headers

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

get_ips

get_ips

Gets the public IP list

Get a list of IP ranges the LaunchDarkly service uses. You can use this list to allow LaunchDarkly through your firewall. We post upcoming changes to this list in advance on our status page.

In the sandbox, click 'Play' and enter any string in the 'Authorization' field to test this endpoint.

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::OtherApi.new

begin
  # Gets the public IP list
  result = api_instance.get_ips
  p result
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OtherApi->get_ips: #{e}"
end

Using the get_ips_with_http_info variant

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

<Array(, Integer, Hash)> get_ips_with_http_info

begin
  # Gets the public IP list
  data, status_code, headers = api_instance.get_ips_with_http_info
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <IpList>
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OtherApi->get_ips_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

IpList

Authorization

ApiKey

HTTP request headers

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

get_openapi_spec

get_openapi_spec

Gets the OpenAPI spec in json

Get the latest version of the OpenAPI specification for LaunchDarkly's API in JSON format. In the sandbox, click 'Play' and enter any string in the 'Authorization' field to test this endpoint.

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::OtherApi.new

begin
  # Gets the OpenAPI spec in json
  api_instance.get_openapi_spec
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OtherApi->get_openapi_spec: #{e}"
end

Using the get_openapi_spec_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)> get_openapi_spec_with_http_info

begin
  # Gets the OpenAPI spec in json
  data, status_code, headers = api_instance.get_openapi_spec_with_http_info
  p status_code # => 2xx
  p headers # => { ... }
  p data # => nil
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OtherApi->get_openapi_spec_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

nil (empty response body)

Authorization

ApiKey

HTTP request headers

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

get_root

get_root

Root resource

Get all of the resource categories the API supports. In the sandbox, click 'Play' and enter any string in the 'Authorization' field to test this endpoint.

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::OtherApi.new

begin
  # Root resource
  result = api_instance.get_root
  p result
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OtherApi->get_root: #{e}"
end

Using the get_root_with_http_info variant

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

<Array(, Integer, Hash)> get_root_with_http_info

begin
  # Root resource
  data, status_code, headers = api_instance.get_root_with_http_info
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <RootResponse>
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OtherApi->get_root_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

RootResponse

Authorization

ApiKey

HTTP request headers

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

get_versions

get_versions

Get version information

Get the latest API version, the list of valid API versions in ascending order, and the version being used for this request. These are all in the external, date-based format.

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::OtherApi.new

begin
  # Get version information
  result = api_instance.get_versions
  p result
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OtherApi->get_versions: #{e}"
end

Using the get_versions_with_http_info variant

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

<Array(, Integer, Hash)> get_versions_with_http_info

begin
  # Get version information
  data, status_code, headers = api_instance.get_versions_with_http_info
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <VersionsRep>
rescue LaunchDarklyApi::ApiError => e
  puts "Error when calling OtherApi->get_versions_with_http_info: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

VersionsRep

Authorization

ApiKey

HTTP request headers

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