The video for this lesson is currently being updated, please read the transcript instead.

Authenticated routes

Another very important aspect of our API is the permissions, including the authentication header and roles.

Let's now jump down to the DELETE /items/:id endpoint, which is, of course, an authenticated endpoint, and we'll document it.

Delete

We'll begin by adding a doc block, and adding the @api parameter on the first line. The first value for this parameter will be {delete} for the DELETE method. The second value will be the path, which is /items/:id.

To view the complete lesson you'll need to login or join this course.


Click to load comments...