PUT api/v1/devices/{id}

Update the device.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

globally unique identifier

Required

Body Parameters

UpdateDeviceDto
NameDescriptionTypeAdditional information
UserName

@Name for device

string

None.

DisplayName

The friendly name for the device.

string

None.

Email

If the device sends or receives emails, the email name.

string

None.

AllowDuplicateMessages

If duplicate status messages should be allowed to be submitted by the device.

boolean

None.

AccessControl

Simple access control for the device (read/write).

AccessControl

None.

AuthenticationOptions

Allowable methods for the device to authenticate

AuthenticationOptionsDto

None.

Description

Device description

string

None.

Locked

If the device is locked.

boolean

None.

Approved

If the device is approved

boolean

None.

StatusSummaryFormat

Format string for the status summary (used in the timeline device widget)

string

None.

FieldDescriptors

Descriptions of the fields.

Collection of FieldDescriptorDto

None.

Password

The password to set for the device.

string

None.

ConfirmPassword

Confirmation of the password set for the device

string

None.

AllowAnonymousView

Allow anonymous users to view details of the device.

boolean

None.

AllowAnonymousViewStatus

boolean

None.

AllowAnonymousViewEvents

boolean

None.

AllowAnonymousViewLocation

boolean

None.

Location

Current location of the device

LocationDto

None.

Tags

Simple "Something" tags

Collection of string

None.

MetaTags

Name + value meta data tags

Collection of NameValueTagDto

None.

IsHidden

Setting this true allows the device to be hidden from view but still active / have measurements stored.

boolean

None.

IsArchived

If the device should be archived

boolean

None.

ExpectedActivityTimePeriodSeconds

How long after the last measurement/status to flag the user/device as not reporting.

integer

None.

LocationToleranceMeters

decimal number

None.

DateFormat

The date formatting to use for display dates when requested by this device.

string

None.

Request Formats

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

Sample:
{
  "UserName": "sample string 1",
  "DisplayName": "sample string 2",
  "Email": "sample string 3",
  "EmailAliases": [
    "sample string 1",
    "sample string 2"
  ],
  "AllowDuplicateMessages": true,
  "AccessControl": "None",
  "AuthenticationOptions": {
    "AllowApiKey": true,
    "AllowHttpBasic": true,
    "AllowMqtt": true,
    "AllowMqtts": true
  },
  "Description": "sample string 5",
  "Locked": true,
  "Approved": true,
  "StatusSummaryFormat": "sample string 8",
  "FieldDescriptors": [
    {
      "Index": 1,
      "Channel": 2,
      "Name": "sample string 3",
      "Label": "sample string 4",
      "Unit": "sample string 5",
      "Visible": true,
      "IncludeOnChart": true,
      "Rounding": 8,
      "ChartColor": "sample string 9",
      "TwitterCard": {
        "Card": 0,
        "Title": "sample string 1",
        "Description": "sample string 2",
        "TwitterCardImageStyle": 0,
        "ChartTemplateId": "5781ea51-7782-44c0-87df-df2d9edf816b"
      },
      "WorkingRange": {
        "Enabled": true,
        "Min": 2.0,
        "Max": 3.0,
        "BandColor": "sample string 4",
        "RangeStatus": {
          "RangeLevel": "Normal",
          "SetOn": "2024-11-21T07:26:35.2876132+00:00"
        }
      },
      "AcceptableRange": {
        "Enabled": true,
        "Min": 2.0,
        "Max": 3.0,
        "BandColor": "sample string 4",
        "RangeStatus": {
          "RangeLevel": "Normal",
          "SetOn": "2024-11-21T07:26:35.2876132+00:00"
        }
      },
      "Calibration": {
        "Enabled": true,
        "Offset": 2.0,
        "Slope": 3.0
      },
      "Tags": [
        "sample string 1",
        "sample string 2"
      ],
      "UseSecondAxis": true,
      "YAxis": 0,
      "Links": [
        {
          "Href": "sample string 1",
          "Rel": "sample string 2",
          "Action": "sample string 3"
        },
        {
          "Href": "sample string 1",
          "Rel": "sample string 2",
          "Action": "sample string 3"
        }
      ],
      "IsPrimary": true,
      "FieldType": 0,
      "DefaultChartType": 0,
      "UseAlgorithm": 0,
      "UserAlgorithm": "sample string 12",
      "Variables": [
        {
          "Name": "sample string 1",
          "Value": "sample string 2"
        },
        {
          "Name": "sample string 1",
          "Value": "sample string 2"
        }
      ],
      "StartDate": "2024-11-21T07:26:35.2876132+00:00",
      "SetDeviceState": true,
      "OrderPosition": 1
    },
    {
      "Index": 1,
      "Channel": 2,
      "Name": "sample string 3",
      "Label": "sample string 4",
      "Unit": "sample string 5",
      "Visible": true,
      "IncludeOnChart": true,
      "Rounding": 8,
      "ChartColor": "sample string 9",
      "TwitterCard": {
        "Card": 0,
        "Title": "sample string 1",
        "Description": "sample string 2",
        "TwitterCardImageStyle": 0,
        "ChartTemplateId": "5781ea51-7782-44c0-87df-df2d9edf816b"
      },
      "WorkingRange": {
        "Enabled": true,
        "Min": 2.0,
        "Max": 3.0,
        "BandColor": "sample string 4",
        "RangeStatus": {
          "RangeLevel": "Normal",
          "SetOn": "2024-11-21T07:26:35.2876132+00:00"
        }
      },
      "AcceptableRange": {
        "Enabled": true,
        "Min": 2.0,
        "Max": 3.0,
        "BandColor": "sample string 4",
        "RangeStatus": {
          "RangeLevel": "Normal",
          "SetOn": "2024-11-21T07:26:35.2876132+00:00"
        }
      },
      "Calibration": {
        "Enabled": true,
        "Offset": 2.0,
        "Slope": 3.0
      },
      "Tags": [
        "sample string 1",
        "sample string 2"
      ],
      "UseSecondAxis": true,
      "YAxis": 0,
      "Links": [
        {
          "Href": "sample string 1",
          "Rel": "sample string 2",
          "Action": "sample string 3"
        },
        {
          "Href": "sample string 1",
          "Rel": "sample string 2",
          "Action": "sample string 3"
        }
      ],
      "IsPrimary": true,
      "FieldType": 0,
      "DefaultChartType": 0,
      "UseAlgorithm": 0,
      "UserAlgorithm": "sample string 12",
      "Variables": [
        {
          "Name": "sample string 1",
          "Value": "sample string 2"
        },
        {
          "Name": "sample string 1",
          "Value": "sample string 2"
        }
      ],
      "StartDate": "2024-11-21T07:26:35.2876132+00:00",
      "SetDeviceState": true,
      "OrderPosition": 1
    }
  ],
  "Password": "sample string 9",
  "ConfirmPassword": "sample string 10",
  "AllowAnonymousView": true,
  "AllowAnonymousViewStatus": true,
  "AllowAnonymousViewEvents": true,
  "AllowAnonymousViewLocation": true,
  "Location": {
    "Name": "sample string 1",
    "Latitude": 2.1,
    "Longitude": 3.1,
    "Elevation": 4.1,
    "WellKnownLocationId": "582945c2-a1b6-4221-88ce-6fc4e1fa25d5",
    "LastUpdated": "2024-11-21T07:26:35.2876132+00:00"
  },
  "Tags": [
    "sample string 1",
    "sample string 2"
  ],
  "MetaTags": [
    {
      "Name": "sample string 1",
      "Value": "sample string 2",
      "NumericValue": 1.0,
      "LastUpdated": "2024-11-21T07:26:35.2876132+00:00"
    },
    {
      "Name": "sample string 1",
      "Value": "sample string 2",
      "NumericValue": 1.0,
      "LastUpdated": "2024-11-21T07:26:35.2876132+00:00"
    }
  ],
  "IsHidden": true,
  "IsArchived": true,
  "ExpectedActivityTimePeriodSeconds": 17,
  "LocationToleranceMeters": 1.0,
  "DateFormat": "sample string 18"
}

application/xml, text/xml

Sample:
<UpdateDeviceViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Devices">
  <AccessControl>None</AccessControl>
  <AllowAnonymousView>true</AllowAnonymousView>
  <AllowAnonymousViewEvents>true</AllowAnonymousViewEvents>
  <AllowAnonymousViewLocation>true</AllowAnonymousViewLocation>
  <AllowAnonymousViewStatus>true</AllowAnonymousViewStatus>
  <AllowDuplicateMessages>true</AllowDuplicateMessages>
  <Approved>true</Approved>
  <AuthenticationOptions xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
    <d2p1:AllowApiKey>true</d2p1:AllowApiKey>
    <d2p1:AllowHttpBasic>true</d2p1:AllowHttpBasic>
    <d2p1:AllowMqtt>true</d2p1:AllowMqtt>
    <d2p1:AllowMqtts>true</d2p1:AllowMqtts>
  </AuthenticationOptions>
  <ConfirmPassword>sample string 10</ConfirmPassword>
  <DateFormat>sample string 18</DateFormat>
  <Description>sample string 5</Description>
  <DisplayName>sample string 2</DisplayName>
  <Email>sample string 3</Email>
  <EmailAliases xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </EmailAliases>
  <ExpectedActivityTimePeriodSeconds>17</ExpectedActivityTimePeriodSeconds>
  <FieldDescriptors>
    <FieldDescriptorDto>
      <AcceptableRange>
        <BandColor>sample string 4</BandColor>
        <Enabled>true</Enabled>
        <Max>3</Max>
        <Min>2</Min>
        <RangeStatus>
          <RangeLevel>Normal</RangeLevel>
          <SetOn>2024-11-21T07:26:35.2876132+00:00</SetOn>
        </RangeStatus>
      </AcceptableRange>
      <Calibration>
        <Enabled>true</Enabled>
        <Offset>2</Offset>
        <Slope>3</Slope>
      </Calibration>
      <Channel>2</Channel>
      <ChartColor>sample string 9</ChartColor>
      <DefaultChartType>LineChart</DefaultChartType>
      <FieldType>Measured</FieldType>
      <IncludeOnChart>true</IncludeOnChart>
      <Index>1</Index>
      <IsPrimary>true</IsPrimary>
      <Label>sample string 4</Label>
      <Links xmlns:d4p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
        <d4p1:LinkViewModel>
          <d4p1:Action>sample string 3</d4p1:Action>
          <d4p1:Href>sample string 1</d4p1:Href>
          <d4p1:Rel>sample string 2</d4p1:Rel>
        </d4p1:LinkViewModel>
        <d4p1:LinkViewModel>
          <d4p1:Action>sample string 3</d4p1:Action>
          <d4p1:Href>sample string 1</d4p1:Href>
          <d4p1:Rel>sample string 2</d4p1:Rel>
        </d4p1:LinkViewModel>
      </Links>
      <Name>sample string 3</Name>
      <OrderPosition>1</OrderPosition>
      <Rounding>8</Rounding>
      <SetDeviceState>true</SetDeviceState>
      <StartDate>2024-11-21T07:26:35.2876132+00:00</StartDate>
      <Tags xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </Tags>
      <TwitterCard xmlns:d4p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
        <d4p1:Card>SummaryLargeImage</d4p1:Card>
        <d4p1:ChartTemplateId>5781ea51-7782-44c0-87df-df2d9edf816b</d4p1:ChartTemplateId>
        <d4p1:Description>sample string 2</d4p1:Description>
        <d4p1:Title>sample string 1</d4p1:Title>
        <d4p1:TwitterCardImageStyle>LineChartOnly</d4p1:TwitterCardImageStyle>
      </TwitterCard>
      <Unit>sample string 5</Unit>
      <UseAlgorithm>KelvinToCelcius</UseAlgorithm>
      <UseSecondAxis>true</UseSecondAxis>
      <UserAlgorithm>sample string 12</UserAlgorithm>
      <Variables>
        <ComputedFieldVariableDto>
          <Name>sample string 1</Name>
          <Value>sample string 2</Value>
        </ComputedFieldVariableDto>
        <ComputedFieldVariableDto>
          <Name>sample string 1</Name>
          <Value>sample string 2</Value>
        </ComputedFieldVariableDto>
      </Variables>
      <Visible>true</Visible>
      <WorkingRange>
        <BandColor>sample string 4</BandColor>
        <Enabled>true</Enabled>
        <Max>3</Max>
        <Min>2</Min>
        <RangeStatus>
          <RangeLevel>Normal</RangeLevel>
          <SetOn>2024-11-21T07:26:35.2876132+00:00</SetOn>
        </RangeStatus>
      </WorkingRange>
      <YAxis>Unknown</YAxis>
    </FieldDescriptorDto>
    <FieldDescriptorDto>
      <AcceptableRange>
        <BandColor>sample string 4</BandColor>
        <Enabled>true</Enabled>
        <Max>3</Max>
        <Min>2</Min>
        <RangeStatus>
          <RangeLevel>Normal</RangeLevel>
          <SetOn>2024-11-21T07:26:35.2876132+00:00</SetOn>
        </RangeStatus>
      </AcceptableRange>
      <Calibration>
        <Enabled>true</Enabled>
        <Offset>2</Offset>
        <Slope>3</Slope>
      </Calibration>
      <Channel>2</Channel>
      <ChartColor>sample string 9</ChartColor>
      <DefaultChartType>LineChart</DefaultChartType>
      <FieldType>Measured</FieldType>
      <IncludeOnChart>true</IncludeOnChart>
      <Index>1</Index>
      <IsPrimary>true</IsPrimary>
      <Label>sample string 4</Label>
      <Links xmlns:d4p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
        <d4p1:LinkViewModel>
          <d4p1:Action>sample string 3</d4p1:Action>
          <d4p1:Href>sample string 1</d4p1:Href>
          <d4p1:Rel>sample string 2</d4p1:Rel>
        </d4p1:LinkViewModel>
        <d4p1:LinkViewModel>
          <d4p1:Action>sample string 3</d4p1:Action>
          <d4p1:Href>sample string 1</d4p1:Href>
          <d4p1:Rel>sample string 2</d4p1:Rel>
        </d4p1:LinkViewModel>
      </Links>
      <Name>sample string 3</Name>
      <OrderPosition>1</OrderPosition>
      <Rounding>8</Rounding>
      <SetDeviceState>true</SetDeviceState>
      <StartDate>2024-11-21T07:26:35.2876132+00:00</StartDate>
      <Tags xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </Tags>
      <TwitterCard xmlns:d4p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
        <d4p1:Card>SummaryLargeImage</d4p1:Card>
        <d4p1:ChartTemplateId>5781ea51-7782-44c0-87df-df2d9edf816b</d4p1:ChartTemplateId>
        <d4p1:Description>sample string 2</d4p1:Description>
        <d4p1:Title>sample string 1</d4p1:Title>
        <d4p1:TwitterCardImageStyle>LineChartOnly</d4p1:TwitterCardImageStyle>
      </TwitterCard>
      <Unit>sample string 5</Unit>
      <UseAlgorithm>KelvinToCelcius</UseAlgorithm>
      <UseSecondAxis>true</UseSecondAxis>
      <UserAlgorithm>sample string 12</UserAlgorithm>
      <Variables>
        <ComputedFieldVariableDto>
          <Name>sample string 1</Name>
          <Value>sample string 2</Value>
        </ComputedFieldVariableDto>
        <ComputedFieldVariableDto>
          <Name>sample string 1</Name>
          <Value>sample string 2</Value>
        </ComputedFieldVariableDto>
      </Variables>
      <Visible>true</Visible>
      <WorkingRange>
        <BandColor>sample string 4</BandColor>
        <Enabled>true</Enabled>
        <Max>3</Max>
        <Min>2</Min>
        <RangeStatus>
          <RangeLevel>Normal</RangeLevel>
          <SetOn>2024-11-21T07:26:35.2876132+00:00</SetOn>
        </RangeStatus>
      </WorkingRange>
      <YAxis>Unknown</YAxis>
    </FieldDescriptorDto>
  </FieldDescriptors>
  <IsArchived>true</IsArchived>
  <IsHidden>true</IsHidden>
  <Location xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
    <d2p1:Elevation>4.1</d2p1:Elevation>
    <d2p1:LastUpdated>2024-11-21T07:26:35.2876132+00:00</d2p1:LastUpdated>
    <d2p1:Latitude>2.1</d2p1:Latitude>
    <d2p1:Longitude>3.1</d2p1:Longitude>
    <d2p1:Name>sample string 1</d2p1:Name>
    <d2p1:WellKnownLocationId>582945c2-a1b6-4221-88ce-6fc4e1fa25d5</d2p1:WellKnownLocationId>
  </Location>
  <LocationToleranceMeters>1</LocationToleranceMeters>
  <Locked>true</Locked>
  <MetaTags xmlns:d2p1="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.Shared">
    <d2p1:NameValueTagDto>
      <d2p1:LastUpdated>2024-11-21T07:26:35.2876132+00:00</d2p1:LastUpdated>
      <d2p1:Name>sample string 1</d2p1:Name>
      <d2p1:NumericValue>1</d2p1:NumericValue>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:NameValueTagDto>
    <d2p1:NameValueTagDto>
      <d2p1:LastUpdated>2024-11-21T07:26:35.2876132+00:00</d2p1:LastUpdated>
      <d2p1:Name>sample string 1</d2p1:Name>
      <d2p1:NumericValue>1</d2p1:NumericValue>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:NameValueTagDto>
  </MetaTags>
  <Password>sample string 9</Password>
  <StatusSummaryFormat>sample string 8</StatusSummaryFormat>
  <Tags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Tags>
  <UserName>sample string 1</UserName>
</UpdateDeviceViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Status code only. Does not include updated object.

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.