WEBVTT
Kind: captions
Language: en

00:00:00.319 --> 00:00:06.089
Now that we know how to make a simple
API we can move on to building our

00:00:06.089 --> 00:00:11.780
profiles API before we get started I'm
going to explain the specification of

00:00:11.780 --> 00:00:17.640
what we're going to build let's start by
listing some basic requirements

00:00:17.640 --> 00:00:23.699
Our profile API is going to be able to
handle the following creating a profile

00:00:23.699 --> 00:00:27.359
to handle the registration of new users
in the system

00:00:27.359 --> 00:00:33.059
this will include validating the profile
data to ensure that a user provided all

00:00:33.059 --> 00:00:35.960
the required fields

00:00:35.960 --> 00:00:40.260
listing existing profiles so users can find other users

00:00:40.260 --> 00:00:47.690
in the system this needs to include a
way to search for users by email or name

00:00:47.690 --> 00:00:53.840
viewing a specific profile by the
profile ID

00:00:53.840 --> 00:00:56.039
updating the profile of the

00:00:56.039 --> 00:01:01.170
logged in user users in the system
should be able to change their name

00:01:01.170 --> 00:01:07.680
email address and password for their
profile and finally we'll provide a way

00:01:07.680 --> 00:01:11.560
for users to delete their own profile

00:01:11.560 --> 00:01:15.950
so what URLs and methods might our API have

00:01:15.950 --> 00:01:21.450
well since our API manages profiles it
makes sense to give it the name profile

00:01:21.450 --> 00:01:28.400
so the URL would be forward slash api forward slash profile

00:01:28.400 --> 00:01:30.509
the route of the URL will list

00:01:30.509 --> 00:01:37.140
all profiles when the HTTP GET method is
called and create a new profile when the

00:01:37.140 --> 00:01:40.400
HTTP POST method is called

00:01:40.400 --> 00:01:44.360
if we include the ID of a specific profile in the URL

00:01:44.360 --> 00:01:49.290
we can view all the details of a
specific profile object by using the

00:01:49.290 --> 00:01:52.220
HTTP GET

00:01:52.220 --> 00:01:58.350
also with the ID we can use the
HTTP put or patch method to update the

00:01:58.350 --> 00:02:04.400
object or HTTP delete to remove it
completely from the system

00:02:04.400 --> 00:02:05.820
so that's an

00:02:05.820 --> 00:02:10.679
overview of the API we're going to build
in the next lesson we'll start building

00:02:10.679 --> 00:02:13.250
our API

