fixed endpoint
This commit is contained in:
4
app.py
4
app.py
@ -56,11 +56,9 @@ class UnifiAPI:
|
|||||||
}
|
}
|
||||||
|
|
||||||
def get_all_devices(self):
|
def get_all_devices(self):
|
||||||
url = f"{self.base_url}/proxy/network/integration/v1/sites/{self.site_id}/devices"
|
url = f"{self.base_url}/integration/v1/sites/{self.site_id}/devices"
|
||||||
response = self.session.get(url, headers=self.headers)
|
response = self.session.get(url, headers=self.headers)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
logger.debug(f"Response content: {response.text}")
|
|
||||||
logger.debug(f"Response headers: {response.headers}")
|
|
||||||
return response.json()['data']
|
return response.json()['data']
|
||||||
|
|
||||||
def get_device_details(self, device_id):
|
def get_device_details(self, device_id):
|
||||||
|
|||||||
Reference in New Issue
Block a user