For the complete documentation index, see llms.txt. For the full documentation snapshot, see llms-full.txt.
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.
Semantic patch requests support the following kind instructions for updating flag triggers.
Removes the existing trigger action and replaces it with the new instructions.
value: An array of the new kinds 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:
{
"instructions": [
{
"kind": "replaceTriggerActionInstructions",
"value": [ {"kind": "turnFlagOff"} ]
}
]
}
Generates a new URL for this trigger. You must update any clients using the trigger to use this new URL.
Here’s an example:
{
"instructions": [{ "kind": "cycleTriggerUrl" }]
}
Disables the trigger. This saves the trigger configuration, but the trigger stops running. To re-enable, use enableTrigger.
Here’s an example:
{
"instructions": [{ "kind": "disableTrigger" }]
}
Enables the trigger. If you previously disabled the trigger, it begins running again.
Here’s an example:
{
"instructions": [{ "kind": "enableTrigger" }]
}
curl --request PATCH \
--url https://app.launchdarkly.com/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "optional comment",
"instructions": [
{
"kind": "disableTrigger"
}
]
}
'{
"_id": "12ab3c45de678910abc12345",
"_version": 1,
"_creationDate": "1654104600000",
"_maintainerId": "12ab3c45de678910abc12345",
"_maintainer": {
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"role": "admin",
"email": "ariel@acme.com",
"firstName": "Ariel",
"lastName": "Flores"
},
"enabled": true,
"_status": "active",
"_lastFailedAt": "1654114600000",
"_integrationKey": "generic-trigger",
"instructions": "[ { \"kind\": \"turnFlagOn\" }]",
"_lastTriggeredAt": "1654114600000",
"_recentTriggerBodies": [
{
"timestamp": "1654104600000",
"jsonBody": {}
}
],
"_triggerCount": 3,
"triggerURL": "<string>",
"_links": {}
}Documentation Index
Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The project key
The environment key
The feature flag key
The flag trigger ID
Flag trigger response
The ID of this flag trigger
"12ab3c45de678910abc12345"
The flag trigger version
1
Timestamp of when the flag trigger was created
"1654104600000"
The ID of the flag trigger maintainer
"12ab3c45de678910abc12345"
Details on the member who maintains this flag trigger
Show child attributes
Whether the flag trigger is currently enabled
true
The trigger state: active, inactive, or failed
active, inactive, failed "active"
Timestamp of when the trigger most recently entered failed state
"1654114600000"
The unique identifier of the integration for your trigger
"generic-trigger"
Details on the action to perform when triggering
Show child attributes
"[ { \"kind\": \"turnFlagOn\" }]"
Timestamp of when the trigger was most recently executed
"1654114600000"
Details on recent flag trigger requests.
Show child attributes
Number of times the trigger has been executed
3
The unguessable URL for this flag trigger
The location and content type of related resources
Show child attributes
curl --request PATCH \
--url https://app.launchdarkly.com/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "optional comment",
"instructions": [
{
"kind": "disableTrigger"
}
]
}
'{
"_id": "12ab3c45de678910abc12345",
"_version": 1,
"_creationDate": "1654104600000",
"_maintainerId": "12ab3c45de678910abc12345",
"_maintainer": {
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"role": "admin",
"email": "ariel@acme.com",
"firstName": "Ariel",
"lastName": "Flores"
},
"enabled": true,
"_status": "active",
"_lastFailedAt": "1654114600000",
"_integrationKey": "generic-trigger",
"instructions": "[ { \"kind\": \"turnFlagOn\" }]",
"_lastTriggeredAt": "1654114600000",
"_recentTriggerBodies": [
{
"timestamp": "1654104600000",
"jsonBody": {}
}
],
"_triggerCount": 3,
"triggerURL": "<string>",
"_links": {}
}