---
updatedAt: 2026-06-12T20:00:32.000Z
agentTools:
  projectIndex: https://layer-api.readme.io/llms.txt
---

# Get Elements

Get all elements in a project. Optionally, a categoryId or viewId can be provided to return elements inside a particular category or view.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "termsOfService": "https://layer.team/terms-of-service",
    "title": "Layer API",
    "version": "0.3.0",
    "x-logo": {
      "altText": "Layer logo",
      "url": "https://layer.team/wp-content/themes/lessis/images/assets/layer-logo-footer.png"
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "JWT",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "paths": {
    "/projects/{projectId}/elements": {
      "get": {
        "operationId": "getElements",
        "summary": "Get Elements",
        "tags": [
          "Elements"
        ],
        "description": "Get all elements in a project. Optionally, a categoryId or viewId can be provided to return elements inside a particular category or view.",
        "parameters": [
          {
            "schema": {
              "default": false,
              "type": "boolean"
            },
            "in": "query",
            "name": "allFields",
            "required": false,
            "description": "Ignored. Category and project element queries already return every field, and when a viewId is provided only that view’s fields are returned regardless of this flag. Retained for backward compatibility."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "categoryId",
            "required": false,
            "description": "Include only elements in a specific category"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "continueFrom",
            "required": false,
            "description": "Opaque pagination cursor returned as nextContinueFrom in a previous response. Pass this value to retrieve the next page of elements. Only valid when limit is also provided."
          },
          {
            "schema": {
              "default": "full",
              "enum": [
                "full",
                "simple"
              ],
              "type": "string"
            },
            "in": "query",
            "name": "format",
            "required": false,
            "description": "Return full element field value objects (default) or the display-oriented simple format. Prefer full when a caller may need field IDs or structured payloads such as related IDs, select option metadata, quantities, file details, or formula detail."
          },
          {
            "schema": {
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Maximum number of elements to return per page (1–1000). Recommended default: 100. When the response includes nextContinueFrom, pass it as continueFrom in the next call to retrieve the next page."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "viewId",
            "required": false,
            "description": "Include only elements in a specific view"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "projectId",
            "required": true,
            "description": "Project ID"
          },
          {
            "schema": {
              "enum": [
                "buffered",
                "streaming"
              ],
              "type": "string"
            },
            "in": "header",
            "name": "x-layer-response-mode",
            "required": false,
            "description": "Optional response mode override for large payloads. Allowed values are `buffered` and `streaming`. When omitted, endpoints may choose buffered by default and fall back to streaming for oversized payloads."
          }
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of Layer Elements in a Category",
            "headers": {
              "x-layer-response-mode": {
                "schema": {
                  "enum": [
                    "buffered",
                    "streaming"
                  ],
                  "type": "string"
                },
                "description": "Actual response mode used for this request (`buffered` or `streaming`)."
              },
              "x-layer-response-streaming": {
                "schema": {
                  "type": "string"
                },
                "description": "Boolean-style indicator (`true` or `false`) that signals whether the response body was streamed."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "description": "List of Layer Elements in a Category",
                  "type": "object",
                  "required": [
                    "elements",
                    "total"
                  ],
                  "properties": {
                    "category": {
                      "description": "Summary information about the category associated with these elements (if a categoryId is provided)",
                      "type": "object",
                      "required": [
                        "name"
                      ],
                      "properties": {
                        "name": {
                          "description": "Name of the category",
                          "type": "string"
                        }
                      }
                    },
                    "elements": {
                      "description": "List of Layer Elements in a Category",
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "category",
                          "completed",
                          "createdAt",
                          "createdBy",
                          "id",
                          "name",
                          "starred",
                          "status",
                          "updatedAt",
                          "updatedBy"
                        ],
                        "properties": {
                          "autoIncrementId": {
                            "description": "Auto-generated element number",
                            "minimum": 0,
                            "type": "number"
                          },
                          "category": {
                            "type": "object",
                            "required": [
                              "id",
                              "name"
                            ],
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "description": "Name of the element's category",
                                "type": "string"
                              }
                            }
                          },
                          "completed": {
                            "type": "boolean"
                          },
                          "createdAt": {
                            "description": "Date the category was created",
                            "format": "date-time",
                            "type": "string"
                          },
                          "createdBy": {
                            "description": "Name of the user who created the element",
                            "type": "string"
                          },
                          "fields": {
                            "anyOf": [
                              {
                                "description": "Element field values. This property will only be present when retrieving elements for a specific category or category view.",
                                "type": "object",
                                "additionalProperties": {
                                  "description": "Field information (type, value, etc.) and element field value",
                                  "type": "object",
                                  "required": [
                                    "name",
                                    "type",
                                    "value"
                                  ],
                                  "properties": {
                                    "name": {
                                      "description": "Field name",
                                      "type": "string"
                                    },
                                    "related": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "required": [
                                          "id",
                                          "name"
                                        ],
                                        "properties": {
                                          "id": {
                                            "description": "Element ID",
                                            "type": "string"
                                          },
                                          "name": {
                                            "description": "Element name",
                                            "type": "string"
                                          },
                                          "quantity": {
                                            "description": "Quantity assigned to the related element (defaults to 1 when omitted)",
                                            "minimum": 1,
                                            "type": "number"
                                          }
                                        }
                                      }
                                    },
                                    "select": {
                                      "description": "Selected option metadata for select fields. The IDs here match the option IDs stored in value, so clients can resolve labels and numeric option values without fetching the field again.",
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "required": [
                                          "id",
                                          "label",
                                          "value"
                                        ],
                                        "properties": {
                                          "id": {
                                            "description": "Select Option ID",
                                            "type": "string"
                                          },
                                          "label": {
                                            "description": "Select Option name",
                                            "type": "string"
                                          },
                                          "value": {
                                            "description": "Select Option value"
                                          }
                                        }
                                      }
                                    },
                                    "type": {
                                      "description": "Field type",
                                      "type": "string"
                                    },
                                    "value": {
                                      "description": "Field value data. Select fields return an array of selected option IDs and expose the matching option metadata in the sibling select array. Formula V2 fields return a structured payload containing raw, formatted, and string representations.",
                                      "anyOf": [
                                        {
                                          "description": "Field value"
                                        },
                                        {
                                          "type": "object",
                                          "required": [
                                            "formattedValue",
                                            "rawValue",
                                            "stringValue"
                                          ],
                                          "properties": {
                                            "formattedValue": {
                                              "description": "Structured representation of the formula formatted value"
                                            },
                                            "rawValue": {
                                              "description": "Raw output of the formula evaluation"
                                            },
                                            "stringValue": {
                                              "description": "Stringified version of the formatted value, suitable for simple displays",
                                              "type": "string"
                                            }
                                          }
                                        }
                                      ]
                                    }
                                  }
                                }
                              },
                              {
                                "description": "When requesting the 'simple' format, element field values are collapsed into display-oriented key/value pairs keyed by formatted field name. Use the default 'full' format when you need field IDs or structured field payloads such as related element IDs, select option metadata, quantities, or formula detail.",
                                "type": "object",
                                "additionalProperties": {
                                  "description": "Field value"
                                }
                              }
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "modelRevitId": {
                            "description": "ID of the model where this element is located. This also indicates that this element originated in a model and not in Layer.",
                            "type": "string"
                          },
                          "name": {
                            "description": "Name of the element",
                            "type": "string"
                          },
                          "params": {
                            "type": "object",
                            "additionalProperties": {
                              "type": "object",
                              "required": [
                                "name",
                                "revitId",
                                "value"
                              ],
                              "properties": {
                                "dataType": {
                                  "description": "Parameter data type",
                                  "type": "string"
                                },
                                "name": {
                                  "description": "Parameter name",
                                  "type": "string"
                                },
                                "parameterGroup": {
                                  "description": "Revit Parameter group",
                                  "type": "string"
                                },
                                "revitId": {
                                  "description": "Revit parameter ID",
                                  "type": "string"
                                },
                                "scalar": {
                                  "description": "Parameter scalar value (if numerical)",
                                  "type": "number"
                                },
                                "unit": {
                                  "description": "Parameter unit",
                                  "type": "string"
                                },
                                "value": {
                                  "description": "Parameter value",
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "spatialRelationships": {
                            "description": "Elements associated with this element via a model spatial relationship",
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "categoryId",
                                "id",
                                "name",
                                "phaseName"
                              ],
                              "properties": {
                                "categoryId": {
                                  "type": "string"
                                },
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "phaseName": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "starred": {
                            "type": "boolean"
                          },
                          "status": {
                            "description": "Element status",
                            "enum": [
                              "active",
                              "archived"
                            ],
                            "type": "string"
                          },
                          "updatedAt": {
                            "description": "Date & time the element was last updated",
                            "format": "date-time",
                            "type": "string"
                          },
                          "updatedBy": {
                            "description": "Name of the user who last updated the element",
                            "type": "string"
                          }
                        }
                      }
                    },
                    "nextContinueFrom": {
                      "description": "Pagination cursor for the next page of results. Present only when a limit was requested and additional elements remain. Pass this value as continueFrom in the next request to retrieve the next page.",
                      "type": "string"
                    },
                    "total": {
                      "description": "Total number of elements matching the query across all pages.",
                      "type": "number"
                    },
                    "view": {
                      "description": "Summary information about the view associated with these elements (if a viewId is provided)",
                      "type": "object",
                      "required": [
                        "name",
                        "type"
                      ],
                      "properties": {
                        "name": {
                          "description": "Name of the category view",
                          "type": "string"
                        },
                        "type": {
                          "description": "View type",
                          "enum": [
                            "DOCUMENT",
                            "DRAWING",
                            "FORM",
                            "GALLERY",
                            "MODEL",
                            "TABLE"
                          ],
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Response payload exceeded the configured size limit for this API.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Response payload exceeded the configured size limit for this API.",
                  "properties": {
                    "code": {
                      "description": "Stable machine-readable error code.",
                      "type": "string"
                    },
                    "error": {
                      "description": "Human-readable error message.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "error"
                  ],
                  "type": "object"
                }
              }
            }
          },
          "4XX": {
            "description": "Default error response.",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Default error response.",
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "description": "Human-readable error message.",
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.layer.team"
    }
  ],
  "x-readme": {
    "samples-languages": [
      "curl"
    ]
  }
}
```