GET api/v1/devices/{deviceId}/particle/Variable/{variable}

Read the variable values from the device. Reads all variables defined on the device. Note that this is a HTTP POST as it is an action to read the variables which results in a new measurement being created for the variable set.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
deviceId

globally unique identifier

Required

variable

Name of the variable on the particle device to read

string

Required

Body Parameters

None.

Response Information

Resource Description

ParticleVariableValueDto
NameDescriptionTypeAdditional information
Name

string

None.

Value

string

None.

Type

string

None.

TimeTakenMilliSeconds

decimal number

None.

Response Formats

application/json, text/json, application/senml+json

Sample:
{
  "Name": "sample string 1",
  "Value": "sample string 2",
  "Type": "sample string 3",
  "TimeTakenMilliSeconds": 4.1
}

application/xml, text/xml

Sample:
<ParticleVariableValueDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Particle.Models">
  <Name>sample string 1</Name>
  <TimeTakenMilliSeconds>4.1</TimeTakenMilliSeconds>
  <Type>sample string 3</Type>
  <Value>sample string 2</Value>
</ParticleVariableValueDto>