Overview
This endpoint demonstrates a simple public API that doesn’t require authentication. It’s configured with a short cache TTL of 1 second. HTTP Method:GETEndpoint:
/publicCache TTL: 1 second
What It Demonstrates
- Public access without authentication
- Custom cache configuration at the endpoint level
- Simple backend proxy pattern
Request Example
Expected Response
The endpoint returns hotel data from the backend:Backend Configuration
This endpoint proxies to a single backend service:- Backend Host:
http://fake_api(inherited from global config) - URL Pattern:
/hotels/1.json - Timeout: 3000ms (inherited from global config)
KrakenD Configuration
Key Features
Cache Configuration
The endpoint overrides the global cache TTL (300s) with a custom value of 1s, making it useful for frequently updated public data.
No Authentication
Unlike/private/moderate and /private/custom endpoints, this endpoint has no auth/validator configuration, making it accessible to all clients.
Use Cases
- Public API data that changes frequently
- Status endpoints
- Public information feeds
- Health check endpoints with dynamic data