User settings

Get expiring dates on flags for user

Deprecated

GET
/api/v2/users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey}

Get a list of flags for which the given user is scheduled for removal.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string

The project key

Formatstring
userKey*string

The user key

Formatstring
environmentKey*string

The environment key

Formatstring

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v2/users/string/string/expiring-user-targets/string"
{  "items": [    {      "_id": "12ab3c45de678910fgh12345",      "_version": 1,      "expirationDate": "1658192820000",      "userKey": "example-user-key",      "targetType": "included",      "variationId": "ce67d625-a8b9-4fb5-a344-ab909d9d4f4d",      "_resourceId": {        "kind": "string",        "projectKey": "string",        "environmentKey": "string",        "flagKey": "string",        "key": "string"      }    }  ],  "_links": {    "property1": {      "href": "string",      "type": "string"    },    "property2": {      "href": "string",      "type": "string"    }  }}

Update flag settings for user PUT

Enable or disable a feature flag for a user based on their key. Omitting the `setting` attribute from the request body, or including a `setting` of `null`, erases the current setting for a user. If you previously patched the flag, and the patch included the user's data, LaunchDarkly continues to use that data. If LaunchDarkly has never encountered the user's key before, it calculates the flag values based on the user key alone.

Update expiring user target for flags PATCH

Schedule the specified user for removal from individual targeting on one or more flags. The user must already be individually targeted for each flag. You can add, update, or remove a scheduled removal date. You can only schedule a user for removal on a single variation per flag. Updating an expiring target uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating expiring user targets. <details> <summary>Click to expand instructions for <strong>updating expiring user targets</strong></summary> #### addExpireUserTargetDate Adds a date and time that LaunchDarkly will remove the user from the flag's individual targeting. ##### Parameters * `flagKey`: The flag key * `variationId`: ID of a variation on the flag * `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag. #### updateExpireUserTargetDate Updates the date and time that LaunchDarkly will remove the user from the flag's individual targeting. ##### Parameters * `flagKey`: The flag key * `variationId`: ID of a variation on the flag * `value`: The time, in Unix milliseconds, when LaunchDarkly should remove the user from individual targeting for this flag. * `version`: The version of the expiring user target to update. If included, update will fail if version doesn't match current version of the expiring user target. #### removeExpireUserTargetDate Removes the scheduled removal of the user from the flag's individual targeting. The user will remain part of the flag's individual targeting until explicitly removed, or until another removal is scheduled. ##### Parameters * `flagKey`: The flag key * `variationId`: ID of a variation on the flag </details>