Endpoint to list all notes

We’ll have to list all our notes. We’ll use GET method as we’ll use it to retrieve data from server.

  1. Go to workspace page and select “new endpoint”.
  2. Name the endpoint as “listNotes” and url as “/notes/list/”.
  3. We’ll use GET method here as we want to retrieve data.
  4. Select “save” to create your endpoint.
  5. Now we’ll use fetch Many block to get all the notes.
  6. Add variable name as “note”.
  7. Drag and drop a “database fetch many” block and select “note” table in table name and select “all” under filter data and name the variable as “notes”.
  8. And save the block.
  9. drag and drop a response block and select 200 status code to send a success response and save the response block.
  10. Deploy the project

# Test it out

  1. Once the project is launched in browser, you will see your previously created note int the list.
  2. Next we’ll create endpoint to edit note that we created.....

# Next steps

Now lets make an endpoint to edit notes. See Build endpoint to edit notes