Get linked views for a given resource
curl --request GET \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/view-associations/{resourceType}/{resourceKey} \
--header 'Authorization: <api-key>' \
--header 'LD-API-Version: <ld-api-version>'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/view-associations/{resourceType}/{resourceKey}"
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}/view-associations/{resourceType}/{resourceKey}', 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}/view-associations/{resourceType}/{resourceKey}",
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}/view-associations/{resourceType}/{resourceKey}"
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}/view-associations/{resourceType}/{resourceKey}")
.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}/view-associations/{resourceType}/{resourceKey}")
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": {
"next": {
"href": "href",
"type": "type"
},
"last": {
"href": "href",
"type": "type"
},
"prev": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
},
"first": {
"href": "href",
"type": "type"
}
},
"totalCount": 7,
"items": [
{
"metricsExpanded": {
"totalCount": 3,
"items": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
}
]
},
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"maintainer": {
"kind": "kind",
"maintainerMember": {
"firstName": "firstName",
"lastName": "lastName",
"role": "role",
"id": "id",
"email": "email"
},
"id": "id",
"maintainerTeam": {
"name": "name",
"id": "id",
"key": "key"
}
},
"metricsSummary": {
"count": 3
},
"createdAt": 6,
"projectKey": "projectKey",
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"generateSdkKeys": true,
"flagsSummary": {
"count": 5,
"linkedFlags": {
"totalCount": 2,
"items": [
{
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
},
{
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
}
]
}
},
"id": "id",
"aiConfigsSummary": {
"count": 2
},
"key": "key",
"updatedAt": 1,
"resourcesExpanded": {
"totalCount": 3,
"items": {
"flags": {
"totalCount": 6,
"items": [
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
},
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
}
]
},
"aiConfigs": {
"totalCount": 6,
"items": [
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
},
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
}
]
},
"metrics": {
"totalCount": 3,
"items": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
}
]
},
"segments": {
"totalCount": 5,
"items": [
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
},
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
}
]
}
}
},
"resourceSummary": {
"flagCount": 4,
"metricCount": 1,
"totalCount": 1,
"segmentCount": 7,
"aiConfigCount": 1
},
"version": 0,
"tags": [
"tags",
"tags"
],
"accountId": "accountId",
"deletedAt": 5,
"deleted": false,
"name": "name",
"segmentsSummary": {
"linkedSegments": {
"totalCount": 9,
"items": [
{
"environmentId": "environmentId",
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
},
{
"environmentId": "environmentId",
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
}
]
},
"count": 7
},
"aiConfigsExpanded": {
"totalCount": 6,
"items": [
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
},
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
}
]
},
"segmentsExpanded": {
"totalCount": 6,
"items": [
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
},
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
}
]
},
"_affectsSdkPayload": true,
"projectId": "projectId",
"flagsExpanded": {
"totalCount": 1,
"items": [
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
},
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
}
]
}
},
{
"metricsExpanded": {
"totalCount": 3,
"items": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
}
]
},
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"maintainer": {
"kind": "kind",
"maintainerMember": {
"firstName": "firstName",
"lastName": "lastName",
"role": "role",
"id": "id",
"email": "email"
},
"id": "id",
"maintainerTeam": {
"name": "name",
"id": "id",
"key": "key"
}
},
"metricsSummary": {
"count": 3
},
"createdAt": 6,
"projectKey": "projectKey",
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"generateSdkKeys": true,
"flagsSummary": {
"count": 5,
"linkedFlags": {
"totalCount": 2,
"items": [
{
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
},
{
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
}
]
}
},
"id": "id",
"aiConfigsSummary": {
"count": 2
},
"key": "key",
"updatedAt": 1,
"resourcesExpanded": {
"totalCount": 3,
"items": {
"flags": {
"totalCount": 6,
"items": [
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
},
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
}
]
},
"aiConfigs": {
"totalCount": 6,
"items": [
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
},
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
}
]
},
"metrics": {
"totalCount": 3,
"items": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
}
]
},
"segments": {
"totalCount": 5,
"items": [
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
},
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
}
]
}
}
},
"resourceSummary": {
"flagCount": 4,
"metricCount": 1,
"totalCount": 1,
"segmentCount": 7,
"aiConfigCount": 1
},
"version": 0,
"tags": [
"tags",
"tags"
],
"accountId": "accountId",
"deletedAt": 5,
"deleted": false,
"name": "name",
"segmentsSummary": {
"linkedSegments": {
"totalCount": 9,
"items": [
{
"environmentId": "environmentId",
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
},
{
"environmentId": "environmentId",
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
}
]
},
"count": 7
},
"aiConfigsExpanded": {
"totalCount": 6,
"items": [
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
},
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
}
]
},
"segmentsExpanded": {
"totalCount": 6,
"items": [
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
},
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
}
]
},
"_affectsSdkPayload": true,
"projectId": "projectId",
"flagsExpanded": {
"totalCount": 1,
"items": [
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
},
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
}
]
}
}
]
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Get linked views for a given resource
Get a list of all linked views for a resource. Flags and AI configs are identified by key. Segments are identified by segment ID.
GET
/
api
/
v2
/
projects
/
{projectKey}
/
view-associations
/
{resourceType}
/
{resourceKey}
Get linked views for a given resource
curl --request GET \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/view-associations/{resourceType}/{resourceKey} \
--header 'Authorization: <api-key>' \
--header 'LD-API-Version: <ld-api-version>'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/view-associations/{resourceType}/{resourceKey}"
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}/view-associations/{resourceType}/{resourceKey}', 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}/view-associations/{resourceType}/{resourceKey}",
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}/view-associations/{resourceType}/{resourceKey}"
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}/view-associations/{resourceType}/{resourceKey}")
.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}/view-associations/{resourceType}/{resourceKey}")
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": {
"next": {
"href": "href",
"type": "type"
},
"last": {
"href": "href",
"type": "type"
},
"prev": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
},
"first": {
"href": "href",
"type": "type"
}
},
"totalCount": 7,
"items": [
{
"metricsExpanded": {
"totalCount": 3,
"items": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
}
]
},
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"maintainer": {
"kind": "kind",
"maintainerMember": {
"firstName": "firstName",
"lastName": "lastName",
"role": "role",
"id": "id",
"email": "email"
},
"id": "id",
"maintainerTeam": {
"name": "name",
"id": "id",
"key": "key"
}
},
"metricsSummary": {
"count": 3
},
"createdAt": 6,
"projectKey": "projectKey",
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"generateSdkKeys": true,
"flagsSummary": {
"count": 5,
"linkedFlags": {
"totalCount": 2,
"items": [
{
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
},
{
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
}
]
}
},
"id": "id",
"aiConfigsSummary": {
"count": 2
},
"key": "key",
"updatedAt": 1,
"resourcesExpanded": {
"totalCount": 3,
"items": {
"flags": {
"totalCount": 6,
"items": [
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
},
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
}
]
},
"aiConfigs": {
"totalCount": 6,
"items": [
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
},
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
}
]
},
"metrics": {
"totalCount": 3,
"items": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
}
]
},
"segments": {
"totalCount": 5,
"items": [
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
},
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
}
]
}
}
},
"resourceSummary": {
"flagCount": 4,
"metricCount": 1,
"totalCount": 1,
"segmentCount": 7,
"aiConfigCount": 1
},
"version": 0,
"tags": [
"tags",
"tags"
],
"accountId": "accountId",
"deletedAt": 5,
"deleted": false,
"name": "name",
"segmentsSummary": {
"linkedSegments": {
"totalCount": 9,
"items": [
{
"environmentId": "environmentId",
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
},
{
"environmentId": "environmentId",
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
}
]
},
"count": 7
},
"aiConfigsExpanded": {
"totalCount": 6,
"items": [
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
},
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
}
]
},
"segmentsExpanded": {
"totalCount": 6,
"items": [
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
},
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
}
]
},
"_affectsSdkPayload": true,
"projectId": "projectId",
"flagsExpanded": {
"totalCount": 1,
"items": [
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
},
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
}
]
}
},
{
"metricsExpanded": {
"totalCount": 3,
"items": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
}
]
},
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"maintainer": {
"kind": "kind",
"maintainerMember": {
"firstName": "firstName",
"lastName": "lastName",
"role": "role",
"id": "id",
"email": "email"
},
"id": "id",
"maintainerTeam": {
"name": "name",
"id": "id",
"key": "key"
}
},
"metricsSummary": {
"count": 3
},
"createdAt": 6,
"projectKey": "projectKey",
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"generateSdkKeys": true,
"flagsSummary": {
"count": 5,
"linkedFlags": {
"totalCount": 2,
"items": [
{
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
},
{
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
}
]
}
},
"id": "id",
"aiConfigsSummary": {
"count": 2
},
"key": "key",
"updatedAt": 1,
"resourcesExpanded": {
"totalCount": 3,
"items": {
"flags": {
"totalCount": 6,
"items": [
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
},
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
}
]
},
"aiConfigs": {
"totalCount": 6,
"items": [
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
},
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
}
]
},
"metrics": {
"totalCount": 3,
"items": [
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
},
{
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"kind": "kind",
"description": "description",
"creationDate": 8,
"isActive": true,
"lastSeen": 6,
"eventKey": "eventKey",
"_versionId": "_versionId",
"isNumeric": true,
"name": "name",
"lastModified": 9,
"_id": "_id",
"category": "category",
"key": "key"
}
]
},
"segments": {
"totalCount": 5,
"items": [
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
},
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
}
]
}
}
},
"resourceSummary": {
"flagCount": 4,
"metricCount": 1,
"totalCount": 1,
"segmentCount": 7,
"aiConfigCount": 1
},
"version": 0,
"tags": [
"tags",
"tags"
],
"accountId": "accountId",
"deletedAt": 5,
"deleted": false,
"name": "name",
"segmentsSummary": {
"linkedSegments": {
"totalCount": 9,
"items": [
{
"environmentId": "environmentId",
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
},
{
"environmentId": "environmentId",
"name": "name",
"links": {
"self": {
"href": "href",
"type": "type"
}
},
"key": "key"
}
]
},
"count": 7
},
"aiConfigsExpanded": {
"totalCount": 6,
"items": [
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
},
{
"createdAt": 1,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"version": 6,
"key": "key",
"flagKey": "flagKey",
"tags": [
"tags",
"tags"
],
"updatedAt": 2
}
]
},
"segmentsExpanded": {
"totalCount": 6,
"items": [
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
},
{
"generation": 9,
"lastModifiedDate": 5,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"description": "description",
"creationDate": 4,
"version": 9,
"environmentKey": "environmentKey",
"tags": [
"tags",
"tags"
],
"environmentId": "environmentId",
"deleted": true,
"name": "name",
"unbounded": true,
"key": "key"
}
]
},
"_affectsSdkPayload": true,
"projectId": "projectId",
"flagsExpanded": {
"totalCount": 1,
"items": [
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
},
{
"archived": true,
"temporary": true,
"includeInSnippet": true,
"_links": {
"parent": {
"href": "href",
"type": "type"
},
"self": {
"href": "href",
"type": "type"
}
},
"name": "name",
"description": "description",
"creationDate": 6,
"_version": 7,
"key": "key",
"maintainer": {
"kind": "member",
"_member": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"_team": {
"_links": {
"key": {
"href": "href",
"type": "type"
}
},
"name": "QA Team",
"customRoleKeys": [
"access-to-test-projects"
],
"key": "team-key-123abc"
},
"key": "key"
},
"tags": [
"tags",
"tags"
]
}
]
}
}
]
}{
"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 Path Parameters
Available options:
flags, segments, aiConfigs Query Parameters
Environment ID. Required when resourceType is 'segments'
The number of views to return.
Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query limit.
Response
Successful response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
{
"next": { "href": "href", "type": "type" },
"last": { "href": "href", "type": "type" },
"prev": { "href": "href", "type": "type" },
"self": { "href": "href", "type": "type" },
"first": { "href": "href", "type": "type" }
}