Cases, suspects and clues from a fictional Victorian detective agency. Practice CRUD, Bearer auth, nested resources, pagination and optimistic concurrency.
The Sherlock Holmes API is a case file: investigations with suspects and clues, and cases that move from open to solved. It is the catalog's PATCH endpoint — partial updates rather than whole-object PUTs — which is where most clients quietly send the wrong thing and never find out.
Base URL: https://funapi.dev/api/holmes/v1 · 10 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.
GET https://funapi.dev/api/holmes/v1/cases — List all cases. No token, no signup:
curl -i https://funapi.dev/api/holmes/v1/cases
answers 200 OK with:
{
"total": 5,
"data": [
{
"id": 1,
"title": "The Vanishing Violin",
"status": "solved",
"year": 1889
},
{
"id": 2,
"title": "The Crimson Cipher",
"status": "solved",
"year": 1891
},
{
"id": 3,
"title": "The Baker Street Burglary",
"status": "open",
"year": 1894
},
{
"id": 4,
"title": "The Midnight Telegram",
"status": "solved",
"year": 1896
},
{
"id": 5,
"title": "The Fogbound Heir",
"status": "open",
"year": 1899
}
]
}
five cases, two still open
GET /holmes/v1/cases — List all cases · Responds with 200 400 Link to this endpointGET /holmes/v1/cases/{id} — Get one case · Responds with 200 404 Link to this endpointGET /holmes/v1/cases/{id}/suspects — Get all suspects for a case (nested resource) · Responds with 200 404 Link to this endpointPATCH /holmes/v1/cases/{id} — Update a case status (409 if unchanged) (requires Bearer auth) · Responds with 200 400 401 404 409 Link to this endpointalibis included, guilt undisclosed
GET /holmes/v1/suspects/{id} — Get one suspect · Responds with 200 404 Link to this endpointPOST /holmes/v1/suspects — Add a suspect to a case (requires Bearer auth) · Responds with 201 400 401 Link to this endpointPUT /holmes/v1/suspects/{id} — Update a suspect (requires Bearer auth) · Responds with 200 400 401 404 412 Link to this endpointDELETE /holmes/v1/suspects/{id} — Clear a suspect (requires Bearer auth) · Responds with 204 401 403 404 412 Link to this endpointphysical, document, and testimony
GET /holmes/v1/clues — List clues, filter by case or type · Responds with 200 Link to this endpointGET /holmes/v1/clues/random — A random clue · Responds with 200 Link to this endpointLast updated