{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/access":{"get":{"summary":"Get Access","operationId":"get_access_api_access_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Access"},"title":"Response Get Access Api Access Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/access/":{"patch":{"summary":"Update Access","operationId":"update_access_api_access__patch","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Access"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/backup":{"get":{"summary":"Get Backup","operationId":"get_backup_api_backup_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Restore Backup","operationId":"restore_backup_api_backup_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}],"title":"Backup"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devices":{"get":{"summary":"Get Devices","operationId":"get_devices_api_devices_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Device-Output"},"title":"Response Get Devices Api Devices Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create A Device","operationId":"create_a_device_api_devices_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device-Input"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devices/{device_id}":{"get":{"summary":"Get A Device","operationId":"get_a_device_api_devices__device_id__get","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device-Output"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update A Device","operationId":"update_a_device_api_devices__device_id__put","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Device-Input"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete A Device","operationId":"delete_a_device_api_devices__device_id__delete","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devices/{device_id}/states":{"get":{"summary":"Get States Of A Device","operationId":"get_states_of_a_device_api_devices__device_id__states_get","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get States Of A Device Api Devices Device Id States Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update States Of A Device","operationId":"update_states_of_a_device_api_devices__device_id__states_patch","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"States"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/devices/{device_id}/states/{state_name}":{"get":{"summary":"Get A State Of A Device","operationId":"get_a_state_of_a_device_api_devices__device_id__states__state_name__get","parameters":[{"name":"device_id","in":"path","required":true,"schema":{"type":"string","title":"Device Id"}},{"name":"state_name","in":"path","required":true,"schema":{"type":"string","title":"State Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/logs":{"get":{"summary":"Get Log","operationId":"get_log_api_logs_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LogRegistry"},"title":"Response Get Log Api Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Log","operationId":"delete_log_api_logs_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"boolean","title":"Response Delete Log Api Logs Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/alerts":{"get":{"summary":"Get Alerts","operationId":"get_alerts_api_alerts_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Alerts"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/settings":{"get":{"summary":"Get Settings","operationId":"get_settings_api_settings_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Settings","operationId":"update_settings_api_settings_patch","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchSettings"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/settings/serviceaccountkey":{"put":{"summary":"Set Service Account Key","operationId":"set_service_account_key_api_settings_serviceaccountkey_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceAccountKey"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/version":{"get":{"summary":"Get System Version","operationId":"get_system_version_api_system_version_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/system/status":{"get":{"summary":"Get System Status","operationId":"get_system_status_api_system_status_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/validateToken":{"get":{"summary":"Validate User Token","operationId":"validate_user_token_api_user_validateToken_get","parameters":[{"name":"token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenValidation"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/login":{"get":{"summary":"User Login","operationId":"user_login_api_user_login_get","parameters":[{"name":"username","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username"}},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSesion"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/user/password":{"put":{"summary":"Change User Password","operationId":"change_user_password_api_user_password_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Password"},{"type":"null"}],"title":"Password"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/test":{"get":{"summary":"Test Endpoint","operationId":"test_endpoint_test_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/clock":{"get":{"summary":"System Clock","operationId":"system_clock_api_clock_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Access":{"properties":{"apikey":{"type":"string","title":"Apikey"}},"type":"object","required":["apikey"],"title":"Access"},"AlertState":{"type":"string","enum":["set","clear"],"title":"AlertState"},"Alerts":{"properties":{"alert":{"$ref":"#/components/schemas/AlertState"}},"type":"object","required":["alert"],"title":"Alerts"},"ComponentState":{"properties":{"enable":{"type":"boolean","title":"Enable"},"status":{"type":"string","title":"Status"},"title":{"type":"string","title":"Title"}},"type":"object","required":["enable","status","title"],"title":"ComponentState"},"DDNS":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"hostname":{"type":"string","title":"Hostname"},"password":{"type":"string","title":"Password"},"provider":{"type":"string","title":"Provider"},"username":{"type":"string","title":"Username"}},"type":"object","required":["enabled","hostname","password","provider","username"],"title":"DDNS"},"Device-Input":{"properties":{"description":{"$ref":"#/components/schemas/DeviceDescription"},"states":{"additionalProperties":true,"type":"object","title":"States"}},"type":"object","required":["description","states"],"title":"Device"},"Device-Output":{"properties":{"description":{"$ref":"#/components/schemas/DeviceDescription"},"states":{"additionalProperties":true,"type":"object","title":"States"}},"type":"object","required":["description","states"],"title":"Device"},"DeviceDescription":{"properties":{"id":{"type":"string","title":"Id"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"deviceInfo":{"additionalProperties":true,"type":"object","title":"Deviceinfo"},"name":{"$ref":"#/components/schemas/DeviceName"},"traits":{"items":{"type":"string"},"type":"array","title":"Traits"},"type":{"type":"string","title":"Type"}},"type":"object","required":["id","attributes","deviceInfo","name","traits","type"],"title":"DeviceDescription"},"DeviceName":{"properties":{"defaultNames":{"items":{"type":"string"},"type":"array","title":"Defaultnames"},"name":{"type":"string","title":"Name"},"nicknames":{"items":{"type":"string"},"type":"array","title":"Nicknames"}},"type":"object","required":["defaultNames","name","nicknames"],"title":"DeviceName"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Log":{"properties":{"days":{"type":"integer","title":"Days"}},"type":"object","required":["days"],"title":"Log"},"LogRegistry":{"properties":{"agent":{"type":"string","title":"Agent"},"severity":{"$ref":"#/components/schemas/Severity"},"message":{"type":"string","title":"Message"},"timestamp":{"type":"number","title":"Timestamp"}},"type":"object","required":["agent","severity","message","timestamp"],"title":"LogRegistry"},"MQTT":{"properties":{"user":{"type":"string","title":"User"},"password":{"type":"string","title":"Password"}},"type":"object","required":["user","password"],"title":"MQTT"},"Password":{"properties":{"password":{"type":"string","title":"Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["password","new_password"],"title":"Password"},"PatchSettings":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"ddns":{"anyOf":[{"$ref":"#/components/schemas/DDNS"},{"type":"null"}]},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"log":{"anyOf":[{"$ref":"#/components/schemas/Log"},{"type":"null"}]},"mqtt":{"anyOf":[{"$ref":"#/components/schemas/MQTT"},{"type":"null"}]},"sync_devices":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Devices"},"sync_google":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sync Google"}},"type":"object","required":["client_id","client_secret","ddns","domain","log","mqtt","sync_devices","sync_google"],"title":"PatchSettings"},"ServiceAccountKey":{"properties":{"type":{"type":"string","title":"Type"},"project_id":{"type":"string","title":"Project Id"},"private_key_id":{"type":"string","title":"Private Key Id"},"private_key":{"type":"string","title":"Private Key"},"client_email":{"type":"string","title":"Client Email"},"client_id":{"type":"string","title":"Client Id"},"auth_uri":{"type":"string","title":"Auth Uri"},"token_uri":{"type":"string","title":"Token Uri"},"auth_provider_x509_cert_url":{"type":"string","title":"Auth Provider X509 Cert Url"},"client_x509_cert_url":{"type":"string","title":"Client X509 Cert Url"},"universe_domain":{"type":"string","title":"Universe Domain"}},"type":"object","required":["type","project_id","private_key_id","private_key","client_email","client_id","auth_uri","token_uri","auth_provider_x509_cert_url","client_x509_cert_url","universe_domain"],"title":"ServiceAccountKey"},"Settings":{"properties":{"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"},"ddns":{"$ref":"#/components/schemas/DDNS"},"domain":{"type":"string","title":"Domain"},"log":{"$ref":"#/components/schemas/Log"},"mqtt":{"$ref":"#/components/schemas/MQTT"},"sync_devices":{"type":"boolean","title":"Sync Devices"},"sync_google":{"type":"boolean","title":"Sync Google"}},"type":"object","required":["client_id","client_secret","ddns","domain","log","mqtt","sync_devices","sync_google"],"title":"Settings"},"Severity":{"type":"string","enum":["Warning","Log","Alert","Info"],"title":"Severity"},"SystemStatus":{"properties":{"api":{"$ref":"#/components/schemas/ComponentState"},"mqtt":{"$ref":"#/components/schemas/ComponentState"},"tasks":{"$ref":"#/components/schemas/ComponentState"},"redis":{"$ref":"#/components/schemas/ComponentState"},"mongo":{"$ref":"#/components/schemas/ComponentState"}},"type":"object","required":["api","mqtt","tasks","redis","mongo"],"title":"SystemStatus"},"TokenValidation":{"properties":{"valid":{"type":"boolean","title":"Valid"}},"type":"object","required":["valid"],"title":"TokenValidation"},"UserSesion":{"properties":{"username":{"type":"string","title":"Username"},"token":{"type":"string","title":"Token"},"valid":{"type":"boolean","title":"Valid"}},"type":"object","required":["username","token","valid"],"title":"UserSesion"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Version":{"properties":{"version":{"type":"string","title":"Version"}},"type":"object","required":["version"],"title":"Version"}}}}