PUT api/v1/devices/{deviceId}/particle

Update the particle details stored for the device.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
deviceId

globally unique identifier

Required

Body Parameters

UpdateParticleDeviceDto
NameDescriptionTypeAdditional information
CheckInterval

time interval

None.

Enabled

boolean

None.

IgnoreRename

If renaming the device at Particle.io should be ignroed and keep the device assigned to the current Tinamous device.

boolean

None.

VariableSettings

Collection of ParticleVariableSettingDto

None.

PublishUnknownEventsAsMeasurements

If events with numeric values should be treated as measurements

boolean

None.

PublishUnknownEventsAsStatusPosts

If events with string or no value should be treated as status posts.

boolean

None.

OnlineNotificationOption

Options to post notifications on the device coming on-line

ParticlsStatusNotifyOptionDto

None.

OfflineNotificationOption

Options to post notifications on the device going off-line

ParticlsStatusNotifyOptionDto

None.

Request Formats

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

Sample:
{
  "CheckInterval": "00:00:00.1234567",
  "Enabled": true,
  "IgnoreRename": true,
  "VariableSettings": [
    {
      "CheckInterval": "00:00:00.1234567",
      "Enabled": true,
      "Name": "sample string 3",
      "Type": "sample string 4"
    },
    {
      "CheckInterval": "00:00:00.1234567",
      "Enabled": true,
      "Name": "sample string 3",
      "Type": "sample string 4"
    }
  ],
  "PublishUnknownEventsAsMeasurements": true,
  "PublishUnknownEventsAsStatusPosts": true,
  "OnlineNotificationOption": {
    "PostStatusMessage": true,
    "Message": "sample string 2"
  },
  "OfflineNotificationOption": {
    "PostStatusMessage": true,
    "Message": "sample string 2"
  }
}

application/xml, text/xml

Sample:
<UpdateParticleDeviceDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Particle.Models">
  <CheckInterval>PT0.1234567S</CheckInterval>
  <Enabled>true</Enabled>
  <IgnoreRename>true</IgnoreRename>
  <OfflineNotificationOption>
    <Message>sample string 2</Message>
    <PostStatusMessage>true</PostStatusMessage>
  </OfflineNotificationOption>
  <OnlineNotificationOption>
    <Message>sample string 2</Message>
    <PostStatusMessage>true</PostStatusMessage>
  </OnlineNotificationOption>
  <PublishUnknownEventsAsMeasurements>true</PublishUnknownEventsAsMeasurements>
  <PublishUnknownEventsAsStatusPosts>true</PublishUnknownEventsAsStatusPosts>
  <VariableSettings>
    <ParticleVariableSettingDto>
      <CheckInterval>PT0.1234567S</CheckInterval>
      <Enabled>true</Enabled>
      <Name>sample string 3</Name>
      <Type>sample string 4</Type>
    </ParticleVariableSettingDto>
    <ParticleVariableSettingDto>
      <CheckInterval>PT0.1234567S</CheckInterval>
      <Enabled>true</Enabled>
      <Name>sample string 3</Name>
      <Type>sample string 4</Type>
    </ParticleVariableSettingDto>
  </VariableSettings>
</UpdateParticleDeviceDto>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.