Table of Contents

Interface IOrganizationSensorReadingsHistory

Namespace
Meraki.Api.Interfaces.Products.Sensor
Assembly
Meraki.Api.dll
public interface IOrganizationSensorReadingsHistory

Methods

GetOrganizationSensorReadingsHistoryAsync(string, int?, string?, string?, string, string, double?, List<string>?, List<string>?, List<SensorMetrics>?, CancellationToken)

Return all reported readings from sensors in a given timespan, sorted by timestamp

[Get("/organizations/{organizationId}/sensor/readings/history")]
Task<List<SensorReadingHistoric>> GetOrganizationSensorReadingsHistoryAsync(string organizationId, int? perPage, string? startingAfter = null, string? endingBefore = null, string t0 = null, string t1 = null, double? timespan = null, List<string>? networkIds = null, List<string>? serials = null, List<SensorMetrics>? metrics = null, CancellationToken cancellationToken = default)

Parameters

organizationId string

The organization id.

perPage int?

The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.

startingAfter string

A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.

endingBefore string

A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.

t0 string

The beginning of the timespan for the data. The maximum lookback period is 365 days and 6 hours from today.

t1 string

The end of the timespan for the data. t1 can be a maximum of 7 days after t0.

timespan double?

The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 7 days. The default is 2 hours.

networkIds List<string>

Optional parameter to filter readings by network.

serials List<string>

Optional parameter to filter readings by sensor.

metrics List<SensorMetrics>

Types of sensor readings to retrieve. If no metrics are supplied, all available types of readings will be retrieved. Allowed values are temperature, humidity, water, door, tvoc, pm25, noise, indoorAirQuality, button, and battery.

cancellationToken CancellationToken

Returns

Task<List<SensorReadingHistoric>>

Exceptions

ApiException

Thrown when fails to make API call