diff --git a/scripts/sensor_list_report.py b/scripts/sensor_list_report.py new file mode 100644 index 0000000..2febd2c --- /dev/null +++ b/scripts/sensor_list_report.py @@ -0,0 +1,414 @@ +import httpx +import json +from datetime import datetime + +# GraphQL Query für alle Sensoren +query = ''' +query GetAllSensors { + sensors { + id + name + nameExtern + description + measureConcept { + id + name + description + } + } +} +''' + +# API Aufruf +with httpx.Client() as client: + response = client.post( + f"{EXTERNAL_BASE_URL}/graphql", + json={"query": query}, + headers=AUTH_HEADERS, + timeout=30.0 + ) + + if response.status_code != 200: + result = f"