curl --request GET \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/sdk-keys \
--header 'Authorization: <api-key>' \
--header 'LD-API-Version: <ld-api-version>'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/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}/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}/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}/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}/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}/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": 7,
"items": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "sdk",
"description": "description",
"environmentSummary": {
"color": "F5A623",
"_links": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"name": "My Environment",
"key": "environment-key-123abc"
},
"_createdByMemberId": "_createdByMemberId",
"isDefault": true,
"viewSummaries": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"resourceSummary": {
"flagCount": 5,
"segmentCount": 2
},
"name": "name",
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"resourceSummary": {
"flagCount": 5,
"segmentCount": 2
},
"name": "name",
"key": "key"
}
],
"_createdAt": 6,
"name": "name",
"expiry": 0,
"value": "value",
"_updatedAt": 1,
"_version": 5,
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "sdk",
"description": "description",
"environmentSummary": {
"color": "F5A623",
"_links": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"name": "My Environment",
"key": "environment-key-123abc"
},
"_createdByMemberId": "_createdByMemberId",
"isDefault": true,
"viewSummaries": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"resourceSummary": {
"flagCount": 5,
"segmentCount": 2
},
"name": "name",
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"resourceSummary": {
"flagCount": 5,
"segmentCount": 2
},
"name": "name",
"key": "key"
}
],
"_createdAt": 6,
"name": "name",
"expiry": 0,
"value": "value",
"_updatedAt": 1,
"_version": 5,
"key": "key"
}
]
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Get all project SDK keys
Get all SDK keys for a given project across environments.
curl --request GET \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/sdk-keys \
--header 'Authorization: <api-key>' \
--header 'LD-API-Version: <ld-api-version>'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/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}/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}/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}/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}/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}/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": 7,
"items": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "sdk",
"description": "description",
"environmentSummary": {
"color": "F5A623",
"_links": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"name": "My Environment",
"key": "environment-key-123abc"
},
"_createdByMemberId": "_createdByMemberId",
"isDefault": true,
"viewSummaries": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"resourceSummary": {
"flagCount": 5,
"segmentCount": 2
},
"name": "name",
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"resourceSummary": {
"flagCount": 5,
"segmentCount": 2
},
"name": "name",
"key": "key"
}
],
"_createdAt": 6,
"name": "name",
"expiry": 0,
"value": "value",
"_updatedAt": 1,
"_version": 5,
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "sdk",
"description": "description",
"environmentSummary": {
"color": "F5A623",
"_links": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"name": "My Environment",
"key": "environment-key-123abc"
},
"_createdByMemberId": "_createdByMemberId",
"isDefault": true,
"viewSummaries": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"resourceSummary": {
"flagCount": 5,
"segmentCount": 2
},
"name": "name",
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"resourceSummary": {
"flagCount": 5,
"segmentCount": 2
},
"name": "name",
"key": "key"
}
],
"_createdAt": 6,
"name": "name",
"expiry": 0,
"value": "value",
"_updatedAt": 1,
"_version": 5,
"key": "key"
}
]
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Authorizations
Headers
Version of the endpoint.
beta Path Parameters
Query Parameters
A queryfilter expression to apply to the list of SDK keys. Supports the following fields and operators: kind (equals, anyOf; values: "sdk", "mobile"), active (equals, anyOf; values: true, false), environmentKey (equals, anyOf; values: environment keys), viewKey (equals, anyOf; values: view key strings — returns only SDK keys linked to the specified view(s)), name (equals only; returns SDK keys whose name or key contains the value, matched case-insensitively). Example: kind anyOf ["sdk","mobile"], environmentKey anyOf ["production","test"], viewKey equals my-view, name equals "production".
The number of SDK keys to return. Defaults to 20. Maximum is 100.
The number of SDK keys to skip. Used for pagination.
A comma-separated list of fields to expand in the response. Supported fields: environmentSummary, viewSummaries.
A sort to apply to the list of SDK keys. Supported fields: createdAt and environmentKey. Prefix createdAt with - to sort in descending order (for example, -createdAt). environmentKey orders keys by environment key ascending, then by creation time ascending within each environment, so each page is environment-contiguous.
createdAt, -createdAt, environmentKey