get user preference
curl --request POST \
--url https://api.example.com/v1/devices/hvac/{id}/user_preferences/get \
--header 'x-ws-api-key: <api-key>'import requests
url = "https://api.example.com/v1/devices/hvac/{id}/user_preferences/get"
headers = {"x-ws-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-ws-api-key': '<api-key>'}};
fetch('https://api.example.com/v1/devices/hvac/{id}/user_preferences/get', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/devices/hvac/{id}/user_preferences/get",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-ws-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/devices/hvac/{id}/user_preferences/get"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-ws-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/devices/hvac/{id}/user_preferences/get")
.header("x-ws-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/devices/hvac/{id}/user_preferences/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ws-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"name": "Weekday comfort",
"tempUnits": "F",
"defaultMode": "AUTO",
"defaultMaxTemp": 75,
"defaultMinTemp": 65,
"defaultCoolSetpoint": 74,
"defaultHeatSetpoint": 68,
"scheduleBlocks": [
{
"startTimeMinutes": 0,
"endTimeMinutes": 480,
"mode": "HEAT",
"targetCoolSetpoint": null,
"targetHeatSetpoint": 68,
"maxTemp": 75,
"minTemp": 65,
"daysOfWeek": [
1,
2,
3,
4,
5
],
"scheduleType": "RECURRING"
},
{
"startTimeMinutes": 480,
"endTimeMinutes": 1440,
"mode": "AUTO",
"targetCoolSetpoint": 74,
"targetHeatSetpoint": 68,
"maxTemp": 75,
"minTemp": 65,
"daysOfWeek": [
1,
2,
3,
4,
5
],
"scheduleType": "RECURRING"
}
]
}hvac
get user preference
POST
/
v1
/
devices
/
hvac
/
{id}
/
user_preferences
/
get
get user preference
curl --request POST \
--url https://api.example.com/v1/devices/hvac/{id}/user_preferences/get \
--header 'x-ws-api-key: <api-key>'import requests
url = "https://api.example.com/v1/devices/hvac/{id}/user_preferences/get"
headers = {"x-ws-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-ws-api-key': '<api-key>'}};
fetch('https://api.example.com/v1/devices/hvac/{id}/user_preferences/get', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/devices/hvac/{id}/user_preferences/get",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-ws-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/devices/hvac/{id}/user_preferences/get"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-ws-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/devices/hvac/{id}/user_preferences/get")
.header("x-ws-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/devices/hvac/{id}/user_preferences/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ws-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"name": "Weekday comfort",
"tempUnits": "F",
"defaultMode": "AUTO",
"defaultMaxTemp": 75,
"defaultMinTemp": 65,
"defaultCoolSetpoint": 74,
"defaultHeatSetpoint": 68,
"scheduleBlocks": [
{
"startTimeMinutes": 0,
"endTimeMinutes": 480,
"mode": "HEAT",
"targetCoolSetpoint": null,
"targetHeatSetpoint": 68,
"maxTemp": 75,
"minTemp": 65,
"daysOfWeek": [
1,
2,
3,
4,
5
],
"scheduleType": "RECURRING"
},
{
"startTimeMinutes": 480,
"endTimeMinutes": 1440,
"mode": "AUTO",
"targetCoolSetpoint": 74,
"targetHeatSetpoint": 68,
"maxTemp": 75,
"minTemp": 65,
"daysOfWeek": [
1,
2,
3,
4,
5
],
"scheduleType": "RECURRING"
}
]
}Authorizations
WattShift API key
Headers
WattShift API Key
Path Parameters
Response
200 - application/json
The human-readable name for the schedule
Minimum string length:
10 or more blocks for this schedule to follow. If no blocks are added, the default temp will be followed
Show child attributes
Show child attributes
Whether this schedule should be enabled
The units for temperature.
Available options:
F, C The week numbers to apply this schedule. For example, [0,1,2,...,51] applies to all 52 weeks of the year. Leave empty to also apply to all weeks.
Required range:
0 < x < 52The default mode for the HVAC unit.
Available options:
OFF, HEAT, COOL, AUTO Required range:
-50 < x < 200The current temperature
Required range:
-50 < x < 200The target temperature
Required range:
-50 < x < 200The target cool setpoint
Required range:
-50 < x < 200The target heat setpoint
Required range:
-50 < x < 200The max default temperature
Required range:
-50 < x < 200The min default temperature
Required range:
-50 < x < 200