In this video, we take our read only API and make it a read-write API.
- [Narrator] In this chapter we'll focus on turning our…read-only API into a Read/Write API…that allows authenticated users…to create new messages in the system.…While this might seem like flipping a switch…and we're done.…It's not quite that simple.…We need to think about the routes,…the payload and parameters that are used,…the response codes,…and how all of it is processed and handled…behind the scenes.…The first piece we'll talk about is the routes.…With those aspects in mind,…let's tackle the most visible aspect first, the Route.…
From our previous lab sections…we already have a simple route of GET/messages,…which allows us to retrieve a list of messages.…Since we want to create a new message…that's probably the right end-point,…but now we need the right verb.…With regards to HTTP, there are 15 verbs available.…But really only four that we care about for APIs.…Get, put, host, and delete.…Get, which we've already used,…lets us retrieve data from the API.…Not surprisingly, delete lets us delete data,…assuming the user is authenticated and authorized.…
This course begins with a simple application specification and builds it one step at a time. Each chapter includes a key concept, with examples from other public APIs, and then shows how to build it yourself with Silex. Learn about URL routing, validating input, and generating response codes and hypermedia payloads. Like any project, the first implementation may be a little messy, but don't worry. The last chapter covers refactoring and what it takes to scale and support the API going forward.
- Understanding the project goals
- Adding authentication with Silex
- Using cross-framework and authentication middleware
- Creating a read-write API in Silex
- Uploading files via an API
- Adding file security
- Creating payloads and response codes in Silex
- Scaling your API
Skill Level Beginner
PHP Date and Time Essential Trainingwith David Powers4h 31m Intermediate
PHP: Managing Persistent Sessionswith David Powers2h 41m Intermediate
1. Project Explanation and Goals
2. Authentication Options and Tradeoffs
Cross framework middleware1m 32s
3. Create a Read-Write API
4. File Uploads via API
5. Scale Your API
Next steps1m 46s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.