Dream Journal Web Application
A public, anonymous dream journal that lets you post your dreams, view others' dreams, and share and vote on the most interesting ones.
This API allows you to interact with the entries table to read, add, update, or delete the entries. It is the backend of the application; it is what the Vue.js frontend makes AJAX calls to in order to load the content in the web application. The API routing was built with Laravel and PHP using Eloquent.js.
This dream journal's API uses RESTful principles. REST stands for representational state transfer, an architectural style for designing applications. The standard HTTP methods of a RESTful API usually allow you to Create, Read, Update, or Delete a database entry. You can create, read, and update each record via AJAX. There are four HTTP methods you can use to interact with the database records:
- GET
- A GET request allows you to retrieve data. GET requests do not change or update your data.
- POST
- A POST request will allow you to create new resources. For example, making a post request to a collection (like
/entries
) will allow you to add a new musical to the musicals table.
- A POST request will allow you to create new resources. For example, making a post request to a collection (like
- PUT
- A PUT request allows you to update a resource. For example, a post request to a specific entry (like
/entries/1
) will allow you to update any of its fields, such as the date you had the dream.
- A PUT request allows you to update a resource. For example, a post request to a specific entry (like
- DELETE
- A DELETE request allows you to remove a resource.
The responses will be in JSON format. JSON stands for JavaScript object notation, which is a data-interchange format that is easy for humans to read and easy to parse in the programming language of your choice.
The specific endpoints to visit as well as sample requests and responses to interact with this API are detailed in the "Routes" section of the documentation.