Lyzer Hub Get Key Apr 2026
The returned key will only work for that tenant’s data. To revoke a key (e.g., after a team member leaves):
curl -X POST https://your-lyzer-hub.example.com/api/v1/keys \ -H "Content-Type: application/json" \ -d ' "username": "analytics_user", "password": "secure_password", "scope": "read:metrics write:events" '
from lyzer_hub import HubClient client = HubClient( base_url="https://your-lyzer-hub.example.com", auth_mode="apikey" ) key_response = client.create_key( username="data_engineer", password="env_var_password", ttl=7200 # 2 hours ) Lyzer Hub Get Key
Whether you are working with a proprietary Lyzer Hub platform, an open-source analytics hub, or a custom middleware solution, understanding how to properly "get" and manage your hub key is essential for secure, rate-limited, and auditable access.
A: For human tools: 8–24 hours. For automated services: 30–90 days with rotation. The returned key will only work for that tenant’s data
def get_key(self): if time.time() >= self.expires_at - 60: # refresh 1 min early resp = requests.post(self.auth_url, json= "username": self.creds[0], "password": self.creds[1] ) data = resp.json() self.current_key = data["key"] self.expires_at = time.time() + data["expires_in_seconds"] return self.current_key Once obtained, include the key in every API call:
GET /api/v1/metrics HTTP/1.1 Host: your-lyzer-hub.example.com Authorization: Bearer lyz_a1b2c3d4e5f6g7h8i9j0 For automated services: 30–90 days with rotation
A: Generate a new key and revoke the old one. The hub admin can also regenerate keys.