Update flag trigger

Update a flag trigger. Updating a flag trigger 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 flag triggers. <details> <summary>Click to expand instructions for <strong>updating flag triggers</strong></summary> #### replaceTriggerActionInstructions Removes the existing trigger action and replaces it with the new instructions. ##### Parameters - `value`: An array of the new `kind`s of actions to perform when triggering. Supported flag actions are `turnFlagOn` and `turnFlagOff`. Here's an example that replaces the existing action with new instructions to turn flag targeting off: ```json { "instructions": [ { "kind": "replaceTriggerActionInstructions", "value": [ {"kind": "turnFlagOff"} ] } ] } ``` #### cycleTriggerUrl Generates a new URL for this trigger. You must update any clients using the trigger to use this new URL. Here's an example: ```json { "instructions": [{ "kind": "cycleTriggerUrl" }] } ``` #### disableTrigger Disables the trigger. This saves the trigger configuration, but the trigger stops running. To re-enable, use `enableTrigger`. Here's an example: ```json { "instructions": [{ "kind": "disableTrigger" }] } ``` #### enableTrigger Enables the trigger. If you previously disabled the trigger, it begins running again. Here's an example: ```json { "instructions": [{ "kind": "enableTrigger" }] } ``` </details>

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequired
The project key
environmentKeystringRequired
The environment key
featureFlagKeystringRequired
The feature flag key
idstringRequired
The flag trigger ID

Request

This endpoint expects an object.
commentstringOptional
Optional comment describing the update
instructionslist of maps from strings to anyOptional

The instructions to perform when updating. This should be an array with objects that look like <code>{“kind”: “trigger_action”}</code>.

Response

Flag trigger response
_idstring or null
The ID of this flag trigger
_versioninteger or null
The flag trigger version
_creationDatelong or null
Timestamp of when the flag trigger was created
_maintainerIdstring or null
The ID of the flag trigger maintainer
_maintainerobject or null
Details on the member who maintains this flag trigger
enabledboolean or null
Whether the flag trigger is currently enabled
_integrationKeystring or null
The unique identifier of the integration for your trigger
instructionslist of maps from strings to any or null
Details on the action to perform when triggering
_lastTriggeredAtlong or null
Timestamp of when the trigger was most recently executed
_recentTriggerBodieslist of objects or null
Details on recent flag trigger requests.
_triggerCountinteger or null
Number of times the trigger has been executed
triggerURLstring or null
The unguessable URL for this flag trigger

Errors