{"openapi":"3.0.0","info":{"title":"115","version":"1.0.0"},"servers":[{"url":"http://{{host}}"},{"url":"https://backend.vht-iot.vn"}],"tags":[{"name":"token"},{"name":"Device"},{"name":"Device > templates"},{"name":"Users"},{"name":"Users > app"},{"name":"Users > app > VHOME"},{"name":"Organization"},{"name":"project"},{"name":"roles"},{"name":"Group"},{"name":"eventaction"},{"name":"events"},{"name":"attributes"},{"name":"minio"}],"paths":{"/api/devicetokens":{"get":{"tags":["token"],"summary":"Get devices token","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/templates/{template_id}":{"get":{"tags":["Device > templates"],"summary":"get template by id","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"template_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"delete":{"tags":["Device > templates"],"summary":"Delete template","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{user_token}}"},{"name":"template_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"put":{"tags":["Device > templates"],"summary":"Update template","description":"    ","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"name":"template_test","rule_chain_id":"{{rule_chain_id}}"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{user_token}}"},{"name":"template_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/templates":{"get":{"tags":["Device > templates"],"summary":"get templates","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"10"},{"name":"project_id","in":"query","schema":{"type":"string"},"example":"{{project_id}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"post":{"tags":["Device > templates"],"summary":"create template","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"name":"test template1","project_id":"{{project_id}}"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices/templates/{template_id}":{"get":{"tags":["Device > templates"],"summary":"GET devices by template","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"10"},{"name":"template_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"delete":{"tags":["Device > templates"],"summary":"delete devices in template","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"template_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices":{"post":{"tags":["Device"],"summary":"Pair devices","description":"    ","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"name":"device test #123","provision_key":"{{provision_key}}","provision_secret":"{{provision_secret}}","metadate":{}}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"get":{"tags":["Device"],"summary":"Get devices","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"query","schema":{"type":"string"},"example":"{{project_id}}"},{"name":"org_id","in":"query","schema":{"type":"string"},"example":"{{org_id}}"},{"name":"created_by","in":"query","schema":{"type":"string"},"example":"{{user_id}}"},{"name":"expand","in":"query","schema":{"type":"boolean"},"example":"true"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices/bulk":{"post":{"tags":["Device"],"summary":"create devices","description":"    ","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"devices":[{"name":"device test #1234","project_id":"{{project_id}}","key":"unique key","org_id":"{{org_id}}","group_id":"{{group_id}}","type_id":"{{type_id}}","template_id":"{{template_id}}","metadata":{},"attributes":[{"attribute_type":"SCOPE_SERVER","attribute_key":"temperture","logged":true,"value":"35","value_t":"BDL"},{"attribute_type":"SCOPE_SERVER","attribute_key":"swicth_on","logged":false,"value":"true","value_t":"BOOL"}]}]}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices/attributes":{"post":{"tags":["Device"],"summary":"Get devices by attributes","description":"    ","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"type":"OR","queries":[{"value":"content","key":"stringone"},{"value":"content","key":"stringtwo"}]}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"put":{"tags":["Device"],"summary":"Create attribute for exist device","description":"    ","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"device_id":"7536ea70-2299-4f0a-b692-55064e9f0004","attributes":[{"attribute_type":"SCOPE_SERVER","attribute_key":"device attribute 2","logged":false,"value":"{\"test\":\"test\"}","value_t":"JSON"},{"attribute_type":"SCOPE_SERVER","attribute_key":"device attribute lat","logged":false,"value":"20","value_t":"DBL"},{"attribute_type":"SCOPE_SERVER","attribute_key":"device attribute long","logged":false,"value":"20","value_t":"DBL"}]}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices/{device_id}":{"put":{"tags":["Device"],"summary":"Update device","description":"    ","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"name":"thiết bị 555555","key":"{{device_key}}","group_id":"{{group_id}}","status":"status","metadata":{}}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"get":{"tags":["Device"],"summary":"Get devices by id","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"delete":{"tags":["Device"],"summary":"Delete device","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices/{device_id}/active":{"put":{"tags":["Device"],"summary":"active device","description":"    ","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":""}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices/{device_id}/deactive":{"put":{"tags":["Device"],"summary":"deactive device","description":"    ","requestBody":{"content":{}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices/group/{group_id}":{"get":{"tags":["Device"],"summary":"Get devices by group","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"group_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices/type/{type_id}":{"get":{"tags":["Device"],"summary":"Get devices by type","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{user_token}}"},{"name":"type_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices/organization/{org_id}":{"get":{"tags":["Device"],"summary":"Get devices by org","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{user_token}}"},{"name":"project_id","in":"query","schema":{"type":"string"},"example":"{{project_id}}"},{"name":"expand","in":"query","schema":{"type":"boolean"},"example":"true"},{"name":"org_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices/{device_id}/group/{group_id}":{"delete":{"tags":["Device"],"summary":"remove device from group","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true},{"name":"group_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"put":{"tags":["Device"],"summary":"Update device group","description":"    ","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"name":"nicename2"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true},{"name":"group_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices/{device_id}/type/{type_id}":{"delete":{"tags":["Device"],"summary":"remove device type","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true},{"name":"type_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"put":{"tags":["Device"],"summary":"Update device type","description":"    ","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"name":"nicename2"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true},{"name":"type_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices/{device_id}/organization/{org_id}":{"put":{"tags":["Device"],"summary":"Update device to organization","description":"    ","requestBody":{"content":{}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true},{"name":"org_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/devices/organization":{"put":{"tags":["Device"],"summary":"change org","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"ids":["{{device_id1}}","{{device_id2}}","{{device_id3}}"],"org_id":"{{org_id}}"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/vhome/account/phone":{"put":{"tags":["Users > app > VHOME"],"summary":"update phone","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"accountId":"3cd59402-e550-490a-8519-9ba6d1a4b487","newphone":"0961106057"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/vhome/account/register":{"post":{"tags":["Users > app > VHOME"],"summary":"register vhome users","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"accountId":"3cd59402-e550-490a-8519-9ba6d1a4b487","phone":"0961106057","password":"1234a@","subscription":"1"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/vhome/account/suspend":{"post":{"tags":["Users > app > VHOME"],"summary":"vhome suspend","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"accountId":"3cd59402-e550-490a-8519-9ba6d1a4b487","suspend_type":"1"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/vhome/account/resume":{"post":{"tags":["Users > app > VHOME"],"summary":"vhome resume","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"accountId":"3cd59402-e550-490a-8519-9ba6d1a4b487","resume_type":"1"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/vhome/device/bind":{"post":{"tags":["Users > app > VHOME"],"summary":"bind device","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"accountId":"3cd59402-e550-490a-8519-9ba6d1a4b487","serialNumber":"serial-1234"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/vhome/device/unbind":{"post":{"tags":["Users > app > VHOME"],"summary":"unbind","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"accountId":"3cd59402-e550-490a-8519-9ba6d1a4b497","serialNumber":"serial-1234"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/vhome/account/delete":{"delete":{"tags":["Users > app > VHOME"],"summary":"delete account","parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/vhome/account/resetpassword":{"put":{"tags":["Users > app > VHOME"],"summary":"resetpassword","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"accountId":"3cd59402-e550-490a-8519-9ba6d1a4b487","newpassword":"1234a@qwer"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/app/otp/login":{"post":{"tags":["Users > app"],"summary":"login with phone and otp","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"phone":"0123456789","otp":"{{otp}}"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/app/otp/newpassword":{"put":{"tags":["Users > app"],"summary":"set newpassword with otp","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"phone":"0123456789","password":"123456@","otp":"{{otp}}"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/app/login":{"post":{"tags":["Users > app"],"summary":"app user login","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"identifier":"0123456789","password":"1234a@qwer"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/app/otp":{"post":{"tags":["Users > app"],"summary":"create otp","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"phone":"0123456789","otp_type":"login"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/app/users":{"post":{"tags":["Users > app"],"summary":"get app user info","requestBody":{"content":{}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"},{"name":"phone","in":"query","schema":{"type":"integer"},"example":"0123456789"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/app/otp/confirm":{"post":{"tags":["Users > app"],"summary":"confirm otp","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"phone":"0123456789","otp":"{{otp}}"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/app/otp/register":{"post":{"tags":["Users > app"],"summary":"register app user","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"name":"test","role_id":"{{role_id}}","group_id":"{{group_id}}","org_id":"{{org_id}}","phone":"0123456789","password":"test1a@","otp":"{{otp}}"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/app/removetokens":{"post":{"tags":["Users > app"],"summary":"remove user tokens","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"identifier":"0123456789"}}}}},"parameters":[{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/adminregister":{"post":{"tags":["Users"],"summary":"Register admin account","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"email":"testemail@test.com","password":"1234a@qwer"}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/login":{"post":{"tags":["Users"],"summary":"Login","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"identifier":"test@viettel.com.vn","password":"test1a@"}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/resettoken":{"get":{"tags":["Users"],"summary":"reset token","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/ezviztoken":{"get":{"tags":["Users"],"summary":"get exviztoken","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/users/self":{"get":{"tags":["Users"],"summary":"get self user info","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"put":{"tags":["Users"],"summary":"self user update info","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"phone":"0123456789","password":"newpassword","name":"username","email":"test1@test.com"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/users":{"post":{"tags":["Users"],"summary":"Create user con","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"email":"test12@email.com","password":"1234a@qwer","project_id":"{{projectIDDD}}","org_id":"{{orgIDDD}}","role_id":"{{role_id}}","group_id":"{{group_id}}","name":"name"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"get":{"tags":["Users"],"summary":"Get user","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"query","schema":{"type":"string"},"example":"{{project_id}}"},{"name":"org_id","in":"query","schema":{"type":"string"},"example":"{{org_id}}"},{"name":"phone","in":"query","schema":{"type":"integer"},"example":"096"},{"name":"name","in":"query","schema":{"type":"string"},"example":"test"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"10"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/users/systemconfig":{"post":{"tags":["Users"],"summary":"update user systemconfig","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"system_config":{"test":"test123","mail":{"test":"test","abc":"abc"}}}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/users/changepassword":{"post":{"tags":["Users"],"summary":"change password","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"new_password":"1234a@qwer","old_password":"123456a@"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/users/organization/{org_id}":{"get":{"tags":["Users"],"summary":"Get users by org","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"query","schema":{"type":"string"},"example":"{{project_id}}"},{"name":"phone","in":"query","schema":{"type":"integer"},"example":"096"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"10"},{"name":"org_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/users/{user_id}":{"put":{"tags":["Users"],"summary":"Update user","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"role_id":"{{role_id}}","group_id":"{{group_id}}","phone":"0123456789","password":"password","name":"test","email":"testemail@test.com"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"user_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"delete":{"tags":["Users"],"summary":"delete users","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"user_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/users/{user_id}/suspend":{"put":{"tags":["Users"],"summary":"suspend/active user","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"suspend":false}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"user_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/error/{error_code}":{"get":{"tags":["Users"],"summary":"get error by code","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"error_code","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/organizations":{"post":{"tags":["Organization"],"summary":"Create organizations","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"name":"org test user #1.1","description":"description","group_id":"{{group_id}}","project_id":"{{projectIDDD}}","org_id":"{{orgIDDD}}","image":"image link","attributes":[{"attribute_type":"SCOPE_SERVER","attribute_key":"phone","logged":false,"value":"0123456789","value_t":"STR"},{"attribute_type":"SCOPE_SERVER","attribute_key":"address","logged":false,"value":"hanoi, vietnam","value_t":"STR"}]}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"get":{"tags":["Organization"],"summary":"Get organizations","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"query","schema":{"type":"string"},"example":"{{project_id}}"},{"name":"org_id","in":"query","schema":{"type":"string"},"example":"{{org_id}}"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"10"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/organizations/attributes":{"post":{"tags":["Organization"],"summary":"get org by attributes","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"type":"AND","queries":[{"key":"phone","value":"0123"},{"key":"address","value":"hanoi"}]}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"10"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/organizations/index":{"post":{"tags":["Organization"],"summary":"update index","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"org_id":"{{org_id}}","project_id":"{{project_id}}","subs":[{"id":"{{org_id1}}"},{"id":"{{org_id2}}"},{"id":"{{org_id3}}"}]}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/organizations/{org_id}":{"get":{"tags":["Organization"],"summary":"Get organizations by id","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"org_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"put":{"tags":["Organization"],"summary":"Update organization","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"image":"hfghgfhgfhfg","group_id":"{{group_id}}","name":"name","description":"description"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"org_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"delete":{"tags":["Organization"],"summary":"Delete organization","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"org_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/organizations/expand":{"get":{"tags":["Organization"],"summary":"Get organizations expand","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"query","schema":{"type":"string"},"example":"{{project_id}}"},{"name":"org_id","in":"query","schema":{"type":"string"},"example":"{{org_id}}"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"10"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/organizations/organization":{"put":{"tags":["Organization"],"summary":"change org","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"ids":["{{org_id1}}","{{org_id2}}","{{org_id3}}"],"org_id":"{{org_id}}"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/projects":{"get":{"tags":["project"],"summary":"get project","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"post":{"tags":["project"],"summary":"Create Project","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"name":"fake smarthome #1","description":"SH#1","image":"image link","sms_config":{"type":"VT_BRAND_NAME","config":{"code":"VTAG","password":"479B@#123","service_id":"VTAG","url":"http://ams.tinnhanthuonghieu.vn:8009/bulkapi?wsdl","user":"vtag"},"content":"[VTAG] Vui lòng nhập mã OTP {otp} trên app vTag để đăng ký tài khoản mới.","reset_password_content":"Mã OTP của quý khách để đặt lại mật khẩu mới cho tài khoản VTAG là 038467, vui lòng không cung cấp mã này cho bất kì ai."}}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/projects/{project_id}":{"delete":{"tags":["project"],"summary":"delete","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"get":{"tags":["project"],"summary":"get project by id","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/projects/a802cfe5-ae6b-4381-97ab-494b9277ea63":{"put":{"tags":["project"],"summary":"update project","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"name":"fake smarthome #1","description":"SH#1","image":"image link","sms_config":{"type":"VT_BRAND_NAME","config":{"code":"VTAG","password":"479B@#123","service_id":"VTAG","url":"http://ams.tinnhanthuonghieu.vn:8009/bulkapi?wsdl","user":"vtag"},"content":"[VTAG] Vui lòng nhập mã OTP {otp} trên app vTag để đăng ký tài khoản mới.","reset_password_content":"Mã OTP của quý khách để đặt lại mật khẩu mới cho tài khoản VTAG là 038467, vui lòng không cung cấp mã này cho bất kì ai."}}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/projects/dataoverview/{project_id}":{"get":{"tags":["project"],"summary":"data overview","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/roles":{"post":{"tags":["roles"],"summary":"create role","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"name":"default role admin project","org_id":"","project_id":"{{project_id}}","policies":[{"type":"generic","resources":["users","groups","templates","events","organizations","roles","devices"],"actions":["read","create","modify","delete"]}]}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"get":{"tags":["roles"],"summary":"get list roles","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"query","schema":{"type":"string"},"example":"{{project_id}}"},{"name":"org_id","in":"query","schema":{"type":"string"},"example":"{{org_id}}"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"10"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/roles/customer":{"post":{"tags":["roles"],"summary":"create customer role","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"group_id":"{{group_id}}","user_id":"{{user_id}}"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/roles/{role_id}":{"put":{"tags":["roles"],"summary":"update role","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"name":"role org 1","policies":[{"type":"generic","resources":["devices"],"actions":["read"]},{"type":"generic","resources":["organizations"],"actions":["read","create","modify","delete"]},{"type":"generic","resources":["roles"],"actions":["read","create","modify","delete"]},{"type":"generic","resources":["users","groups"],"actions":["read","create","modify","delete"]}]}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"role_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"get":{"tags":["roles"],"summary":"get single role","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"role_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"delete":{"tags":["roles"],"summary":"delete role","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"role_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/groups":{"post":{"tags":["Group"],"summary":"create group","description":"    ","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"name":"test group","org_id":"{{orgIDDD}}","project_id":"{{projectIDDD}}","entity_type":"DEVICE","metadata":{"test":"test"}}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"get":{"tags":["Group"],"summary":"Get groups","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"query","schema":{"type":"string"},"example":"{{project_id}}"},{"name":"org_id","in":"query","schema":{"type":"string"},"example":"{{org_id}}"},{"name":"entity_type","in":"query","schema":{"type":"string"},"example":"DEVICE"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"10"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/groups/{group_name}/{group_type}":{"get":{"tags":["Group"],"summary":"Get groups by name and type","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"group_name","in":"path","schema":{"type":"string"},"required":true},{"name":"group_type","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/groups/organization":{"put":{"tags":["events"],"summary":"change org","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"ids":["{{group_id1}}","{{group_id2}}","{{group_id3}}"],"org_id":"{{org_id}}"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/groups/{group_id}":{"delete":{"tags":["Group"],"summary":"delete group","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"group_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"get":{"tags":["Group"],"summary":"Get group by id","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"group_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/groups/{group_id}/organization/{org_id}":{"post":{"tags":["Group"],"summary":"add org","description":"    ","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"Name":" test doi ten group 2434"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"group_id","in":"path","schema":{"type":"string"},"required":true},{"name":"org_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"delete":{"tags":["Group"],"summary":"remove org","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"group_id","in":"path","schema":{"type":"string"},"required":true},{"name":"org_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/groups/attributes":{"post":{"tags":["Group"],"summary":"Get groups by attributes","description":"    ","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"type":"OR","queries":[{"value":"content1","key":"stringone"},{"value":"content1","key":"stringtwo"}]}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"10"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/groups/{group_id}/subgroups/{sub_group_id}":{"put":{"tags":["Group"],"summary":"add group to group","description":"    ","requestBody":{"content":{}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"group_id","in":"path","schema":{"type":"string"},"required":true},{"name":"sub_group_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"delete":{"tags":["Group"],"summary":"remove group from group","description":"    ","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"group_id","in":"path","schema":{"type":"string"},"required":true},{"name":"sub_group_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/eventaction/sendemail":{"post":{"tags":["eventaction"],"summary":"send mail","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"mailto":"quocnb1@viettel.com.vn","subject":"test send mail","msg":"truong test"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/eventaction/sendsms318":{"post":{"tags":["eventaction"],"summary":"send sms","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"phone":"0867998110","content":"test send sms"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/events":{"post":{"tags":["events"],"summary":"create event","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"project_id":"{{project_id}}","org_id":"{{org_id}}","group_id":"{{group_id}}","name":"project event 2","onClick":true,"condition":[{"device_id":"{{device_id}}","device_name":"device_name","attribute_name":"humidity","condition_type":"condition_type","operator":">","threshold":"50","logical_operator":"and"}],"schedule":{"time":"00:00","repeat":"10"},"interval":{"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":true,"saturday":true,"sunday":true,"start_time":"00:00","end_time":"23:59"},"action":[{"action_type":"sms","receiver":"0123456789","subject":"test","message":"trigger event success"}],"status":true}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"get":{"tags":["events"],"summary":"get-list event","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"query","schema":{"type":"string"},"example":"{{project_id}}"},{"name":"org_id","in":"query","schema":{"type":"string"},"example":"{{org_id}}"},{"name":"group_id","in":"query","schema":{"type":"string"},"example":"{{group_id}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/events/schedule":{"post":{"tags":["events"],"summary":"create schedule","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"project_id":"{{project_id}}","org_id":"{{org_id}}","group_id":"{{group_id}}","name":"project event","condition":[{"device_id":"{{device_id}}","device_name":"device_name","attribute_name":"humidity","condition_type":"condition_type","operator":">","threshold":"50","logical_operator":"and"}],"schedule":{"time":"00:00","repeat":"10"},"interval":{"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":true,"saturday":true,"sunday":true,"start_time":"00:00","end_time":"23:59"},"action":[{"action_type":"sms","receiver":"0123456789","subject":"test","message":"trigger event success"}],"status":true}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/events/schedule/{event_id}":{"put":{"tags":["events"],"summary":"update schedule","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"project_id":"{{project_id}}","group_id":"{{group_id}}","name":"project event 2","condition":[{"device_id":"{{device_id}}","device_name":"device_name","attribute_name":"humidity","condition_type":"condition_type","operator":">","threshold":"50","logical_operator":"and"}],"interval":{"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":true,"saturday":true,"sunday":true,"start_time":"00:00","end_time":"23:59"},"schedule":{"time":"00:00","repeat":"10"},"action":[{"action_type":"sms","receiver":"0123456789","subject":"test","message":"trigger event success"}],"status":true}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"event_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/events/devices/{device_id}":{"get":{"tags":["events"],"summary":"get even by device","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"query","schema":{"type":"string"},"example":"{{project_id}}"},{"name":"org_id","in":"query","schema":{"type":"string"},"example":"{{org_id}}"},{"name":"group_id","in":"query","schema":{"type":"string"},"example":"{{group_id}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/events/receiver/{user_id}":{"get":{"tags":["events"],"summary":"get even by receiver","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"query","schema":{"type":"string"},"example":"{{project_id}}"},{"name":"org_id","in":"query","schema":{"type":"string"},"example":"{{org_id}}"},{"name":"group_id","in":"query","schema":{"type":"string"},"example":"{{group_id}}"},{"name":"user_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/events/history":{"get":{"tags":["events"],"summary":"get event history","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"org_id","in":"query","schema":{"type":"string"},"example":"{{org_id}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/events/info":{"get":{"tags":["events"],"summary":"get event info","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"project_id","in":"query","schema":{"type":"string"},"example":"{{project_id}}"},{"name":"org_id","in":"query","schema":{"type":"string"},"example":"{{org_id}}"},{"name":"group_id","in":"query","schema":{"type":"string"},"example":"{{group_id}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/events/{event_id}":{"get":{"tags":["events"],"summary":"get event by id","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"event_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"put":{"tags":["events"],"summary":"update event","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"org_id":"{{org_id}}","name":"project event 2","condition":[{"device_id":"{{device_id}}","device_name":"device_name","attribute_name":"humidity","condition_type":"condition_type","operator":">","threshold":"50","logical_operator":"and"}],"interval":{"monday":true,"tuesday":true,"wednesday":true,"thursday":true,"friday":true,"saturday":true,"sunday":true,"start_time":"00:00","end_time":"23:59"},"action":[{"action_type":"sms","receiver":"0123456789","subject":"test","message":"trigger event success"}],"status":true}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"event_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"delete":{"tags":["events"],"summary":"delete event","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"event_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/events/{event_id}/activate":{"post":{"tags":["events"],"summary":"active event","requestBody":{"content":{}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"event_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/events/{event_id}/deactive":{"post":{"tags":["events"],"summary":"deactive event","requestBody":{"content":{}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"event_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/attributes":{"post":{"tags":["attributes"],"summary":"create entity attribute","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"entity_id":"{{device_id}}","entity_type":"DEVICE","attributes":[{"attribute_type":"SCOPE_SERVER","attribute_key":"test","logged":false,"value":"[{\"test1\":\"test1\"},{\"test2\":\"test2\"}]","value_t":"JSON"}]}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/attributes/DEVICE/{device_id}/values":{"get":{"tags":["attributes"],"summary":"get attributes","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"100"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"delete":{"tags":["attributes"],"summary":"delete all attributes","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"put":{"tags":["attributes"],"summary":"update mutiple attributes","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"attributes":[{"attribute_type":"SCOPE_SERVER","attribute_key":"temperture","new_attribute_key":"temperture4","logged":true,"value":"11","value_t":"DBL"},{"attribute_type":"SCOPE_SERVER","attribute_key":"temperture2","new_attribute_key":"temperture5","logged":true,"value":"11","value_t":"DBL"},{"attribute_type":"SCOPE_SERVER","attribute_key":"temperture3","new_attribute_key":"temperture6","logged":false,"value":"11","value_t":"DBL"}]}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"post":{"tags":["attributes"],"summary":"upsert mutiple attributes","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"attributes":[{"attribute_type":"SCOPE_SERVER","attribute_key":"temperture","new_attribute_key":"temperture4","logged":true,"value":"11","value_t":"DBL"},{"attribute_type":"SCOPE_SERVER","attribute_key":"temperture2","new_attribute_key":"temperture5","logged":true,"value":"11","value_t":"DBL"},{"attribute_type":"SCOPE_SERVER","attribute_key":"temperture3","new_attribute_key":"temperture6","logged":false,"value":"11","value_t":"DBL"}]}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/attributes/DEVICE/{device_id}/{attribute_type}/{attribute_key}/values":{"get":{"tags":["attributes"],"summary":"get an attribute","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"100"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true},{"name":"attribute_type","in":"path","schema":{"type":"string"},"required":true},{"name":"attribute_key","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"delete":{"tags":["attributes"],"summary":"delete attribute","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true},{"name":"attribute_type","in":"path","schema":{"type":"string"},"required":true},{"name":"attribute_key","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}},"put":{"tags":["attributes"],"summary":"update value","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"value":"11","value_t":"DBL"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true},{"name":"attribute_type","in":"path","schema":{"type":"string"},"required":true},{"name":"attribute_key","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/attributes/DEVICE/{device_id}/keys":{"get":{"tags":["attributes"],"summary":"get keys","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"5"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/attributes/logged/DEVICE/{device_id}/keys":{"get":{"tags":["attributes"],"summary":"get keys logged","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"100"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/attributes/logged/DEVICE/{device_id}/values":{"get":{"tags":["attributes"],"summary":"get logged attributes","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"100"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/attributes/logged/DEVICE/{device_id}/{attribute_type}/{attribute_key}/values":{"get":{"tags":["attributes"],"summary":"get attribute logged","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"offset","in":"query","schema":{"type":"integer"},"example":"0"},{"name":"limit","in":"query","schema":{"type":"integer"},"example":"100"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true},{"name":"attribute_type","in":"path","schema":{"type":"string"},"required":true},{"name":"attribute_key","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/attributes/DEVICE/{device_id}/{attribute_type}/{attribute_key}/logged":{"put":{"tags":["attributes"],"summary":"update logged","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"logged":true}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"device_id","in":"path","schema":{"type":"string"},"required":true},{"name":"attribute_type","in":"path","schema":{"type":"string"},"required":true},{"name":"attribute_key","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/miniovt/file/upload":{"post":{"tags":["minio"],"summary":"upload file","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file_name":{"type":"string","example":"cat1"},"file":{"type":"string","format":"binary"},"project_id":{"type":"string","example":"{{project_id}}"}}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/miniovt/file/remove":{"post":{"tags":["minio"],"summary":"remove file","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"project_id":"{{project_id}}","file_name":"{{file_name}}"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/miniovt/bucket":{"post":{"tags":["minio"],"summary":"create bucket","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"bucket_name":"{{user_id}}"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/miniovt/file/download":{"post":{"tags":["minio"],"summary":"download file","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"project_id":"{{project_id}}","file_name":"firmwareOta_VhomeBridge.bin.bin"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"},{"name":"Range","in":"header","schema":{"type":"string"},"example":"bytes=200-10000"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/api/miniovt/file/infos":{"post":{"tags":["minio"],"summary":"get file infos","requestBody":{"content":{"application/json":{"schema":{"type":"object","example":{"project_id":"{{project_id}}","prefix":"firmwareOta_"}}}}},"parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"},"example":"{{session_token}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/file/{bucket_name}/{project_id}/{file_name}":{"get":{"tags":["minio"],"summary":"show file","parameters":[{"name":"Range","in":"header","schema":{"type":"string"},"example":"bytes=50000-0"},{"name":"bucket_name","in":"path","schema":{"type":"string"},"required":true},{"name":"project_id","in":"path","schema":{"type":"string"},"required":true},{"name":"file_name","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}},"/app/file/upload":{"post":{"tags":["minio"],"summary":"upload file from devices","requestBody":{"content":{}},"parameters":[{"name":"Range","in":"header","schema":{"type":"string"},"example":"bytes=50000-0"},{"name":"AppKey","in":"header","schema":{"type":"string"},"example":"{{app_key}}"},{"name":"AppSecret","in":"header","schema":{"type":"string"},"example":"{{app_secret}}"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{}}}}}}}}