---
title: Get Layers
description: Reference for the GET /console/v1/layers API endpoint.
product: general
token_estimate: 3101
---
# Get Layers

> For AI agents: a documentation index is available at [/llms.txt](/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

## Get Layers

**GET** `/console/v1/layers`

Full URL: `https://statsigapi.net/console/v1/layers`

Get Layers

## Authorizations

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| STATSIG-API-KEY | string | Yes | — | apiKey (header) |

## Query parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| limit (query) | integer | No | 10 | Results per page Constraints: string, number |
| page (query) | integer | No | 1 | Page number Constraints: string, number |

## Response (application/json)

**200** — Get Layers response

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| message | string | Yes | — | A simple string explaining the result of the operation. |
| data | object[] | Yes | — | — |
| data.id | string | Yes | — | ID |
| data.name | string | No | — | Optional name for the configuration. |
| data.idType | string | Yes | — | The ID type used for this layer, important for validation. |
| data.description | string | Yes | — | A detailed description of the layer, explaining its purpose and functionality. Constraints: max length: 1000 |
| data.lastModifierID | string | Yes | — | ID of the last modifier. Constraints: nullable |
| data.lastModifiedTime | number | Yes | — | Time of the last modification. Constraints: format: double, nullable |
| data.lastModifierEmail | string | Yes | — | Email of the last modifier. Constraints: nullable |
| data.lastModifierName | string | Yes | — | Name of the last modifier. Constraints: nullable |
| data.creatorID | string | Yes | — | ID of the user who created the entity. Constraints: nullable |
| data.createdTime | number | Yes | — | Timestamp when the entity was created. Constraints: format: double |
| data.creatorName | string | Yes | — | Name of the creator. Constraints: nullable |
| data.creatorEmail | string | Yes | — | Email of the creator. Constraints: nullable |
| data.tags | string[] | No | — | Optional tags for categorization. |
| data.targetApps | oneOf | No | — | List of target applications that this layer is intended for. Constraints: string, string[] |
| data.holdoutIDs | string[] | No | — | Holdouts applied to this configuration. |
| data.team | string | No | — | Optional name for the responsible team. Constraints: nullable |
| data.teamID | string | No | — | Optional ID of the responsible team. Constraints: nullable |
| data.version | number | No | — | Version number Constraints: format: double |
| data.isImplicitLayer | boolean | Yes | — | Indicates if the layer was automatically created by Statsig during experiment creation. |
| data.parameters | object[] | Yes | — | An array of parameters associated with the layer, each defining specific attributes. |
| data.parameters.name | string | Yes | — | The name of this parameter, used for identification within the layer. |
| data.parameters.type | string | Yes | — | The data type that this parameter returns. Allowed types include: string, boolean, number, object, and array. Allowed values: string, number, boolean, object, array |
| data.parameters.defaultValue | oneOf | Yes | — | The default value for this parameter, which must match the specified type. Constraints: string, number, boolean, object, oneOf[] |
| data.parameters.description | string | No | — | An optional helpful description of what this layer parameter does, providing context for its purpose. |
| data.parameters.schema | string | No | — | Optional JSON schema for object parameters. If provided, defaultValue must satisfy the schema. Constraints: nullable |
| data.targeting_gate_parameter_values | object[] | Yes | — | Parameter values returned when a targeting gate passes during ship-with-targeting. |
| data.targeting_gate_parameter_values.targetingGateName | string | Yes | — | The name of the targeting gate for these shipped values. |
| data.targeting_gate_parameter_values.parameters | object | Yes | — | Layer parameter values returned when the targeting gate passes. |
| data.holdout_parameter_values | object[] | Yes | — | Holdout-specific parameter values for this layer. |
| data.holdout_parameter_values.holdoutID | string | Yes | — | The ID of the holdout for these layer parameter values. |
| data.holdout_parameter_values.parameters | object | Yes | — | Layer parameter values returned when the holdout gate passes. |
| data.holdout_parameter_values.excludeNewParams | boolean | Yes | — | Whether newly added layer parameters should be excluded from this holdout edge. |
| data.permalink | string | Yes | — | A permalink to this layer in the Statsig Console. Constraints: format: uri |
| pagination | object | Yes | — | Pagination metadata for checking if there is next page for example. |
| pagination.itemsPerPage | number | Yes | — | Constraints: format: double |
| pagination.pageNumber | number | Yes | — | Constraints: format: double |
| pagination.nextPage | string | Yes | — | Constraints: nullable |
| pagination.previousPage | string | Yes | — | Constraints: nullable |
| pagination.totalItems | number | No | — | Constraints: format: double |
| pagination.all | string | No | — | — |

```json
{
  "message": "Layers listed successfully.",
  "data": [
    {
      "id": "statsig::product_logo_icon_shapes_multi_group_layer",
      "description": "",
      "idType": "userID",
      "lastModifierID": "5sgBiiuoBX4fscrWdCXVma",
      "lastModifiedTime": 1677893118949,
      "lastModifierName": "Test User",
      "lastModifierEmail": "test@statsig.com",
      "creatorID": "5sgBiiuoBX4fscrWdCXVma",
      "createdTime": 1677893118889,
      "creatorName": "Test User",
      "creatorEmail": "test@statsig.com",
      "targetApps": [],
      "holdoutIDs": [],
      "tags": [],
      "team": null,
      "isImplicitLayer": true,
      "parameters": [],
      "targeting_gate_parameter_values": [],
      "holdout_parameter_values": [],
      "permalink": "https://console.statsig.com/company_id/layers/statsig%3A%3Aproduct_logo_icon_shapes_multi_group_layer"
    },
    {
      "id": "Homepage Feed Improvements",
      "description": "test description",
      "idType": "userID",
      "lastModifierID": "5sgBiiuoBX4fscrWdCXVma",
      "lastModifiedTime": 1702925736079,
      "lastModifierName": "Test User",
      "lastModifierEmail": "test@statsig.com",
      "creatorID": "6Q78Ih2m3FnOoECDsvzoms",
      "createdTime": 1678122232525,
      "creatorName": "Test User",
      "creatorEmail": "test@statsig.com",
      "targetApps": [],
      "holdoutIDs": [
        "global_holdout",
        "test_target_gate"
      ],
      "tags": [],
      "team": null,
      "isImplicitLayer": false,
      "parameters": [
        {
          "name": "ranking_model",
          "type": "string",
          "defaultValue": "4v2"
        },
        {
          "name": "test",
          "type": "string",
          "defaultValue": "randomtextfdafs"
        },
        {
          "name": "newparam",
          "type": "string",
          "defaultValue": ""
        },
        {
          "name": "test!!!",
          "type": "string",
          "defaultValue": ""
        },
        {
          "name": "test_object",
          "type": "object",
          "defaultValue": {
            "test": "hello"
          }
        }
      ],
      "targeting_gate_parameter_values": [
        {
          "targetingGateName": "test_target_gate",
          "parameters": {
            "ranking_model": "5v1",
            "test": "randomtextfdafs",
            "newparam": "",
            "test!!!": "",
            "test_object": {
              "test": "hello"
            }
          }
        }
      ],
      "holdout_parameter_values": [
        {
          "holdoutID": "global_holdout",
          "parameters": {
            "ranking_model": "holdout_model",
            "test": "randomtextfdafs",
            "newparam": "",
            "test!!!": "",
            "test_object": {
              "test": "hello"
            }
          },
          "excludeNewParams": false
        }
      ],
      "permalink": "https://console.statsig.com/company_id/layers/Homepage%20Feed%20Improvements"
    },
    {
      "id": "statsig::mostly_test_experiment_layer",
      "description": "",
      "idType": "userID",
      "lastModifierID": "6Q78Ih2m3FnOoECDsvzoms",
      "lastModifiedTime": 1678401652668,
      "lastModifierName": "Test User",
      "lastModifierEmail": "test@statsig.com",
      "creatorID": "6Q78Ih2m3FnOoECDsvzoms",
      "createdTime": 1678401652627,
      "creatorName": "Test User",
      "creatorEmail": "test@statsig.com",
      "targetApps": [],
      "holdoutIDs": [],
      "tags": [],
      "team": null,
      "isImplicitLayer": true,
      "parameters": [],
      "targeting_gate_parameter_values": [],
      "holdout_parameter_values": [],
      "permalink": "https://console.statsig.com/company_id/layers/statsig%3A%3Amostly_test_experiment_layer"
    }
  ],
  "pagination": {
    "itemsPerPage": 3,
    "pageNumber": 1,
    "totalItems": 1189,
    "nextPage": "/console/v1/layers?page=2&limit=3",
    "previousPage": null,
    "all": "/console/v1/layers"
  }
}
```

**400** — Invalid request. Please check the request input and try again.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 400 |
| message | string | Yes | — | — |

```json
{
  "status": 400,
  "message": "Invalid request. Please check the request input and try again."
}
```

**401** — This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 401 |
| message | string | Yes | — | — |

```json
{
  "status": 401,
  "message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}
```

## Code samples

### cURL

```bash
curl -X GET "https://statsigapi.net/console/v1/layers?limit=10&page=1" \
  -H "Content-Type: application/json" \
  -H "STATSIG-API-KEY: YOUR_API_KEY"
```

### Python

```python
import requests

response = requests.get(
    "https://statsigapi.net/console/v1/layers?limit=10&page=1",
    headers={
        "Content-Type": "application/json",
        "STATSIG-API-KEY": "YOUR_API_KEY"
    }
)
data = response.json()
```

### JavaScript

```javascript
const response = await fetch("https://statsigapi.net/console/v1/layers?limit=10&page=1", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "STATSIG-API-KEY": "YOUR_API_KEY"
  }
});
const data = await response.json();
```

### PHP

```php
<?php
$ch = curl_init("https://statsigapi.net/console/v1/layers?limit=10&page=1");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "STATSIG-API-KEY: YOUR_API_KEY"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
```

### Go

```go
package main

import (
  "bytes"
  "net/http"
)

func main() {
req, _ := http.NewRequest("GET", "https://statsigapi.net/console/v1/layers?limit=10&page=1", nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("STATSIG-API-KEY", "YOUR_API_KEY")
  client := &http.Client{}
  resp, _ := client.Do(req)
  defer resp.Body.Close()
}
```

### Java

```java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://statsigapi.net/console/v1/layers?limit=10&page=1"))
      .method("GET", HttpRequest.BodyPublishers.noBody())
.header("Content-Type", "application/json")
      .header("STATSIG-API-KEY", "YOUR_API_KEY")
      .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
```

### Ruby

```ruby
require "net/http"
require "json"

uri = URI("https://statsigapi.net/console/v1/layers?limit=10&page=1")
request = Net::HTTP::Get.new(uri)
request["Content-Type"] = "application/json"
request["STATSIG-API-KEY"] = "YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end
```

