History Trait
API Service: HistoryAdminApi
HistoryAdminApi provides remote access to the history store.
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| CreateHistoryRecord | CreateHistoryRecordRequest | HistoryRecord | |
| ListHistoryRecords | ListHistoryRecordsRequest | ListHistoryRecordsResponse |
Service: AirTemperatureHistory
AirTemperatureHistory provides access to historical records for smartcore.traits.AirTemperatureApi service resources.
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| ListAirTemperatureHistory | ListAirTemperatureHistoryRequest | ListAirTemperatureHistoryResponse |
Service: MeterHistory
MeterHistory provides access to historical records for smartcore.box.MeterApi service resources.
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| ListMeterReadingHistory | ListMeterReadingHistoryRequest | ListMeterReadingHistoryResponse |
Service: ElectricHistory
ElectricHistory provides access to historical records for smartcore.traits.ElectricApi service resources.
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| ListElectricDemandHistory | ListElectricDemandHistoryRequest | ListElectricDemandHistoryResponse |
Service: OccupancySensorHistory
OccupancySensorHistory provides access to historical records for smartcore.traits.OccupancySensorApi service resources.
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| ListOccupancyHistory | ListOccupancyHistoryRequest | ListOccupancyHistoryResponse |
Service: AirQualitySensorHistory
AirQualitySensorHistory provides access to historical records for smartcore.traits.AirQualityApi service resources.
| Method | Request Type | Response Type | Description |
|---|---|---|---|
| ListAirQualityHistory | ListAirQualityHistoryRequest | ListAirQualityHistoryResponse |
HistoryRecord
HistoryRecord is a generic record of a device's state at a point in time. Prefer using trait specific record types where possible.
| Field Name | Type | Description |
|---|---|---|
| id | string | |
| source | string | |
| create_time | google.protobuf.Timestamp | |
| payload | bytes |
HistoryRecord.Query
| Field Name | Type | Description |
|---|---|---|
| source_equal | string | |
| from_record | HistoryRecord | The bounding records to select: from_record <= record < to_record. ID or create_time (in that order) will be used for result selection. |
| to_record | HistoryRecord |
CreateHistoryRecordRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | |
| record | HistoryRecord | The record to create. The id and create_time fields must be absent. |
ListHistoryRecordsRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | |
| page_size | int32 | The maximum number of records to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| page_token | string | A page token, received from a previous ListHistoryRecords call. Provide this to retrieve the subsequent page. |
| order_by | string | Specify the order of the returned records. The default is create_time asc - aka oldest record first. The format is `field_name [asc |
| query | HistoryRecord.Query |
ListHistoryRecordsResponse
| Field Name | Type | Description |
|---|---|---|
| records | repeated HistoryRecord | |
| next_page_token | string | A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| total_size | int32 | If non-zero this is the total number of records matched by the query. This may be an estimate. |
AirTemperatureRecord
| Field Name | Type | Description |
|---|---|---|
| air_temperature | smartcore.traits.AirTemperature | |
| record_time | google.protobuf.Timestamp |
ListAirTemperatureHistoryRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | |
| period | smartcore.types.time.Period | |
| read_mask | google.protobuf.FieldMask | Fields to fetch relative to the AirTemperatureRecord type |
| page_size | int32 | The maximum number of devices to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| page_token | string | A page token, received from a previous ListAirTemperatureHistoryResponse call. Provide this to retrieve the subsequent page. |
| order_by | string | Specify the order of the returned records. The default is record_time asc - aka oldest record first. The format is `field_name [asc |
ListAirTemperatureHistoryResponse
| Field Name | Type | Description |
|---|---|---|
| air_temperature_records | repeated AirTemperatureRecord | |
| next_page_token | string | A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| total_size | int32 | If non-zero this is the total number of records matched by the query. This may be an estimate. |
MeterReadingRecord
| Field Name | Type | Description |
|---|---|---|
| meter_reading | smartcore.bos.MeterReading | |
| record_time | google.protobuf.Timestamp |
ListMeterReadingHistoryRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | |
| period | smartcore.types.time.Period | |
| read_mask | google.protobuf.FieldMask | Fields to fetch relative to the MeterReadingRecord type |
| page_size | int32 | The maximum number of devices to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| page_token | string | A page token, received from a previous ListMeterReadingHistoryResponse call. Provide this to retrieve the subsequent page. |
| order_by | string | Specify the order of the returned records. The default is record_time asc - aka oldest record first. The format is `field_name [asc |
ListMeterReadingHistoryResponse
| Field Name | Type | Description |
|---|---|---|
| meter_reading_records | repeated MeterReadingRecord | |
| next_page_token | string | A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| total_size | int32 | If non-zero this is the total number of records matched by the query. This may be an estimate. |
ElectricDemandRecord
| Field Name | Type | Description |
|---|---|---|
| electric_demand | smartcore.traits.ElectricDemand | |
| record_time | google.protobuf.Timestamp |
ListElectricDemandHistoryRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | |
| period | smartcore.types.time.Period | |
| read_mask | google.protobuf.FieldMask | Fields to fetch relative to the ElectricDemandRecord type |
| page_size | int32 | The maximum number of devices to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| page_token | string | A page token, received from a previous ListElectricDemandHistoryResponse call. Provide this to retrieve the subsequent page. |
| order_by | string | Specify the order of the returned records. The default is record_time asc - aka oldest record first. The format is `field_name [asc |
ListElectricDemandHistoryResponse
| Field Name | Type | Description |
|---|---|---|
| electric_demand_records | repeated ElectricDemandRecord | |
| next_page_token | string | A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| total_size | int32 | If non-zero this is the total number of records matched by the query. This may be an estimate. |
OccupancyRecord
| Field Name | Type | Description |
|---|---|---|
| occupancy | smartcore.traits.Occupancy | |
| record_time | google.protobuf.Timestamp |
ListOccupancyHistoryRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | |
| period | smartcore.types.time.Period | |
| read_mask | google.protobuf.FieldMask | Fields to fetch relative to the OccupancyRecord type |
| page_size | int32 | The maximum number of devices to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| page_token | string | A page token, received from a previous ListOccupancyHistoryResponse call. Provide this to retrieve the subsequent page. |
| order_by | string | Specify the order of the returned records. The default is record_time asc - aka oldest record first. The format is `field_name [asc |
ListOccupancyHistoryResponse
| Field Name | Type | Description |
|---|---|---|
| occupancy_records | repeated OccupancyRecord | |
| next_page_token | string | A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| total_size | int32 | If non-zero this is the total number of records matched by the query. This may be an estimate. |
AirQualityRecord
| Field Name | Type | Description |
|---|---|---|
| air_quality | smartcore.traits.AirQuality | |
| record_time | google.protobuf.Timestamp |
ListAirQualityHistoryRequest
| Field Name | Type | Description |
|---|---|---|
| name | string | |
| period | smartcore.types.time.Period | |
| read_mask | google.protobuf.FieldMask | Fields to fetch relative to the AirQualityRecord type |
| page_size | int32 | The maximum number of devices to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| page_token | string | A page token, received from a previous ListAirQualityHistoryResponse call. Provide this to retrieve the subsequent page. |
| order_by | string | Specify the order of the returned records. The default is record_time asc - aka oldest record first. The format is `field_name [asc |
ListAirQualityHistoryResponse
| Field Name | Type | Description |
|---|---|---|
| air_quality_records | repeated AirQualityRecord | |
| next_page_token | string | A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| total_size | int32 | If non-zero this is the total number of records matched by the query. This may be an estimate. |