API Reference

A short guide to working with Elements in the Layer API

Introduction

Layer Elements are fundamental components within the Layer API, enabling developers to fetch specific elements and their details for different projects. This guide will provide an overview of the available endpoints and demonstrate how to use them effectively.

Authentication

All endpoints described in this guide require bearer authentication. Ensure you include a valid bearer token in the Authorization header of your requests. Take a look at our Authentication guide for more details.

Endpoints Overview

Example Element Object

{
      "autoIncrementId": 1,
      "category": {
        "id": "cat12345",
        "name": "Sample Category"
      },
      "completed": true,
      "createdAt": "2023-08-23T12:00:00Z",
      "createdBy": "John Doe",
      "fields": {
        "sampleField": {
          "name": "Field Name",
          "type": "FieldType",
          "value": "FieldValue"
        }
      },
      "id": "elem12345",
      "modelRevitId": "model12345",
      "name": "Sample Element",
      "params": {
        "sampleParam": {
          "dataType": "Parameter DataType",
          "name": "Parameter Name",
          "parameterGroup": "Revit Parameter Group",
          "revitId": "revit12345",
          "scalar": 1.23,
          "unit": "Parameter Unit",
          "value": "Parameter Value"
        }
      },
      "spatialRelationships": [
        {
          "id": "spatial12345",
          "name": "Spatial Element",
          "categoryId": "cat12345",
          "phaseName": "Phase 1"
        }
      ],
      "starred": true,
      "status": "active",
      "updatedAt": "2023-08-23T13:00:00Z",
      "updatedBy": "Jane Smith"
    }

Element Parameters

Parameter NameDescriptionExample Value
idThe unique id of the elementString elem12345
autoIncrementIdAuto-generated unique element numberNumber 1
categoryThe category the element is inObject {name: "Issues", id: "30rg93j4tb4et"}
completedWhether or not the element has been marked as completedBoolean true
starredWhether or not the element has been marked as starredBoolean true
createdAtDate the category was createdString 2023-08-23T12:00:00Z
createdByName of the user who created the elementString John Doe
updatedAtDate & time the element was last updatedTimestamp 2023-08-23T13:00:00Z
updatedByName of the user who last updated the elementString Jane Smith
modelRevitIdID of the model where this element is locatedString model12345
nameName of the elementString Sample Element
statusElement statusString active
fieldsFields with values on the elementObject {...}
paramsRevit parameters with values on the elementObject {...}
spatialRelationshipsList of elements that are spatially related to the element. This can beList [...]