Users (beta)

This feature is in beta

To use this feature, pass in a header including the LD-API-Version key with value set to beta. Use this header with each call. To learn more, read Beta resources.

LaunchDarkly creates a record for each user passed in to variation calls. This record powers the autocomplete functionality on the Feature Flag management page, as well as the Users page.

LaunchDarkly also offers an API that lets you tap into this data. You can use the users API to see what user data is available to LaunchDarkly, as well as determine which flag values a user will receive. You can also explicitly set which flag value a user will receive via this API.

Users are always scoped within a project and environment. In other words, each environment has its own set of user records.

Get user attribute names

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.

Request
Security:
ApiKey (readwrite)
path Parameters
projectKey
required
string <string>

The project key

environmentKey
required
string <string>

The environment key

Responses
200

User attribute names response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

get/api/v2/user-attributes/{projectKey}/{environmentKey}
Request samples
curl -i -X GET \
  https://app.launchdarkly.com/api/v2/user-attributes/:projectKey/:environmentKey \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "private": [
    ],
  • "custom": [
    ],
  • "standard": [
    ]
}