Welcome to the REST API of To-Do, a simple and efficient service where you can create tasks and task reminders.
Use this API to learn how to install the service in your system, enroll new users, create and update tasks, and set up reminders.
Quick links | ||
---|---|---|
Install service | Tutorials | API Reference |
Have you installed the To-Do Service in your development system? Make sure you have all the requirements in your system before you begin.
Start with a quick tutorial on enrolling a user. Since the To-Do Service requires a user to create a task, this tutorial serves as a good jumping-off point to learn how to use the API.
Enrolling a new user in the service requires that you use the POST
method to store the details of a new user
resource in the service.
To enroll a new user:
Start the service by using this command in your command-line tool.
cd <your-github-workspace>/to-do-service/api
json-server -w to-do-db-source.json
/users
Content-Type: application/json
Request body: You can change the values of each property as you’d like.
{
"last_name": "Jones",
"first_name": "Jenny",
"email": "jen.jones@example.com"
}
The response body should look something like this. Note that the names should be the same as you used in your Request body and the response should include the new user’s id
.
{
"last_name": "Jones",
"first_name": "Jenny",
"email": "jen.jones@example.com",
"id": 5
}
Now that you’ve successfully enrolled your first user, you can take a look at tutorials for more operations in the service:
The
{base_url}
value of the resources depends on the installation of the service.When run locally for testing, the
{base_url}
is generallyhttp://localhost:3000
.