Example 6253
API Routes
REST API route definitions.
{
base_url: "/api/v2"
routes: [
{
method: "GET"
path: "/orders/:id"
handler: "listUsers"
auth: false
}
{
method: "DELETE"
path: "/posts/:id"
handler: "updateOrders"
auth: true
}
{
method: "PUT"
path: "/orders/:id"
handler: "createProducts"
auth: false
}
{
method: "GET"
path: "/comments/:id"
handler: "listOrders"
auth: true
}
{
method: "PATCH"
path: "/posts/:id"
handler: "listProducts"
auth: false
}
{
method: "PUT"
path: "/posts/:id"
handler: "createPosts"
auth: true
}
{
method: "PUT"
path: "/users/:id"
handler: "getUsers"
auth: true
}
]
}