Get all environment SDK keys
curl --request GET \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys \
--header 'Authorization: <api-key>' \
--header 'LD-API-Version: <ld-api-version>'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys"
headers = {
"LD-API-Version": "<ld-api-version>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'LD-API-Version': '<ld-api-version>', Authorization: '<api-key>'}
};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys', 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/projects/{projectKey}/environments/{environmentKey}/sdk-keys",
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>",
"LD-API-Version: <ld-api-version>"
],
]);
$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/projects/{projectKey}/environments/{environmentKey}/sdk-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("LD-API-Version", "<ld-api-version>")
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/projects/{projectKey}/environments/{environmentKey}/sdk-keys")
.header("LD-API-Version", "<ld-api-version>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["LD-API-Version"] = '<ld-api-version>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"_links": {
"self": {
"href": "href",
"type": "type"
}
},
"totalCount": 5,
"items": [
{
"isDefault": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "sdk",
"_createdAt": 6,
"name": "name",
"description": "description",
"expiry": 0,
"value": "value",
"_updatedAt": 1,
"_version": 5,
"key": "key",
"_createdByMemberId": "_createdByMemberId"
},
{
"isDefault": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "sdk",
"_createdAt": 6,
"name": "name",
"description": "description",
"expiry": 0,
"value": "value",
"_updatedAt": 1,
"_version": 5,
"key": "key",
"_createdByMemberId": "_createdByMemberId"
}
]
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Get all environment SDK keys
Get all SDK keys for a given project and environment. Can filter by kind.
GET
/
api
/
v2
/
projects
/
{projectKey}
/
environments
/
{environmentKey}
/
sdk-keys
Get all environment SDK keys
curl --request GET \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys \
--header 'Authorization: <api-key>' \
--header 'LD-API-Version: <ld-api-version>'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys"
headers = {
"LD-API-Version": "<ld-api-version>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'LD-API-Version': '<ld-api-version>', Authorization: '<api-key>'}
};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys', 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/projects/{projectKey}/environments/{environmentKey}/sdk-keys",
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>",
"LD-API-Version: <ld-api-version>"
],
]);
$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/projects/{projectKey}/environments/{environmentKey}/sdk-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("LD-API-Version", "<ld-api-version>")
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/projects/{projectKey}/environments/{environmentKey}/sdk-keys")
.header("LD-API-Version", "<ld-api-version>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/environments/{environmentKey}/sdk-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["LD-API-Version"] = '<ld-api-version>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"_links": {
"self": {
"href": "href",
"type": "type"
}
},
"totalCount": 5,
"items": [
{
"isDefault": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "sdk",
"_createdAt": 6,
"name": "name",
"description": "description",
"expiry": 0,
"value": "value",
"_updatedAt": 1,
"_version": 5,
"key": "key",
"_createdByMemberId": "_createdByMemberId"
},
{
"isDefault": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "sdk",
"_createdAt": 6,
"name": "name",
"description": "description",
"expiry": 0,
"value": "value",
"_updatedAt": 1,
"_version": 5,
"key": "key",
"_createdByMemberId": "_createdByMemberId"
}
]
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Authorizations
Headers
Version of the endpoint.
Available options:
beta Query Parameters
A filter to apply to the list of SDK keys. Supports the following fields and operators: kind (equals "sdk" or "mobile"), active (equals true or false). Format: field:value. Example: kind:sdk.
The number of SDK keys to return. Defaults to 20. Maximum is 100.
The number of SDK keys to skip. Used for pagination.
A sort to apply to the list of SDK keys. Supported field: createdAt. Prefix the field with - to sort in descending order (for example, -createdAt).
Available options:
createdAt, -createdAt