Interface IDeviceSensorCommands
- Namespace
- Meraki.Api.Interfaces.General.Devices
- Assembly
- Meraki.Api.dll
public interface IDeviceSensorCommands
- Extension Methods
Methods
CreateDeviceSensorCommandAsync(string, SensorCommandCreateRequest, CancellationToken)
Sends a command to a sensor
[Post("/devices/{serial}/sensor/commands")]
Task<SensorCommand> CreateDeviceSensorCommandAsync(string serial, SensorCommandCreateRequest createDeviceSensorCommand, CancellationToken cancellationToken = default)
Parameters
serialstringThe serial number
createDeviceSensorCommandSensorCommandCreateRequestBody
cancellationTokenCancellationToken
Returns
Exceptions
- ApiException
Thrown when fails to make API call
GetDeviceSensorCommandAsync(string, string, CancellationToken)
Returns information about the command's execution, including the status
[Get("/devices/{serial}/sensor/commands/{commandId}")]
Task<SensorCommand> GetDeviceSensorCommandAsync(string serial, string commandId, CancellationToken cancellationToken = default)
Parameters
serialstringSerial
commandIdstringCommandId
cancellationTokenCancellationTokenThe cancellation token
Returns
GetDeviceSensorCommandsAsync(string, List<string>?, int?, string?, string?, string?, string?, string?, CancellationToken)
Returns a historical log of all commands
[Get("/devices/{serial}/sensor/commands")]
Task<List<SensorCommand>> GetDeviceSensorCommandsAsync(string serial, List<string>? operations = null, int? perPage = 1000, string? startingAfter = null, string? endingBefore = null, string? t0 = null, string? t1 = null, string? timespan = null, CancellationToken cancellationToken = default)
Parameters
serialstringSerial
operationsList<string>Optional parameter to filter commands by operation
perPageint?The number of entries per page returned. Acceptable range is 3 - 1000. Default is 10.
startingAfterstringA 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.
endingBeforestringA 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.
t0stringThe beginning of the timespan for the data. The maximum lookback period is 30 days from today.
t1stringThe end of the timespan for the data. t1 can be a maximum of 30 days after t0.
timespanstringThe 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 30 days. The default is 1 day.
cancellationTokenCancellationTokenThe cancellation token
Returns
- Task<List<SensorCommand>>
A list of SensorCommand