You can support this site from as little as $1 a month on Patreon.

The support pays for site hosting and the expansion of this content.

In addition, Patreon Supporters gain access to exclusive online video training courses and ebooks.

Join Now

How to complete the challenge GET /todos/{id} (200) text/calendar

This challenge asks for one existing todo in calendar format. The API returns a minimal VCALENDAR containing a single VTODO.

GET /todos/{id} (200) text/calendar

Issue a GET request on the /todos/{id} end point with an Accept header of text/calendar to receive the todo as a VTODO.

  • Use a real todo id, not the literal text {id}
  • Add the Accept: text/calendar header
  • Add the X-CHALLENGER header to track progress
  • The response status should be 200
  • The response Content-Type should be text/calendar

Basic Instructions

  • Find an existing todo by calling GET /todos
  • If there are no todos, create one with POST /todos
  • Issue a GET request to /todos/{id}
  • Send Accept: text/calendar

Try it now

If you don't know what todos are available, list them first.

GET /todos to see what todos are available now

If there are no todos, create one.

POST /todos to create a todo for the calendar request
GET /todos/{id} as text/calendar

Example Request

> GET /todos/1 HTTP/1.1
> Host: apichallenges.eviltester.com
> X-CHALLENGER: x-challenger-guid
> Accept: text/calendar

Example Response

< HTTP/1.1 200 OK
< Content-Type: text/calendar
< X-Challenger: x-challenger-guid

Example Response body:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//EvilTester//API Challenges//EN
BEGIN:VTODO
UID:todo-1@apichallenges
SUMMARY:calendar todo
DESCRIPTION:created for the text/calendar solution
STATUS:NEEDS-ACTION
END:VTODO
END:VCALENDAR
Experiment with this endpoint