Delete Thermostat Token¶
Permanently delete a given thermostat's SmartDeviceToken object.
Authentication Required
Requires account user level access.
-
Arguments
input
: DeleteThermostatTokenInput
-
Returns
Example¶
import pprint
import requests
# API_URL = "https://api.oeus-kraken.energy/v1/graphql/" # prod
API_URL = "https://api.oeus-kraken.systems/v1/graphql/" # test
JWT_TOKEN = "PLACE_JWT_TOKEN_HERE"
HEADERS = {
"Authorization": f"JWT {JWT_TOKEN}"
}
MUTATION = """
mutation deleteThermostatToken($input: DeleteThermostatTokenInput!) {
deleteThermostatToken(input: $input) {
status
}
}
"""
VARIABLES = {
"input": {
"id": "740cb60f726748e68008dcf816498080",
"accountNumber": "A-1234567",
}
}
session = requests.Session()
session.headers.update(HEADERS)
response = session.post(
url=API_URL,
json={"query": MUTATION, "variables": VARIABLES}
)
pprint.pprint(response.json())