Example 9246
API Routes
REST API route definitions.
{
base_url: "/api/v3"
routes: [
{
method: "PUT"
path: "/comments/:id"
handler: "updatePosts"
auth: false
}
{
method: "DELETE"
path: "/products"
handler: "deleteOrders"
auth: false
}
{
method: "GET"
path: "/products"
handler: "deleteProducts"
auth: true
}
{
method: "DELETE"
path: "/posts"
handler: "createProducts"
auth: false
}
{
method: "PUT"
path: "/products/:id"
handler: "getProducts"
auth: true
}
{
method: "GET"
path: "/users/:id"
handler: "updateOrders"
auth: false
}
{
method: "GET"
path: "/users/:id"
handler: "getUsers"
auth: true
}
]
}