PUT api/v1/locations/{locationId}/devices/{deviceId}/automation/schedule

Update a Thermostat schedule (database only) Equivalent SOAP API : UpdateThermostatSchedule

Request Information

URI Parameters

NameDescriptionTypeAdditional information
deviceId

lyricloc

integer

Required

locationId

string

None.

Body Parameters

ThermostatScheduleInfo

ThermostatSchedule
NameDescriptionTypeAdditional information
ThermostatID

integer

None.

SetPoints

Collection of ScheduleInfo

None.

HighThresholdValue

integer

None.

LowThresholdValue

integer

None.

HighThresholdStatus

integer

None.

LowThresholdStatus

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "ThermostatID": 1,
  "SetPoints": [
    {
      "ScheduleID": 1,
      "ScheduleDay": 2,
      "TimePeriods": [
        {
          "Index": 1,
          "Enabled": true,
          "TempHeat": 3,
          "TempCool": 4,
          "Time": "sample string 5"
        },
        {
          "Index": 1,
          "Enabled": true,
          "TempHeat": 3,
          "TempCool": 4,
          "Time": "sample string 5"
        }
      ]
    },
    {
      "ScheduleID": 1,
      "ScheduleDay": 2,
      "TimePeriods": [
        {
          "Index": 1,
          "Enabled": true,
          "TempHeat": 3,
          "TempCool": 4,
          "Time": "sample string 5"
        },
        {
          "Index": 1,
          "Enabled": true,
          "TempHeat": 3,
          "TempCool": 4,
          "Time": "sample string 5"
        }
      ]
    }
  ],
  "HighThresholdValue": 2,
  "LowThresholdValue": 3,
  "HighThresholdStatus": 4,
  "LowThresholdStatus": 5
}

application/xml, text/xml

Sample:
<ThermostatSchedule xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TC2Domain.Automation">
  <HighThresholdStatus>4</HighThresholdStatus>
  <HighThresholdValue>2</HighThresholdValue>
  <LowThresholdStatus>5</LowThresholdStatus>
  <LowThresholdValue>3</LowThresholdValue>
  <SetPoints>
    <ScheduleInfo>
      <ScheduleDay>2</ScheduleDay>
      <ScheduleID>1</ScheduleID>
      <TimePeriods>
        <TimePeriodInfo>
          <Enabled>true</Enabled>
          <Index>1</Index>
          <TempCool>4</TempCool>
          <TempHeat>3</TempHeat>
          <Time>sample string 5</Time>
        </TimePeriodInfo>
        <TimePeriodInfo>
          <Enabled>true</Enabled>
          <Index>1</Index>
          <TempCool>4</TempCool>
          <TempHeat>3</TempHeat>
          <Time>sample string 5</Time>
        </TimePeriodInfo>
      </TimePeriods>
    </ScheduleInfo>
    <ScheduleInfo>
      <ScheduleDay>2</ScheduleDay>
      <ScheduleID>1</ScheduleID>
      <TimePeriods>
        <TimePeriodInfo>
          <Enabled>true</Enabled>
          <Index>1</Index>
          <TempCool>4</TempCool>
          <TempHeat>3</TempHeat>
          <Time>sample string 5</Time>
        </TimePeriodInfo>
        <TimePeriodInfo>
          <Enabled>true</Enabled>
          <Index>1</Index>
          <TempCool>4</TempCool>
          <TempHeat>3</TempHeat>
          <Time>sample string 5</Time>
        </TimePeriodInfo>
      </TimePeriods>
    </ScheduleInfo>
  </SetPoints>
  <ThermostatID>1</ThermostatID>
</ThermostatSchedule>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

BaseResults

BaseResults
NameDescriptionTypeAdditional information
ResultCode

integer

None.

ResultData

string

None.

Response Formats

application/json, text/json

Sample:
{
  "ResultCode": 1,
  "ResultData": "sample string 2"
}

application/xml, text/xml

Sample:
<BaseResults xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TC2Utilities.RestApi">
  <ResultCode>1</ResultCode>
  <ResultData>sample string 2</ResultData>
</BaseResults>