Example 12746
API Routes
REST API route definitions.
{
base_url: "/api/v1"
routes: [
{
method: "DELETE"
path: "/posts"
handler: "createOrders"
auth: true
}
{
method: "PUT"
path: "/posts"
handler: "getUsers"
auth: true
}
{
method: "DELETE"
path: "/posts"
handler: "listUsers"
auth: false
}
{
method: "DELETE"
path: "/products/:id"
handler: "deleteOrders"
auth: true
}
{
method: "GET"
path: "/users"
handler: "createOrders"
auth: false
}
{
method: "POST"
path: "/products"
handler: "createProducts"
auth: false
}
{
method: "DELETE"
path: "/products/:id"
handler: "deleteUsers"
auth: true
}
]
}