An HTTP endpoint is a network-accessible API interface that receives a request and returns data for a defined operation or resource. An air-conditioning unit exposes measurements to a central controller and site owners, returning its latest recorded sensor values. section 12.1
A practical endpoint implementation defines:
- A route containing the site and unit identifier, such as /measure/TIJ1/1. section 12.1
- An HTTP GET action that binds route values and returns a Temperatures object. section 12.1
- A response model containing the unit ID, site, UTC timestamp, and sensor measurements. section 12.1
Reading unit measurements
A client requests GET /measure/TIJ1/1. The endpoint responds successfully with the unit's latest exhaust-air, coolant, and outside-air measurements, represented as JSON. section 12.1
Listing 12.1 Example response from the air conditioner's API
{
"UnitId": 1, #1
"Site": "TIJ1",
"Timestamp": "2022-10-10T00:05:00.000Z", #2
"Measurements": {
[
"SensorName": "ExhaustAirTemp", #3
"Value": 15.2,
"Description": "Exhaust Air Temperature" #4
],
[
"SensorName": "CoolantTemp",
"Value": 3.4, #5
"Description": "Coolant Temperature"
],
[
"SensorName": "OutsideAirTemp",
"Value": 24.1,
"Description": "Outside Air Temperature"
]
}
}
Inspect the representative JSON payload, including unit identity, UTC timestamp, and named measurement values. section 12.1
Endpoint behavior can be checked through an ASP.NET Core test host: create a WebApplicationFactory, issue an HttpClient GET request, and assert an OK status. section 12.1

























