Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
cURL
curl --request GET \ --url https://app.launchdarkly.com/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id} \ --header 'Authorization: <api-key>'
import requests url = "https://app.launchdarkly.com/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}" headers = {"Authorization": "<api-key>"} response = requests.get(url, headers=headers) print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}}; fetch('https://app.launchdarkly.com/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://app.launchdarkly.com/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "Authorization: <api-key>" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
package main import ( "fmt" "net/http" "io" ) func main() { url := "https://app.launchdarkly.com/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "<api-key>") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) }
HttpResponse<String> response = Unirest.get("https://app.launchdarkly.com/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}") .header("Authorization", "<api-key>") .asString();
require 'uri' require 'net/http' url = URI("https://app.launchdarkly.com/api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '<api-key>' response = http.request(request) puts response.read_body
{ "_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": {} }
{ "code": "unauthorized", "message": "Invalid access token" }
{ "code": "forbidden", "message": "Forbidden. Access to the requested resource was denied." }
{ "code": "not_found", "message": "Invalid resource identifier" }
{ "code": "rate_limited", "message": "You've exceeded the API rate limit. Try again later." }
Get a flag trigger by ID.
The project key
The feature flag key
The environment 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
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
"[ { \"kind\": \"turnFlagOn\" }]"
Timestamp of when the trigger was most recently executed
Details on recent flag trigger requests.
Number of times the trigger has been executed
3
The unguessable URL for this flag trigger
The location and content type of related resources