How to complete the challenge GET /todos (200) vendor XML

This challenge requests a todo-specific +xml media type.

Issue a GET request on the /todos end point with an Accept header of application/vnd.apichallenges.todo+xml to receive results in todo XML format.

Basic Instructions

  • Issue a GET request to /todos
  • Add the X-CHALLENGER header to track challenge completion
  • Set Accept to application/vnd.apichallenges.todo+xml
  • Check that the response status is 200
  • Check that the response Content-Type is application/vnd.apichallenges.todo+xml

Try it now

GET /todos with vendor todo XML

Example Request

> GET /todos HTTP/1.1
> Host: apichallenges.com
> X-CHALLENGER: x-challenger-guid
> Accept: application/vnd.apichallenges.todo+xml

Example Response

< HTTP/1.1 200 OK
< Content-Type: application/vnd.apichallenges.todo+xml
< X-Challenger: x-challenger-guid

The response body should still contain a todo collection encoded as XML.

Lessons Learned

  • application/vnd.apichallenges.todo+xml is accepted because the suffix is +xml and the subtype names the todo model.
  • Vendor media types let an API be more specific than generic application/xml.
  • Explicit model support matters; not every +xml media type is a valid todo representation.

Suggested Experiments

  • Try Accept: application/vnd.apichallenges.todos+xml and compare plural model naming behavior.
  • Try Accept: application/problem+xml and confirm that an error-document media type is not treated as todo XML.
  • Request the same collection with generic application/xml and compare the body shape.
Experiment with this endpoint