Example 5255

API Routes

REST API route definitions.

{
base_url: "/api/v2"
routes: [
{
method: "PUT"
path: "/products"
handler: "listOrders"
auth: false
}

{
method: "PUT"
path: "/comments"
handler: "deleteProducts"
auth: false
}

{
method: "POST"
path: "/users/:id"
handler: "listUsers"
auth: false
}

{
method: "PATCH"
path: "/orders"
handler: "updateOrders"
auth: true
}

{
method: "PATCH"
path: "/orders"
handler: "listProducts"
auth: true
}

{
method: "PUT"
path: "/comments"
handler: "listProducts"
auth: true
}
]
}

See also