Update expiring user targets for segment

Contexts are now available

After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use Update expiring targets for segment instead of this endpoint. To learn more, read Contexts.

Update expiring user targets for a segment. Updating a user target expiration 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.

If the request is well-formed but any of its instructions failed to process, this operation returns status code 200. In this case, the response errors array will be non-empty.

Instructions

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

Click to expand instructions for updating expiring user targets

addExpireUserTargetDate

Schedules a date and time when LaunchDarkly will remove a user from segment targeting.

Parameters
  • targetType: A segment’s target type, must be either included or excluded.
  • userKey: The user key.
  • value: The date when the user should expire from the segment targeting, in Unix milliseconds.

updateExpireUserTargetDate

Updates the date and time when LaunchDarkly will remove a user from segment targeting.

Parameters
  • targetType: A segment’s target type, must be either included or excluded.
  • userKey: The user key.
  • value: The new date when the user should expire from the segment targeting, in Unix milliseconds.
  • version: The segment version.

removeExpireUserTargetDate

Removes the scheduled expiration for the user in the segment.

Parameters
  • targetType: A segment’s target type, must be either included or excluded.
  • userKey: The user key.

Path parameters

projectKeystringRequired
The project key
environmentKeystringRequired
The environment key
segmentKeystringRequired
The segment key

Headers

AuthorizationstringRequired

Request

This endpoint expects an object.
instructionslist of objectsRequired
Semantic patch instructions for the desired changes to the resource
commentstringOptional
Optional description of changes

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