Example 6955
API Routes
REST API route definitions.
{
base_url: "/api/v2"
routes: [
{
method: "PATCH"
path: "/orders"
handler: "listUsers"
auth: true
}
{
method: "PATCH"
path: "/orders"
handler: "getProducts"
auth: false
}
{
method: "GET"
path: "/users/:id"
handler: "listPosts"
auth: false
}
{
method: "POST"
path: "/posts/:id"
handler: "createOrders"
auth: true
}
{
method: "GET"
path: "/products/:id"
handler: "createPosts"
auth: false
}
{
method: "GET"
path: "/comments"
handler: "getOrders"
auth: true
}
{
method: "PATCH"
path: "/users/:id"
handler: "getUsers"
auth: false
}
]
}