Views (beta)
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.
Authorization
ApiKey read, writeAuthorization<token>
In: header
Scope: read, write
Path Parameters
projectKey*string
resourceType*string
Value in
- "flags"
- "segments"
- "aiConfigs"
resourceKey*string
Query Parameters
environmentId?string
Environment ID. Required when resourceType is 'segments'
limit?integer
The number of views to return.
offset?integer
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.
Header Parameters
LD-API-Version*"beta"
Version of the endpoint.
Value in
- "beta"
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v2/projects/default/view-associations/flags/my-flag?environmentId=6890ff25c3e3830ba1a352e4" \ -H "LD-API-Version: beta"{ "_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" ] } ] } } ]}