Update expiring context targets on feature flag
Schedule a context for removal from individual targeting on a feature flag. The flag must already individually target the context.
You can add, update, or remove a scheduled removal date. You can only schedule a context 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 targets.
Click to expand instructions for updating expiring targets
addExpiringTarget
Adds a date and time that LaunchDarkly will remove the context from the flag’s individual targeting.
Parameters
value
: The time, in Unix milliseconds, when LaunchDarkly should remove the context from individual targeting for this flagvariationId
: ID of a variation on the flagcontextKey
: The context key for the context to remove from individual targetingcontextKind
: The kind of context represented by thecontextKey
Here’s an example:
updateExpiringTarget
Updates the date and time that LaunchDarkly will remove the context from the flag’s individual targeting
Parameters
value
: The time, in Unix milliseconds, when LaunchDarkly should remove the context from individual targeting for this flagvariationId
: ID of a variation on the flagcontextKey
: The context key for the context to remove from individual targetingcontextKind
: The kind of context represented by thecontextKey
version
: (Optional) The version of the expiring target to update. If included, update will fail if version doesn’t match current version of the expiring target.
Here’s an example:
removeExpiringTarget
Removes the scheduled removal of the context from the flag’s individual targeting. The context will remain part of the flag’s individual targeting until you explicitly remove it, or until you schedule another removal.
Parameters
variationId
: ID of a variation on the flagcontextKey
: The context key for the context to remove from individual targetingcontextKind
: The kind of context represented by thecontextKey
Here’s an example:
Path parameters
The project key
The environment key
The feature flag key
Headers
Request
The instructions to perform when updating
Optional comment describing the change
Response
Expiring target response
A list of the results from each instruction
The location and content type of related resources