All URIs are relative to https://app.launchdarkly.com
Method | HTTP request | Description |
---|---|---|
get_user_attribute_names | GET /api/v2/user-attributes/{projectKey}/{environmentKey} | Get user attribute names |
UserAttributeNamesRep get_user_attribute_names(project_key, environment_key)
Get user attribute names
Use contexts instead > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use Get context attribute names instead of this endpoint. Get all in-use user attributes in the specified environment. The set of in-use attributes typically consists of all attributes seen within the past 30 days.
- Api Key Authentication (ApiKey):
import time
import launchdarkly_api
from launchdarkly_api.api import users_beta_api
from launchdarkly_api.model.invalid_request_error_rep import InvalidRequestErrorRep
from launchdarkly_api.model.forbidden_error_rep import ForbiddenErrorRep
from launchdarkly_api.model.not_found_error_rep import NotFoundErrorRep
from launchdarkly_api.model.unauthorized_error_rep import UnauthorizedErrorRep
from launchdarkly_api.model.user_attribute_names_rep import UserAttributeNamesRep
from pprint import pprint
# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
host = "https://app.launchdarkly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = users_beta_api.UsersBetaApi(api_client)
project_key = "projectKey_example" # str | The project key
environment_key = "environmentKey_example" # str | The environment key
# example passing only required values which don't have defaults set
try:
# Get user attribute names
api_response = api_instance.get_user_attribute_names(project_key, environment_key)
pprint(api_response)
except launchdarkly_api.ApiException as e:
print("Exception when calling UsersBetaApi->get_user_attribute_names: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_key | str | The project key | |
environment_key | str | The environment key |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | User attribute names response | - |
400 | Invalid request | - |
401 | Invalid access token | - |
403 | Forbidden | - |
404 | Invalid resource identifier | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]