Example 11851

API Routes

REST API route definitions.

{
base_url: "/api/v2"
routes: [
{
method: "POST"
path: "/products/:id"
handler: "listProducts"
auth: false
}

{
method: "DELETE"
path: "/comments/:id"
handler: "createProducts"
auth: true
}

{
method: "PUT"
path: "/comments/:id"
handler: "deleteProducts"
auth: true
}

{
method: "PATCH"
path: "/products/:id"
handler: "listPosts"
auth: true
}

{
method: "DELETE"
path: "/users"
handler: "updateProducts"
auth: true
}

{
method: "PATCH"
path: "/comments"
handler: "updateProducts"
auth: false
}
]
}

See also