Example 14946
API Routes
REST API route definitions.
{
base_url: "/api/v2"
routes: [
{
method: "DELETE"
path: "/products"
handler: "updatePosts"
auth: true
}
{
method: "PUT"
path: "/users/:id"
handler: "updateOrders"
auth: true
}
{
method: "PATCH"
path: "/products/:id"
handler: "deleteOrders"
auth: true
}
{
method: "PUT"
path: "/products"
handler: "getProducts"
auth: false
}
{
method: "POST"
path: "/products/:id"
handler: "createPosts"
auth: false
}
{
method: "GET"
path: "/orders"
handler: "deleteUsers"
auth: true
}
]
}