Live demo
Request:
Reference
Routes
| Route | Purpose |
|---|---|
GET / | This page: demo + reference. |
GET /api | Route index, JSON. |
GET /health | Circuit pool, cache, uptime. |
GET /search | Search the directory. |
GET /search parameters
| Param | Rule |
|---|---|
q |
Required. 3–100 characters, trimmed. |
classification |
Repeatable. faculty or staff. Undergrad/grad need a Purdue login; rejected with 400. |
campus |
Repeatable. West Lafayette, Indianapolis, Northwest, Fort Wayne. Case-insensitive. |
department |
Substring match, ≤100 characters. |
Values in one group OR together. Groups AND together.
Response fields
| Field | Meaning |
|---|---|
query | Trimmed q actually searched. |
filters | Validated, deduplicated filters requested. |
total | Row count from upstream. 100 means at least 100 — no pagination. |
capped | true when total is exactly 100. |
appliedFilters | Parsed from upstream's "Filtering by" banner. Proof the filters took effect. |
people[] | name, plus title, department, campus, classification, email, phone when present. |
cached | true if served from this server's cache. |
tookMs | Request time, end to end. |
Errors
| Status | When |
|---|---|
| 400 | Bad q, classification, campus, or department. |
| 404 | Unknown route. |
| 502 | Circuit or upstream search failed. |
| 503 | Upstream rate limit hit. Retry-After header, seconds. |
Every response carries X-Request-Id. Successful searches carry Cache-Control: public, max-age=600.
Examples
curl 'https://your-host/search?q=smith'
curl 'https://your-host/search?q=smith&classification=faculty&classification=staff&campus=West%20Lafayette'
curl 'https://your-host/search?q=an' # 400