Skip to content

Delete Thermostat Token

Permanently delete a given thermostat's SmartDeviceToken object.

Authentication Required

Requires account user level access.

Arguments

Returns

1
2
3
4
5
mutation deleteThermostatToken($input: DeleteThermostatTokenInput!) {
    deleteThermostatToken(input: $input) {
        status
    }
}
1
2
3
4
5
6
7
# Input variables
{
    "input": {
        "id": "",
        "accountNumber": "",
    }
}

Example

1
2
3
4
5
mutation deleteThermostatToken($input: DeleteThermostatTokenInput!) {
    deleteThermostatToken(input: $input) {
        status
    }
}
1
2
3
4
5
6
7
# Input variables
{
    "input": {
        "id": "740cb60f726748e68008dcf816498080",
        "accountNumber": "A-1234567",
    }
}
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())
1
2
3
4
5
 "data": {
        "deleteThermostatToken"{
            "status": "DELETED"
        }
    }
Back to top