All URIs are relative to https://app.launchdarkly.com/api/v2
| Method | HTTP request | Description |
|---|---|---|
| GetExpiringUserTargetsForUser | GET /users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey} | Get expiring dates on flags for user |
| GetUserFlagSetting | GET /users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} | Fetch a single flag setting for a user by key. |
| GetUserFlagSettings | GET /users/{projectKey}/{environmentKey}/{userKey}/flags | Fetch a single flag setting for a user by key. |
| PatchExpiringUserTargetsForFlags | PATCH /users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey} | Update, add, or delete expiring user targets for a single user on all flags |
| PutFlagSetting | PUT /users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} | Specifically enable or disable a feature flag for a user based on their key. |
UserTargetingExpirationOnFlagsForUser GetExpiringUserTargetsForUser (string projectKey, string environmentKey, string userKey)
Get expiring dates on flags for user
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class GetExpiringUserTargetsForUserExample
{
public void main()
{
// Configure API key authorization: Token
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new UserSettingsApi();
var projectKey = projectKey_example; // string | The project key, used to tie the flags together under one project so they can be managed together.
var environmentKey = environmentKey_example; // string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
var userKey = userKey_example; // string | The user's key.
try
{
// Get expiring dates on flags for user
UserTargetingExpirationOnFlagsForUser result = apiInstance.GetExpiringUserTargetsForUser(projectKey, environmentKey, userKey);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserSettingsApi.GetExpiringUserTargetsForUser: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. | |
| environmentKey | string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | |
| userKey | string | The user's key. |
UserTargetingExpirationOnFlagsForUser
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserFlagSetting GetUserFlagSetting (string projectKey, string environmentKey, string userKey, string featureFlagKey)
Fetch a single flag setting for a user by key.
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class GetUserFlagSettingExample
{
public void main()
{
// Configure API key authorization: Token
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new UserSettingsApi();
var projectKey = projectKey_example; // string | The project key, used to tie the flags together under one project so they can be managed together.
var environmentKey = environmentKey_example; // string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
var userKey = userKey_example; // string | The user's key.
var featureFlagKey = featureFlagKey_example; // string | The feature flag's key. The key identifies the flag in your code.
try
{
// Fetch a single flag setting for a user by key.
UserFlagSetting result = apiInstance.GetUserFlagSetting(projectKey, environmentKey, userKey, featureFlagKey);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserSettingsApi.GetUserFlagSetting: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. | |
| environmentKey | string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | |
| userKey | string | The user's key. | |
| featureFlagKey | string | The feature flag's key. The key identifies the flag in your code. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserFlagSettings GetUserFlagSettings (string projectKey, string environmentKey, string userKey)
Fetch a single flag setting for a user by key.
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class GetUserFlagSettingsExample
{
public void main()
{
// Configure API key authorization: Token
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new UserSettingsApi();
var projectKey = projectKey_example; // string | The project key, used to tie the flags together under one project so they can be managed together.
var environmentKey = environmentKey_example; // string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
var userKey = userKey_example; // string | The user's key.
try
{
// Fetch a single flag setting for a user by key.
UserFlagSettings result = apiInstance.GetUserFlagSettings(projectKey, environmentKey, userKey);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserSettingsApi.GetUserFlagSettings: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. | |
| environmentKey | string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | |
| userKey | string | The user's key. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserTargetingExpirationOnFlagsForUser PatchExpiringUserTargetsForFlags (string projectKey, string environmentKey, string userKey, Object semanticPatchWithComment)
Update, add, or delete expiring user targets for a single user on all flags
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class PatchExpiringUserTargetsForFlagsExample
{
public void main()
{
// Configure API key authorization: Token
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new UserSettingsApi();
var projectKey = projectKey_example; // string | The project key, used to tie the flags together under one project so they can be managed together.
var environmentKey = environmentKey_example; // string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
var userKey = userKey_example; // string | The user's key.
var semanticPatchWithComment = ; // Object | Requires a Semantic Patch representation of the desired changes to the resource. 'https://apidocs.launchdarkly.com/reference#updates-via-semantic-patches'. The addition of comments is also supported.
try
{
// Update, add, or delete expiring user targets for a single user on all flags
UserTargetingExpirationOnFlagsForUser result = apiInstance.PatchExpiringUserTargetsForFlags(projectKey, environmentKey, userKey, semanticPatchWithComment);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserSettingsApi.PatchExpiringUserTargetsForFlags: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. | |
| environmentKey | string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | |
| userKey | string | The user's key. | |
| semanticPatchWithComment | Object | Requires a Semantic Patch representation of the desired changes to the resource. 'https://apidocs.launchdarkly.com/reference#updates-via-semantic-patches'. The addition of comments is also supported. |
UserTargetingExpirationOnFlagsForUser
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void PutFlagSetting (string projectKey, string environmentKey, string userKey, string featureFlagKey, UserSettingsBody userSettingsBody)
Specifically enable or disable a feature flag for a user based on their key.
using System;
using System.Diagnostics;
using LaunchDarkly.Api.Api;
using LaunchDarkly.Api.Client;
using LaunchDarkly.Api.Model;
namespace Example
{
public class PutFlagSettingExample
{
public void main()
{
// Configure API key authorization: Token
Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");
var apiInstance = new UserSettingsApi();
var projectKey = projectKey_example; // string | The project key, used to tie the flags together under one project so they can be managed together.
var environmentKey = environmentKey_example; // string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
var userKey = userKey_example; // string | The user's key.
var featureFlagKey = featureFlagKey_example; // string | The feature flag's key. The key identifies the flag in your code.
var userSettingsBody = new UserSettingsBody(); // UserSettingsBody |
try
{
// Specifically enable or disable a feature flag for a user based on their key.
apiInstance.PutFlagSetting(projectKey, environmentKey, userKey, featureFlagKey, userSettingsBody);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserSettingsApi.PutFlagSetting: " + e.Message );
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| projectKey | string | The project key, used to tie the flags together under one project so they can be managed together. | |
| environmentKey | string | The environment key, used to tie together flag configuration and users under one environment so they can be managed together. | |
| userKey | string | The user's key. | |
| featureFlagKey | string | The feature flag's key. The key identifies the flag in your code. | |
| userSettingsBody | UserSettingsBody |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]