Fellowship members, quests and artifacts from a fictional fantasy epic. Practice CRUD, Bearer auth, nested resources, pagination and optimistic concurrency.
The Middle-earth API tracks a fellowship, the quests it is assigned and the artifacts it carries. Members join and leave quests, so it is built around association endpoints — the join-table operations that are easy to write and easy to get wrong when the same member is added twice or removed from a quest they were never on.
Base URL: https://funapi.dev/api/middleearth/v1 · 9 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.
GET https://funapi.dev/api/middleearth/v1/fellowship — List fellowship members (paginated, filter by race). No token, no signup:
curl -i https://funapi.dev/api/middleearth/v1/fellowship
answers 200 OK with:
{
"page": 1,
"pageSize": 3,
"total": 6,
"totalPages": 2,
"data": [
{
"id": 1,
"name": "Aldric Underhill",
"race": "hobbit",
"skill": "stealth",
"_v": 1
},
{
"id": 2,
"name": "Thoren Oakenshield II",
"race": "dwarf",
"skill": "axework",
"_v": 1
},
{
"id": 3,
"name": "Elarion Swiftarrow",
"race": "elf",
"skill": "archery",
"_v": 1
}
]
}
six companions, six races
GET /middleearth/v1/fellowship — List fellowship members (paginated, filter by race) · Responds with 200 400 404 Link to this endpointGET /middleearth/v1/fellowship/{id} — Get one fellowship member · Responds with 200 404 Link to this endpointGET /middleearth/v1/fellowship/{id}/artifact — Get the artifact carried by a member (nested resource) · Responds with 200 404 Link to this endpointPOST /middleearth/v1/fellowship — Recruit a new member (requires Bearer auth) · Responds with 201 400 401 Link to this endpointPUT /middleearth/v1/fellowship/{id} — Update a fellowship member (requires Bearer auth) · Responds with 200 400 401 404 412 Link to this endpointDELETE /middleearth/v1/fellowship/{id} — Remove a member from the fellowship (requires Bearer auth) · Responds with 204 401 403 404 412 Link to this endpointone ring, several detours
GET /middleearth/v1/quests — List quests, filter by status · Responds with 200 400 Link to this endpointGET /middleearth/v1/quests/random — A random quest · Responds with 200 Link to this endpointeach bound to a bearer
GET /middleearth/v1/artifacts — List all artifacts · Responds with 200 Link to this endpointUnofficial and fan-made. The Middle-earth API is a practice API that borrows a theme; it is not affiliated with, sponsored or endorsed by the owners of the names it references, which belong to them. Every record it returns is test data for exercising HTTP behaviour, not an authoritative source on the subject.
Last updated