REST API

Access

Get Access

GET /api/access

Parameters

authorization string or nullheader

Responses

200Successful Response
application/json array of object (Access)
_id stringrequired
agent stringrequired
apikey stringrequired
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Create Access

POST /api/access/

Parameters

authorization string or nullheader

Request body required

application/json object (AccessCreate)
agent stringrequired

Responses

200Successful Response
application/json object (Access)
_id stringrequired
agent stringrequired
apikey stringrequired
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Delete Access

DELETE /api/access/{apikey_id}

Parameters

apikey_id stringpathrequired
authorization string or nullheader

Responses

200Successful Response
application/json object (Access)
_id stringrequired
agent stringrequired
apikey stringrequired
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Backup

Get Backup

GET /api/backup

Parameters

authorization string or nullheader

Responses

200Successful Response
application/json any
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Restore Backup

PUT /api/backup

Parameters

authorization string or nullheader

Request body

application/json object or null

Responses

200Successful Response
application/json any
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Devices

Get Devices

GET /api/devices

Parameters

authorization string or nullheader

Responses

200Successful Response
application/json array of object (Device-Output)
description object (DeviceDescription)required
id stringrequired
attributes objectrequired
deviceInfo objectrequired
name object (DeviceName)required
defaultNames array of stringrequired
name stringrequired
nicknames array of stringrequired
traits array of stringrequired
type stringrequired
hide_from_google boolean or null
Default false
room string or null
Default ""
states objectrequired
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Create A Device

POST /api/devices

Parameters

authorization string or nullheader

Request body required

application/json object (Device-Input)
description object (DeviceDescription)required
id stringrequired
attributes objectrequired
deviceInfo objectrequired
name object (DeviceName)required
defaultNames array of stringrequired
name stringrequired
nicknames array of stringrequired
traits array of stringrequired
type stringrequired
hide_from_google boolean or null
Default false
room string or null
Default ""
states objectrequired

Responses

200Successful Response
application/json any
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Get A Device

GET /api/devices/{device_id}

Parameters

device_id stringpathrequired
authorization string or nullheader

Responses

200Successful Response
application/json object (Device-Output)
description object (DeviceDescription)required
id stringrequired
attributes objectrequired
deviceInfo objectrequired
name object (DeviceName)required
defaultNames array of stringrequired
name stringrequired
nicknames array of stringrequired
traits array of stringrequired
type stringrequired
hide_from_google boolean or null
Default false
room string or null
Default ""
states objectrequired
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Update A Device

PUT /api/devices/{device_id}

Parameters

device_id stringpathrequired
authorization string or nullheader

Request body required

application/json object (Device-Input)
description object (DeviceDescription)required
id stringrequired
attributes objectrequired
deviceInfo objectrequired
name object (DeviceName)required
defaultNames array of stringrequired
name stringrequired
nicknames array of stringrequired
traits array of stringrequired
type stringrequired
hide_from_google boolean or null
Default false
room string or null
Default ""
states objectrequired

Responses

200Successful Response
application/json any
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Delete A Device

DELETE /api/devices/{device_id}

Parameters

device_id stringpathrequired
authorization string or nullheader

Responses

200Successful Response
application/json any
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Get States Of A Device

GET /api/devices/{device_id}/states

Parameters

device_id stringpathrequired
authorization string or nullheader

Responses

200Successful Response
application/json object
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Update States Of A Device

PATCH /api/devices/{device_id}/states

Parameters

device_id stringpathrequired
authorization string or nullheader

Request body required

application/json object

Responses

200Successful Response
application/json any
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Get A State Of A Device

GET /api/devices/{device_id}/states/{state_name}

Parameters

device_id stringpathrequired
state_name stringpathrequired
authorization string or nullheader

Responses

200Successful Response
application/json any
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Logs

Get Log

GET /api/logs

Parameters

authorization string or nullheader

Responses

200Successful Response
application/json array of object (LogRegistry)
agent stringrequired
severity stringrequired
One of Warning Log Alert Info
message stringrequired
timestamp numberrequired
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Delete Log

DELETE /api/logs

Parameters

authorization string or nullheader

Responses

200Successful Response
application/json boolean
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Alerts

Get Alerts

GET /api/alerts

Parameters

authorization string or nullheader

Responses

200Successful Response
application/json object (Alerts)
alert stringrequired
One of set clear
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Settings

Get Settings

GET /api/settings

Parameters

authorization string or nullheader

Responses

200Successful Response
application/json object (Settings)
client_id stringrequired
client_secret stringrequired
ddns object (DDNS)required
enabled booleanrequired
hostname stringrequired
password stringrequired
provider stringrequired
username stringrequired
domain stringrequired
log object (Log)required
days integerrequired
mqtt object (MQTT)required
user stringrequired
password stringrequired
sync_devices booleanrequired
sync_google booleanrequired
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Update Settings

PATCH /api/settings

Parameters

authorization string or nullheader

Request body required

application/json object (PatchSettings)
client_id string or nullrequired
client_secret string or nullrequired
ddns object (DDNS) or nullrequired
enabled booleanrequired
hostname stringrequired
password stringrequired
provider stringrequired
username stringrequired
domain string or nullrequired
log object (Log) or nullrequired
days integerrequired
mqtt object (MQTT) or nullrequired
user stringrequired
password stringrequired
sync_devices boolean or nullrequired
sync_google boolean or nullrequired

Responses

200Successful Response
application/json object (Settings)
client_id stringrequired
client_secret stringrequired
ddns object (DDNS)required
enabled booleanrequired
hostname stringrequired
password stringrequired
provider stringrequired
username stringrequired
domain stringrequired
log object (Log)required
days integerrequired
mqtt object (MQTT)required
user stringrequired
password stringrequired
sync_devices booleanrequired
sync_google booleanrequired
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Set Service Account Key

PUT /api/settings/serviceaccountkey

Parameters

authorization string or nullheader

Request body required

application/json object (ServiceAccountKey)
type stringrequired
project_id stringrequired
private_key_id stringrequired
private_key stringrequired
client_email stringrequired
client_id stringrequired
auth_uri stringrequired
token_uri stringrequired
auth_provider_x509_cert_url stringrequired
client_x509_cert_url stringrequired
universe_domain stringrequired

Responses

200Successful Response
application/json any
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

System

Get System Version

GET /api/system/version

Parameters

authorization string or nullheader

Responses

200Successful Response
application/json object (Version)
version stringrequired
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Get System Status

GET /api/system/status

Parameters

authorization string or nullheader

Responses

200Successful Response
application/json object (SystemStatus)
api object (ComponentState)required
enable booleanrequired
status stringrequired
title stringrequired
mqtt object (ComponentState)required
enable booleanrequired
status stringrequired
title stringrequired
tasks object (ComponentState)required
enable booleanrequired
status stringrequired
title stringrequired
redis object (ComponentState)required
enable booleanrequired
status stringrequired
title stringrequired
mongo object (ComponentState)required
enable booleanrequired
status stringrequired
title stringrequired
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

User

Validate User Token

GET /api/user/validateToken

Parameters

token string or nullheader

Responses

200Successful Response
application/json object (TokenValidation)
valid booleanrequired
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

User Login

GET /api/user/login

Parameters

username string or nullheader
password string or nullheader

Responses

200Successful Response
application/json object (UserSesion)
username stringrequired
token stringrequired
valid booleanrequired
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Change User Password

PUT /api/user/password

Parameters

authorization string or nullheader

Request body

application/json object (Password) or null
password stringrequired
new_password stringrequired

Responses

200Successful Response
application/json any
422Validation Error
application/json object (HTTPValidationError)
detail array of object (ValidationError)
loc array of (string or integer)required
msg stringrequired
type stringrequired

Test

Test Endpoint

GET /test

Responses

200Successful Response
text/plain string

Clock

System Clock

GET /api/clock

Responses

200Successful Response
application/json any