### Time Interval Query Example Source: https://github.com/realestatecore/rec/blob/main/API/REST/RealEstateCore_REST_specification.md Demonstrates how to query time series data using 'starting' and 'ending' for inclusive intervals, and 'before' and 'after' for exclusive intervals. Time values are serialized in ISO 8601 format. ```http ?hasObservationTime[starting]=2019-02-14 ``` -------------------------------- ### REST API: Manage Buildings (Bash) Source: https://context7.com/realestatecore/rec/llms.txt Provides examples for performing CRUD operations on building entities using the RealEstateCore REST API. It demonstrates fetching buildings with pagination and creating new building entries. Responses are in JSON-LD format. ```bash # Get all buildings with pagination curl -X GET "https://api.example.com/buildings?page=0&size=20" \ -H "Accept: application/ld+json" \ -H "Authorization: Bearer " # Response: { "@context": "https://dev.realestatecore.io/contexts/Building.jsonld", "@type": "hydra:Collection", "hydra:totalItems": 42, "hydra:view": { "@id": "/buildings?page=0&size=20", "@type": "hydra:PartialCollectionView", "hydra:first": "/buildings?page=0&size=20", "hydra:next": "/buildings?page=1&size=20", "hydra:last": "/buildings?page=2&size=20" }, "hydra:member": [ { "@id": "https://example.com/building/hq-001", "@type": "dtmi:org:w3id:rec:Building;1", "name": "Headquarters Building", "area": {"grossArea": 15000, "netArea": 12500}, "ownedBy": [{"@id": "https://example.com/agent/acme-corp"}], "hasPart": [ {"@id": "https://example.com/level/hq-001-floor-1"}, {"@id": "https://example.com/level/hq-001-floor-2"} ] } ] } # Create a new building curl -X POST "https://api.example.com/buildings" \ -H "Content-Type: application/ld+json" \ -H "Authorization: Bearer " \ -d '{ "@context": "https://dev.realestatecore.io/contexts/Building.jsonld", "@type": "dtmi:org:w3id:rec:Building;1", "name": "North Campus Lab", "address": [{"@id": "https://example.com/address/north-campus"}], "ownedBy": [{"@id": "https://example.com/agent/research-dept"}], "identifiers": "NC-LAB-001" }' # Response (201 Created): { "@context": "https://dev.realestatecore.io/contexts/Building.jsonld", "@id": "https://example.com/building/nc-lab-001", "@type": "dtmi:org:w3id:rec:Building;1", "name": "North Campus Lab" } ``` -------------------------------- ### REST API: Manage Sensor Points and Observations (Bash) Source: https://context7.com/realestatecore/rec/llms.txt Demonstrates how to interact with sensor points and observation events via the RealEstateCore REST API. Includes examples for filtering sensors, creating new sensor points, and retrieving observation data with time-based filtering. ```bash # Get all temperature sensors with filtering curl -X GET "https://api.example.com/sensors?hasQuantity[contains]=Temperature&page=0&size=50" \ -H "Accept: application/ld+json" # Get sensors associated with a specific asset curl -X GET "https://api.example.com/sensors?isPointOf[eq]=https://example.com/asset/ahu-001" \ -H "Accept: application/ld+json" # Create a new sensor point curl -X POST "https://api.example.com/sensors" \ -H "Content-Type: application/ld+json" \ -d '{ "@context": "https://dev.realestatecore.io/contexts/Sensor.jsonld", "@type": "dtmi:org:brickschema:schema:Brick:Temperature_Sensor;1", "name": "Zone Temperature Sensor", "hasQuantity": "Temperature", "hasSubstance": "Air", "isPointOf": {"@id": "https://example.com/room/conf-101"} }' # Get observation events with time filtering (ISO 8601) curl -X GET "https://api.example.com/observations?timestamp[starting]=2024-01-01T00:00:00Z×tamp[ending]=2024-01-31T23:59:59Z&page=0&size=100" \ -H "Accept: application/ld+json" # Response: { "@type": "hydra:Collection", "hydra:member": [ { "@id": "https://example.com/observation/obs-12345", "@type": "dtmi:org:w3id:rec:ObservationEvent;1", "timestamp": "2024-01-15T14:30:00Z", "start": "2024-01-15T14:30:00Z", "end": "2024-01-15T14:30:00Z" } ] } ``` -------------------------------- ### Create HVAC Equipment Asset using cURL Source: https://context7.com/realestatecore/rec/llms.txt This snippet demonstrates how to create a new HVAC equipment asset using a cURL command. It specifies the asset type, name, serial number, model number, installation date, and relationships to other entities like location, manufacturer, and associated sensors. The request uses the application/ld+json content type. ```shell curl -X POST "https://api.example.com/assets" \ -H "Content-Type: application/ld+json" \ -d '{ "@context": "https://dev.realestatecore.io/contexts/Asset.jsonld", "@type": "dtmi:org:brickschema:schema:Brick:AHU;1", "name": "Air Handling Unit 001", "serialNumber": "AHU-2024-001", "modelNumber": "HVAC-PRO-5000", "installationDate": "2024-01-15", "locatedIn": [{"@id": "https://example.com/room/mechanical-001"}], "manufacturedBy": [{"@id": "https://example.com/agent/hvac-manufacturer"}], "hasPoint": [ {"@id": "https://example.com/sensor/ahu-001-supply-temp"}, {"@id": "https://example.com/sensor/ahu-001-return-temp"} ] }' ``` -------------------------------- ### Create Building Hierarchy in RealEstateCore (JSON-LD) Source: https://context7.com/realestatecore/rec/llms.txt This snippet demonstrates the creation of a hierarchical building structure in RealEstateCore using JSON-LD. It includes examples for creating a Site, a Building linked to the Site, a Level within the Building, and a Room within the Level, also showing how to associate assets and sensors with the Room. This follows the `hasPart`/`isPartOf` and `isLocationOf`/`hasPoint` relationships. ```json // Create building hierarchy: Site -> Building -> Level -> Room // 1. Create Site { "@context": "https://dev.realestatecore.io/contexts/Site.jsonld", "@type": "dtmi:org:w3id:rec:Site;1", "@id": "https://example.com/site/campus-north", "name": "North Campus", "georeference": {"@id": "https://example.com/geo/campus-north"} } // 2. Create Building with Site reference { "@context": "https://dev.realestatecore.io/contexts/Building.jsonld", "@type": "dtmi:org:w3id:rec:Building;1", "@id": "https://example.com/building/eng-001", "name": "Engineering Building", "isPartOf": {"@id": "https://example.com/site/campus-north"}, "area": {"grossArea": 5000, "netArea": 4200} } // 3. Create Level { "@context": "https://dev.realestatecore.io/contexts/Level.jsonld", "@type": "dtmi:org:w3id:rec:Level;1", "@id": "https://example.com/level/eng-001-floor-1", "name": "First Floor", "isPartOf": {"@id": "https://example.com/building/eng-001"} } // 4. Create Room with asset locations { "@context": "https://dev.realestatecore.io/contexts/Room.jsonld", "@type": "dtmi:org:w3id:rec:Room;1", "@id": "https://example.com/room/eng-101", "name": "Conference Room 101", "isPartOf": {"@id": "https://example.com/level/eng-001-floor-1"}, "capacity": {"maxOccupancy": 20}, "isLocationOf": [ {"@id": "https://example.com/asset/hvac-terminal-101"}, {"@id": "https://example.com/asset/lighting-controller-101"} ], "hasPoint": [ {"@id": "https://example.com/sensor/temp-101"}, {"@id": "https://example.com/sensor/occupancy-101"} ] } ``` -------------------------------- ### Time Interval Queries Source: https://github.com/realestatecore/rec/blob/main/API/REST/RealEstateCore_REST_specification.md This section details how to query time series data using 'starting', 'ending', 'before', and 'after' operators for inclusive and exclusive time ranges. Time values should be in ISO 8601 format. ```APIDOC ## Time Interval Queries ### Description Queries on time intervals (time series data, series of data points) require clarification on whether endpoints are inclusive or exclusive. This section defines the operators for specifying time ranges. ### Principle API implementations should use `starting` and `ending` operators for inclusive time ranges, and `before` and `after` for exclusive time ranges. The `latest` operator can also be used with a value of `true`. This applies to all Time data properties (e.g., `hasObservationTime`). ### Example `?hasObservationTime[starting]=2019-02-14` ### Time Serialization Time values are serialized according to ISO 8601. ### Absence of Time Interval Operators Implementations must decide the implication of absent time interval operators (e.g., if only an `end` time is provided without `starting` or `after`). This is an implementation detail and not specified by the REC Consortium. ``` -------------------------------- ### MultiPolygon Coordinates Example (GeoJSON) Source: https://github.com/realestatecore/rec/blob/main/Doc/Information/Geometry/MultiPolygon.md Illustrates the structure of GeoJSON coordinates for a MultiPolygon, which can represent multiple distinct polygonal areas. This format is crucial for defining complex geographical shapes. ```json { "type": "MultiPolygon", "coordinates": [ [[[30.0, 20.0], [45.0, 40.0], [10.0, 40.0], [30.0, 20.0]]], [[[15.0, 5.0], [40.0, 10.0], [10.0, 20.0], [5.0, 10.0], [15.0, 5.0]]] ] } ``` -------------------------------- ### Simple Queries and Constraints Source: https://github.com/realestatecore/rec/blob/main/API/REST/RealEstateCore_REST_specification.md Specifies how to perform simple queries and apply constraints on values using query parameters, inspired by JSON:API operators. ```APIDOC ## Simple Queries and Constraints ### Description This principle details the mechanisms for performing queries on REC object and data properties, including support for value constraints using an operator-based query format. ### Simple Property Queries - All REC object and data properties should be searchable with traditional query parameters in the format `?property=value`. ### Operator-Based Queries - Querying with constraints on the value should be implemented with a JSON:API inspired operator-based query with the format `property[operator]=value`. - Supported operators may include `eq` (equal), `gt` (greater than), `gte` (greater than or equal), `lt`, `lte` for numbers, and `contains` and `regex` for substring queries. This format and the list of operators may be specified further in the future. ``` -------------------------------- ### Pagination with Hydra PartialCollectionView Source: https://github.com/realestatecore/rec/blob/main/API/REST/RealEstateCore_REST_specification.md Illustrates pagination using Hydra's PartialCollectionView, employing 'page' (0-indexed) and 'size' query parameters for consistent API behavior. ```http ?page=3&size=10 ``` ```http ?page=0&size=10 ``` -------------------------------- ### Advanced Queries Source: https://github.com/realestatecore/rec/blob/main/API/REST/RealEstateCore_REST_specification.md While not currently required, implementations are encouraged to support and share advanced query formats, such as path queries (e.g., 'all sensors on a building'). ```APIDOC ## Advanced Queries ### Description This section addresses advanced query capabilities beyond basic filtering and sorting, such as querying relationships within the data graph. ### Principle For now, advanced queries are not required. However, implementations are encouraged to include path queries (and other complex queries) and share them with the REC community. ### Future Specification The REC Consortium expects to specify advanced query formats in the future. ``` -------------------------------- ### Pagination Source: https://github.com/realestatecore/rec/blob/main/API/REST/RealEstateCore_REST_specification.md The API follows the Hydra PartialCollectionView specification for pagination. Consistent pagination is achieved using 'page' (0-indexed) and 'size' query parameters. ```APIDOC ## Pagination ### Description Pagination for API responses adheres to the Hydra PartialCollectionView specification, ensuring consistent handling of large datasets. ### Principle Pagination follows Hydra PartialCollectionView. Refer to the [Hydra Core Vocabulary](https://www.hydra-cg.com/spec/latest/core/) for detailed information and [example](https://www.hydra-cg.com/spec/latest/core/#example-16-a-hydra-partialcollectionview-splits-a-collection-into-multiple-views). ### Parameters Implementations must use the pagination parameters `page` (0-indexed) and `size`. ### Example `?page=3&size=10` `?page=0&size=10` (for the first page) ``` -------------------------------- ### RealEstateCore API Endpoints Source: https://github.com/realestatecore/rec/blob/main/API/REST/RealEstateCore_REST_specification.md This section details the required HTTP verbs and resource path conventions for interacting with RealEstateCore resources. ```APIDOC ## HTTP Verbs and Resource Paths ### Description Defines the standard HTTP methods for CRUD operations and the structure for resource paths in the RealEstateCore API. ### Method POST, GET, DELETE, PUT, PATCH ### Endpoint Structure - Collections: `/realestate` (for the 'RealEstate' class, and similarly for other REC classes like `/actuationinterface`, `/actuator`, etc.) - Individuals: `/realestate/` (where `` is the unique identifier of the resource) ### Supported REC Classes (Minimum) - `ActuationInterface` - `Actuator` - `BuildingComponent` - `Device` - `RealEstate` - `RealEstateComponent` - `Sensor` - `Storey` ### Request Body (for POST/PUT/PATCH) - Structure depends on the specific REC class being created or modified. ### Response #### Success Response (200) - For collections: `hydra:Collection` format. - For individual resources: Plain JSON-LD object. #### Response Example (Collection) ```json { "@context": "http://www.w3.org/ns/hydra/context.jsonld", "@type": "hydra:Collection", "members": [ { "@id": "/realestate/1", ... }, { "@id": "/realestate/2", ... } ], "totalItems": 2 } ``` #### Response Example (Individual) ```json { "@context": "http://www.w3.org/ns/hydra/context.jsonld", "@id": "/realestate/1", "@type": "RealEstate", "name": "Example Property" } ``` ``` -------------------------------- ### RealEstateCore Query Parameters Source: https://github.com/realestatecore/rec/blob/main/API/REST/RealEstateCore_REST_specification.md Details the supported query parameter formats for filtering and querying RealEstateCore resources, including simple, operator-based, and time interval queries. ```APIDOC ## Query Parameters ### Description Defines the supported query parameter formats for filtering and querying RealEstateCore resources. ### Query Parameter Formats 1. **Simple Queries (SHOULD)** - Format: `?=` - Example: `/realestate?name=ExampleProperty` 2. **Operator Queries (SHOULD)** - Format: `?[]=` - Supported Operators: `eq` (equals), `regex` (regular expression match), `contains` (substring match). - Example (equals): `/realestate?name[eq]=ExampleProperty` - Example (regex): `/realestate?name[regex]=^Example` - Example (contains): `/realestate?name[contains]=Property` 3. **Time Interval Queries (SHOULD)** - Format: `?[]=` - Supported Operators: `starting`, `ending`, `before`, `after`, `latest`. - Value Format: Valid JSON datetime serialization (ISO 8601) for `starting`, `ending`, `before`, `after`. Use `true` for `latest`. - Example (starting): `/realestate?validFrom[starting]=2023-01-01T00:00:00Z` - Example (latest): `/realestate?lastUpdate[latest]=true` ### Time Value Serialization - All time values MUST be serialized according to ISO 8601. ### Pagination (SHOULD) - Support for `hydra:PartialCollectionView` within `hydra:Collection` responses is recommended. ``` -------------------------------- ### REST API: Manage Assets (Bash) Source: https://context7.com/realestatecore/rec/llms.txt Shows how to retrieve assets within a specific building using the RealEstateCore REST API. This operation is useful for inventory management and understanding the equipment present in a building. ```bash # Get all assets in a building curl -X GET "https://api.example.com/assets?locatedIn[eq]=https://example.com/building/hq-001" \ -H "Accept: application/ld+json" ``` -------------------------------- ### Sort Assets by Properties using REST API Source: https://context7.com/realestatecore/rec/llms.txt Demonstrates how to sort assets by specified properties in ascending or descending order using the RealEstateCore REST API. ```bash # Sorting curl "https://api.example.com/assets?sort[asc]=name" # Ascending sort curl "https://api.example.com/assets?sort[desc]=installationDate" # Descending sort ``` -------------------------------- ### POST /assets - Create an HVAC equipment asset Source: https://context7.com/realestatecore/rec/llms.txt Creates a new asset in the system, specifically for HVAC equipment like AHUs. It allows detailed specification of the asset's properties, location, and associated points. ```APIDOC ## POST /assets - Create an HVAC equipment asset ### Description Creates a new asset in the system, specifically for HVAC equipment like AHUs. It allows detailed specification of the asset's properties, location, and associated points. ### Method POST ### Endpoint /assets ### Parameters #### Request Body - **@context** (string) - Required - The JSON-LD context for the Asset. - **@type** (string) - Required - The type of the asset (e.g., `dtmi:org:brickschema:schema:Brick:AHU;1`). - **name** (string) - Required - The name of the asset. - **serialNumber** (string) - Optional - The serial number of the asset. - **modelNumber** (string) - Optional - The model number of the asset. - **installationDate** (string) - Optional - The date the asset was installed (YYYY-MM-DD). - **locatedIn** (array of objects) - Optional - An array of objects, each with an `@id` representing the location of the asset. - **manufacturedBy** (array of objects) - Optional - An array of objects, each with an `@id` representing the manufacturer of the asset. - **hasPoint** (array of objects) - Optional - An array of objects, each with an `@id` representing a point (sensor, actuator) associated with the asset. ### Request Example ```json { "@context": "https://dev.realestatecore.io/contexts/Asset.jsonld", "@type": "dtmi:org:brickschema:schema:Brick:AHU;1", "name": "Air Handling Unit 001", "serialNumber": "AHU-2024-001", "modelNumber": "HVAC-PRO-5000", "installationDate": "2024-01-15", "locatedIn": [{"@id": "https://example.com/room/mechanical-001"}], "manufacturedBy": [{"@id": "https://example.com/agent/hvac-manufacturer"}], "hasPoint": [ {"@id": "https://example.com/sensor/ahu-001-supply-temp"}, {"@id": "https://example.com/sensor/ahu-001-return-temp"} ] } ``` ### Response #### Success Response (201 Created) - **id** (string) - The unique identifier of the created asset. - **@context** (string) - The JSON-LD context. - **@type** (string) - The type of the asset. - **name** (string) - The name of the asset. #### Response Example ```json { "@context": "https://dev.realestatecore.io/contexts/Asset.jsonld", "@type": "dtmi:org:brickschema:schema:Brick:AHU;1", "name": "Air Handling Unit 001", "id": "https://api.example.com/assets/ahu-001" } ``` ``` -------------------------------- ### Filter Assets by String Properties using REST API Source: https://context7.com/realestatecore/rec/llms.txt Demonstrates how to filter assets using the RealEstateCore REST API with various string matching operators. Supports exact match, substring containment, and regular expression matching. ```bash # String filtering operators curl "https://api.example.com/assets?name[eq]=AHU-001" # Exact match curl "https://api.example.com/assets?name[contains]=AHU" # Substring match curl "https://api.example.com/assets?name[regex]=^AHU-[0-9]+$" # Regex match ``` -------------------------------- ### Paginate Sensor Results using REST API Source: https://context7.com/realestatecore/rec/llms.txt Explains how to paginate through sensor results using the RealEstateCore REST API with 'page' and 'size' parameters, compatible with Hydra PartialCollectionView. ```bash # Pagination with Hydra PartialCollectionView curl "https://api.example.com/sensors?page=0&size=50" # First page, 50 items curl "https://api.example.com/sensors?page=2&size=25" # Third page, 25 items ``` -------------------------------- ### Sorting with JSON:API Source: https://github.com/realestatecore/rec/blob/main/API/REST/RealEstateCore_REST_specification.md Shows how to apply sorting to query results following JSON:API conventions. Supports sorting by REC properties, type, and identity, with options for ascending ('asc') and descending ('desc') order. ```http ?sort=hasValue ``` ```http ?sort[asc]=hasValue ``` ```http ?sort[desc]=hasValue ``` -------------------------------- ### Resource Paths Source: https://github.com/realestatecore/rec/blob/main/API/REST/RealEstateCore_REST_specification.md Defines the conventions for constructing resource paths for collections of individuals and specific individuals within the RealEstateCore API. ```APIDOC ## Resource Paths ### Description This principle outlines the structure for resource paths, ensuring consistency for accessing collections and individual resources based on their REC class and IRI. ### Collection Paths - Collections of individuals must be requested on a path similar to their REC class. For example: `/realestate`. ### Individual Paths - A specific individual must be requested on a path comprising their REC class and identity (IRI), for example: `/realestate/`. ### Querying Class Endpoints - Queries to a root class endpoint (e.g., `/RealEstateComponent`) must return individuals of that class and its subclasses (e.g., `Building`). - Queries to a leaf class endpoint (e.g., `/Building`) must return only individuals of that class. ``` -------------------------------- ### POST /messages - Send actuation commands Source: https://context7.com/realestatecore/rec/llms.txt Allows the cloud to send actuation commands to edge devices to control actuators. Includes command IDs for tracking. ```APIDOC ## POST /messages - Send actuation commands ### Description Allows the cloud to send actuation commands to edge devices to control actuators. Includes command IDs for tracking. ### Method POST ### Endpoint /messages ### Parameters #### Request Body - **format** (string) - Required - The message format version (e.g., `rec3.3`). - **deviceId** (string) - Required - The identifier of the target device. - **actuationCommands** (array of objects) - Required - A list of actuation commands. - **actuationCommandTime** (string) - Required - The timestamp when the command was issued (ISO 8601 format). - **actuationCommandId** (string) - Required - A unique identifier for the command. - **actuatorId** (string) - Required - The identifier of the actuator to control. - **value** (number) - Optional - The command value for numeric control. - **valueBoolean** (boolean) - Optional - The command value for boolean control. - **valueString** (string) - Optional - The command value for string control. ### Request Example ```json { "format": "rec3.3", "deviceId": "https://example.com/device/gateway-001", "actuationCommands": [ { "actuationCommandTime": "2024-01-15T14:35:00Z", "actuationCommandId": "https://example.com/command/cmd-98765", "actuatorId": "https://example.com/actuator/damper-001", "valueString": "Open" }, { "actuationCommandTime": "2024-01-15T14:35:00Z", "actuationCommandId": "https://example.com/command/cmd-98766", "actuatorId": "https://example.com/actuator/setpoint-001", "value": 22.0 } ] } ``` ### Response #### Success Response (200 OK) - **status** (string) - Confirmation message (e.g., "Actuation commands sent successfully"). #### Response Example ```json { "status": "Actuation commands sent successfully" } ``` ``` -------------------------------- ### Sorting Source: https://github.com/realestatecore/rec/blob/main/API/REST/RealEstateCore_REST_specification.md Sorting of resources is handled according to JSON:API specifications, utilizing a 'sort' query parameter. Both ascending and descending order are supported. ```APIDOC ## Sorting ### Description Sorting of resources in API responses follows the JSON:API specification, allowing clients to specify the order of returned data. ### Principle Sorting follows JSON:API. It is recommended to support sorting on all REC properties, as well as `type` and `id`. ### Parameters Sorting is controlled via the `sort` query parameter. ### Example `?sort=||` `?sort=hasValue` ### Ascending/Descending Sorting Operator-based query schema for ascending (`asc`) and descending (`desc`) sorting is recommended. ### Example `?sort[asc]=hasValue` ``` -------------------------------- ### Asset Entity Documentation Source: https://github.com/realestatecore/rec/blob/main/Doc/Asset/Asset.md Provides details about the Asset entity, including its definition, properties, and relationships. ```APIDOC ## Asset Entity ### Description Something which is placed inside of a building, but is not an integral part of that building's structure; e.g., furniture, equipment, systems, etc. **Display name:** Asset
**DTMI:** dtmi:org:w3id:rec:Asset;1 --- ### Child Interfaces * [Equipment](Equipment/Equipment.md) * [ArchitecturalAsset](Architectural-/ArchitecturalAsset.md) * [Furniture](Furniture/Furniture.md) --- ### Relationships | Name | Display name | Description | Multiplicity | Target | Properties | Writable | |---|---|---|---|---|---|---| | commissionedBy | **en**: commissioned by | | 0-Infinity | [Agent](../Agent/Agent.md) | | True | | documentation | **en**: documentation | | 0-Infinity | [Document](../Information/Document/Document.md) | | True | | geometry | **en**: geometry | **en**: A GeoJSON Geometry representing the position or extent of the asset. | 0-1 | [Geometry](../Information/Geometry/Geometry.md) | | True | | hasPart | **en**: has part | | 0-Infinity | [Asset](#) | | True | | hasPoint | **en**: has point | | 0-Infinity | [Point](../Point/Point.md) | | True | | installedBy | **en**: installed by | | 0-Infinity | [Agent](../Agent/Agent.md) | | True | | isPartOf | **en**: is part of | | 0-Infinity | [Asset](#) | | True | | locatedIn | **en**: located in | | 0-Infinity | [Space](../Space/Space.md) | | True | | manufacturedBy | **en**: manufactured by | | 0-Infinity | [Agent](../Agent/Agent.md) | | True | | mountedOn | **en**: mounted on | **en**: An asset may be mounted on some part of the building construction (e.g., a blind on a facade, a camera on a wall, etc). | 0-1 | [BuildingElement](../BuildingElement/BuildingElement.md) | | True | | servicedBy | **en**: serviced by | | 0-Infinity | [Agent](../Agent/Agent.md) | | True | --- ### Properties | Name | Display name | Description | Schema | Writable | |---|---|---|---|---| | assetTag | **en**: asset tag | | string | True | | commissioningDate | **en**: commissioning date | | date | True | | customProperties | **en**: Custom Properties | | map (string->map (string->string)) | True | | customTags | **en**: Custom Tags | | map (string->boolean) | True | | identifiers | **en**: Identifiers | | map (string->string) | True | | initialCost | **en**: initial cost | | string | True | | installationDate | **en**: installation date | | date | True | | IPAddress | **en**: IP address | | string | True | | MACAddress | **en**: MAC address | | string | True | | maintenanceInterval | **en**: maintenance interval | | duration | True | | modelNumber | **en**: model number | | string | True | | name | **en**: name | | string | True | | serialNumber | **en**: serial number | | string | True | | turnoverDate | **en**: turnover date | | date | True | | weight | **en**: weight | | string | True | --- ### Target Of #### General * [Point](../Point/Point.md).isPointOf * [Agent](../Agent/Agent.md).owns * [Space](../Space/Space.md).isLocationOf * [Equipment](Equipment/Equipment.md).feeds * [Equipment](Equipment/Equipment.md).isFedBy * [System](../Collection/System/System.md).includes * [Architecture](../Space/Architecture/Architecture.md).isFedBy * [Document](../Information/Document/Document.md).documentTopic * [Document](../Information/Document/Document.md).url * [Lease](../Event/Lease.md).leaseOf * [PointOfInterest](../Information/PointOfInterest.md).objectOfInterest * [Portfolio](../Collection/Portfolio.md).includes * [ServiceObject](../Information/ServiceObject/ServiceObject.md).relatedTo * [Meter](Equipment/Meter/Meter.md).meters #### Direct * [Asset](#).hasPart * [Asset](#).isPartOf ``` -------------------------------- ### POST /messages - Report exceptions Source: https://context7.com/realestatecore/rec/llms.txt Allows devices, sensors, or actuators to report exceptions or errors. Includes retry information for tracking recurring issues. ```APIDOC ## POST /messages - Report exceptions ### Description Allows devices, sensors, or actuators to report exceptions or errors. Includes retry information for tracking recurring issues. ### Method POST ### Endpoint /messages ### Parameters #### Request Body - **format** (string) - Required - The message format version (e.g., `rec3.3`). - **deviceId** (string) - Required - The identifier of the device reporting the exception. - **exceptions** (array of objects) - Required - A list of exceptions. - **exceptionTime** (string) - Required - The timestamp when the exception occurred (ISO 8601 format). - **origin** (string) - Required - The source of the exception (e.g., `sensor`, `actuator`, `device`). - **id** (string) - Required - The identifier of the originating sensor, actuator, or device. - **exception** (string) - Required - A description of the exception. - **retry** (integer) - Optional - The number of retries attempted or recommended. ### Request Example ```json { "format": "rec3.3", "deviceId": "https://example.com/device/gateway-001", "exceptions": [ { "exceptionTime": "2024-01-15T14:40:00Z", "origin": "sensor", "id": "https://example.com/sensor/temp-001", "exception": "Sensor communication timeout", "retry": 3 }, { "exceptionTime": "2024-01-15T14:40:05Z", "origin": "actuator", "id": "https://example.com/actuator/valve-001", "exception": "Valve stuck in closed position", "retry": 1 } ] } ``` ### Response #### Success Response (200 OK) - **status** (string) - Confirmation message (e.g., "Exceptions reported successfully"). #### Response Example ```json { "status": "Exceptions reported successfully" } ``` ``` -------------------------------- ### POST /messages - Send actuation responses Source: https://context7.com/realestatecore/rec/llms.txt Allows edge devices to report the status of actuation commands back to the cloud. Includes response codes and timestamps. ```APIDOC ## POST /messages - Send actuation responses ### Description Allows edge devices to report the status of actuation commands back to the cloud. Includes response codes and timestamps. ### Method POST ### Endpoint /messages ### Parameters #### Request Body - **format** (string) - Required - The message format version (e.g., `rec3.3`). - **deviceId** (string) - Required - The identifier of the device sending the response. - **actuationResponses** (array of objects) - Required - A list of actuation command responses. - **actuatorId** (string) - Required - The identifier of the actuator. - **actuationCommandId** (string) - Required - The identifier of the command this response relates to. - **responseCode** (string) - Required - The status code of the actuation (e.g., `success`, `rejected`). - **actuationResponseTime** (string) - Required - The timestamp when the response was generated (ISO 8601 format). ### Request Example ```json { "format": "rec3.3", "deviceId": "https://example.com/device/gateway-001", "actuationResponses": [ { "actuatorId": "https://example.com/actuator/damper-001", "actuationCommandId": "https://example.com/command/cmd-98765", "responseCode": "success", "actuationResponseTime": "2024-01-15T14:35:02Z" }, { "actuatorId": "https://example.com/actuator/setpoint-001", "actuationCommandId": "https://example.com/command/cmd-98766", "responseCode": "rejected", "actuationResponseTime": "2024-01-15T14:35:01Z" } ] } ``` ### Response #### Success Response (200 OK) - **status** (string) - Confirmation message (e.g., "Actuation responses received successfully"). #### Response Example ```json { "status": "Actuation responses received successfully" } ``` ``` -------------------------------- ### CRUD Operations and HTTP Verbs Source: https://github.com/realestatecore/rec/blob/main/API/REST/RealEstateCore_REST_specification.md This section defines the standard HTTP verbs to be used for Create, Retrieve, Update, and Delete operations on RealEstateCore resources. ```APIDOC ## CRUD Operations and HTTP Verbs ### Description This principle mandates the association of standard HTTP verbs with CRUD operations for interacting with RealEstateCore resources. ### Method Mapping - **Create**: HTTP POST - **Retrieve**: HTTP GET - **Update**: - HTTP PATCH for specific attributes (REC Object and Data Properties) - HTTP PUT for full individual - **Delete**: HTTP DELETE ``` -------------------------------- ### Capacity Sensor Relationships Source: https://github.com/realestatecore/rec/blob/main/Doc/Point/Sensor/Capacity-.md Explore relationships associated with a Capacity Sensor, such as its point information. ```APIDOC ## GET /realestatecore/rec/Capacity_Sensor/isPointOf ### Description Retrieves information about the point relationship for the Capacity Sensor. ### Method GET ### Endpoint /realestatecore/rec/Capacity_Sensor/isPointOf ### Response #### Success Response (200) - **isPointOf** (Point) - Information about the point this sensor is associated with. #### Response Example ```json { "isPointOf": { "name": "CapacitySensor1", "tags": { "exampleTag": true } } } ``` ```