system.mes.equipment.getEquipment
Description
Retrieves an Equipment record by its ID or path.
Permissions
This method requires the EQUIPMENT.READ.GET permission.
Syntax
system.mes.equipment.getEquipment(idOrPath)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
idOrPath | String | False | The ID or path of the equipment to retrieve. |
Returns
Returns a JSON representation of the equipment. Returns nothing if no equipment is found.
| Name | Type | Description |
|---|---|---|
name | String | The name of the equipment. |
description | String | A description of the equipment. |
equipmentClassId | String (ULID) | The ULID of the equipment class this equipment belongs to. |
locationId | String (ULID) | The ULID of the location where this equipment is stationed. |
path | String | The path of the equipment. |
id | String (ULID) | The ULID of the equipment. |
notes | String | Notes related to the equipment. |
enabled | Boolean | Indicates if the equipment is active. |
spare1 | String | Additional field for user-defined context. |
spare2 | String | Additional field for user-defined context. |
spare3 | String | Additional field for user-defined context. |
Code Examples
equipment = system.mes.equipment.getEquipment('Pumps/CentrifugalPumps/Pump-101')
print(equipment)