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
.
Click to load comments...