For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
      • POSTCreate layer
      • GETGet layers
      • PATCHUpdate layer
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewLayers

Get layers

GET
/api/v2/projects/:projectKey/layers
GET
/api/v2/projects/:projectKey/layers
$curl https://app.launchdarkly.com/api/v2/projects/projectKey/layers \
> -H "Authorization: <apiKey>"
1{
2 "items": [
3 {
4 "key": "checkout-flow",
5 "name": "Checkout Flow",
6 "description": "The checkout flow for the application",
7 "createdAt": 1,
8 "randomizationUnit": "user",
9 "environments": {}
10 }
11 ],
12 "totalCount": 1,
13 "_links": {
14 "self": {
15 "href": "/api/v2/projects/my-project/layers",
16 "type": "application/json"
17 }
18 }
19}
Get a collection of all layers for a project
Was this page helpful?
Previous

Update layer

Next
Built with

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequiredformat: "string"
The project key

Query parameters

filterstringOptionalformat: "string"

A comma-separated list of filters. This endpoint only accepts filtering by experimentKey. The filter returns layers which include that experiment for the selected environment(s). For example: filter=reservations.experimentKey contains expKey.

Response

Layer Collection response
itemslist of objects
The layers in the project
totalCountinteger
The total number of layers in the project
_linksmap from strings to objects
The location and content type of related resources

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error