Now that we know how to make a simple API we can move on to building our
profiles API before we get started I'm going to explain the specification of
what we're going to build let's start by listing some basic requirements
Our profile API is going to be able to handle the following creating a profile
to handle the registration of new users in the system
this will include validating the profile data to ensure that a user provided all
the required fields
listing existing profiles so users can find other users
in the system this needs to include a way to search for users by email or name
viewing a specific profile by the profile ID
updating the profile of the
logged in user users in the system should be able to change their name
email address and password for their profile and finally we'll provide a way
for users to delete their own profile
so what URLs and methods might our API have
well since our API manages profiles it makes sense to give it the name profile
so the URL would be forward slash api forward slash profile
the route of the URL will list
all profiles when the HTTP GET method is called and create a new profile when the
HTTP POST method is called
if we include the ID of a specific profile in the URL
we can view all the details of a specific profile object by using the
HTTP GET
also with the ID we can use the HTTP put or patch method to update the
object or HTTP delete to remove it completely from the system
so that's an
overview of the API we're going to build in the next lesson we'll start building
our API