Update expiring user target for flags

Deprecated
PATCH
/api/v2/users/:projectKey/:userKey/expiring-user-targets/:environmentKey

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.

Instructions

Semantic patch requests support the following kind instructions for updating expiring user targets.

Click to expand instructions for updating expiring user targets

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

Path parameters

projectKeystringRequired

The project key

userKeystringRequired

The user key

environmentKeystringRequired

The environment key

Request

This endpoint expects an object.
instructionslist of objectsRequired

The instructions to perform when updating

commentstringOptional

Optional comment describing the change

Response

Expiring user target response

itemslist of objects

An array of expiring user targets

totalInstructionsintegerOptional

The total count of instructions sent in the PATCH request

successfulInstructionsintegerOptional

The total count of successful instructions sent in the PATCH request

failedInstructionsintegerOptional

The total count of the failed instructions sent in the PATCH request

errorslist of objectsOptional

An array of error messages for the failed instructions

Errors

Built with