Authentication¶
All API endpoints require authentication via a subscription_key.
Authentication is performed by passing your personal subscription key as a query parameter with every request.
Subscription Key¶
Each client receives a unique subscription_key.
- The key must be included in every request
- The key is a 90-character string
- Requests without a valid key will be rejected
Example:
GET /building?building_id=01c02e568d94065d29c7fd9e&subscription_key=YOUR_KEY
How to Include the Key¶
The subscription_key must be provided as a query parameter:
?subscription_key=YOUR_KEY
Example: Retrieve a Building by ID¶
curl "https://ua-api-solar-lake-enterprise.azurewebsites.net/building?building_id=01c02e568d94065d29c7fd9e&subscription_key=YOUR_KEY"
Example: Bounding Box Request¶
curl "https://ua-api-solar-lake-enterprise.azurewebsites.net/bbox/h3s?min_lon=11.5&min_lat=48.1&max_lon=11.51&max_lat=48.11&subscription_key=YOUR_KEY"
Example: POST Request¶
curl -X POST "https://ua-api-solar-lake-enterprise.azurewebsites.net/bbox/buildings?subscription_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"bbox": {
"min_lon": 11.5,
"min_lat": 48.1,
"max_lon": 11.51,
"max_lat": 48.11
},
"options": {
"select": ["building_id", "roof_area"]
}
}'
Security Recommendations¶
To protect your subscription key:
- Do not expose it in public repositories
- Do not embed it directly in frontend JavaScript applications
- Store it securely (e.g., environment variables, backend configuration)
- Contact Urban Analytica support if you suspect it has been exposed
For web applications, it is recommended to route API calls through a backend service that injects the subscription key securely.
Error Handling¶
If the subscription_key is:
- Missing
- Incorrect
- Invalid
The API will return an authentication-related error response.
Example (simplified):
{
"detail": "Access denied: Invalid subscription key"
}
Rate Limiting & Access Scope¶
Access policies, rate limits, and permitted usage scopes may vary depending on your agreement.
If you encounter unexpected access restrictions, please contact Urban Analytica support.