Marvel heroes, villains and mission assignments. Practice CRUD, Bearer auth, nested resources, pagination, and state-transition conflicts (409).
The Marvel API assigns heroes and villains to missions, which makes it a three-way relationship rather than a simple parent-child tree. Missions have states and rosters, so it is well suited to testing a client that has to keep several related collections consistent as it writes.
Base URL: https://funapi.dev/api/marvel/v1 · 10 endpoints · OpenAPI 3.1 spec and Postman collection available. New here? Read the getting started guide.
GET https://funapi.dev/api/marvel/v1/heroes — List heroes (paginated, filter by team). No token, no signup:
curl -i https://funapi.dev/api/marvel/v1/heroes
answers 200 OK with:
{
"page": 1,
"pageSize": 4,
"total": 6,
"totalPages": 2,
"data": [
{
"id": 1,
"name": "Iron Man",
"codename": "Tony Stark",
"power": "powered armor",
"team": "Avengers",
"_v": 1
},
{
"id": 2,
"name": "Spider-Man",
"codename": "Peter Parker",
"power": "wall-crawling & webs",
"team": "Avengers",
"_v": 1
},
{
"id": 3,
"name": "Thor",
"codename": "Thor Odinson",
"power": "storm control",
"team": "Avengers",
"_v": 1
},
{
"id": 4,
"name": "Hulk",
"codename": "Bruce Banner",
"power": "rage-fueled strength",
"team": "Avengers",
"_v": 1
}
]
}
six Avengers across two teams
GET /marvel/v1/heroes — List heroes (paginated, filter by team) · Responds with 200 400 404 Link to this endpointGET /marvel/v1/heroes/{id} — Get one hero · Responds with 200 404 Link to this endpointGET /marvel/v1/heroes/{id}/missions — Get a hero's assigned missions (nested resource) · Responds with 200 404 Link to this endpointPOST /marvel/v1/heroes — Recruit a new hero (requires Bearer auth) · Responds with 201 400 401 Link to this endpointPUT /marvel/v1/heroes/{id} — Update a hero (requires Bearer auth) · Responds with 200 400 401 404 412 Link to this endpointDELETE /marvel/v1/heroes/{id} — Retire a hero (requires Bearer auth) · Responds with 204 401 403 404 412 Link to this endpointthreat levels, some defeated
GET /marvel/v1/villains — List villains, filter by threat level · Responds with 200 400 Link to this endpointassign heroes, then complete them
POST /marvel/v1/missions — Assign heroes to a new mission (requires Bearer auth) · Responds with 201 400 401 Link to this endpointGET /marvel/v1/missions/{id} — Get one mission · Responds with 200 404 Link to this endpointPOST /marvel/v1/missions/{id}/complete — Mark a mission complete (409 if already complete) (requires Bearer auth) · Responds with 200 401 404 409 Link to this endpointUnofficial and fan-made. The Marvel 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