Views (beta)

Get view

GET
/api/v2/projects/{projectKey}/views/{viewKey}

Retrieve a specific view by its key.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string
viewKey*string

Query Parameters

sort?string

A sort to apply to the list of views.

Value in

  • "key"
  • "name"
  • "updatedAt"
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.

filter?string

A filter to apply to the list of views. Supports the following fields and operators: name (equals, notEquals, startsWith, contains, anyOf), key (equals, notEquals, startsWith, contains, anyOf), tag (equals, anyOf), maintainerId (equals, anyOf), isPayloadView (equals).

expand?array<>

A comma-separated list of fields to expand.

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/views/my-view" \  -H "LD-API-Version: beta"
{  "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"        ]      }    ]  }}