Huck Gateway API
gateway.rust.solutions is a link shortener with a JSON API. Management routes require Authorization: Bearer <token>; redirects are public.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /healthz | Liveness check, no auth |
| POST | /api/links | Create a short link |
| GET | /api/links | List links with hit counts |
| DELETE | /api/links/{code} | Remove a link |
| GET | /{code} | 302 redirect (public) |
URLs must be absolute http(s) addresses of at most 2048 characters.
Example
curl -X POST https://gateway.rust.solutions/api/links \
-H "Authorization: Bearer $GATEWAY_TOKEN" \
-d '{"url": "https://rust.solutions/blog/bringing-rust-solutions-online/"}'
{"code":"aB3x9K","url":"https://rust.solutions/blog/..."}
curl -i https://gateway.rust.solutions/aB3x9K
HTTP/1.1 302 Found
Location: https://rust.solutions/blog/...
Hit counters increment on every redirect and survive restarts.