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 Name | Description | Example Value |
---|---|---|
id | The unique id of the element | String elem12345 |
autoIncrementId | Auto-generated unique element number | Number 1 |
category | The category the element is in | Object {name: "Issues", id: "30rg93j4tb4et"} |
completed | Whether or not the element has been marked as completed | Boolean true |
starred | Whether or not the element has been marked as starred | Boolean true |
createdAt | Date the category was created | String 2023-08-23T12:00:00Z |
createdBy | Name of the user who created the element | String John Doe |
updatedAt | Date & time the element was last updated | Timestamp 2023-08-23T13:00:00Z |
updatedBy | Name of the user who last updated the element | String Jane Smith |
modelRevitId | ID of the model where this element is located | String model12345 |
name | Name of the element | String Sample Element |
status | Element status | String active |
fields | Fields with values on the element | Object {...} |
params | Revit parameters with values on the element | Object {...} |
spatialRelationships | List of elements that are spatially related to the element. This can be | List [...] |