Example 12250
API Routes
REST API route definitions.
{
base_url: "/api/v1"
routes: [
{
method: "GET"
path: "/orders/:id"
handler: "listOrders"
auth: true
}
{
method: "PATCH"
path: "/posts/:id"
handler: "listProducts"
auth: false
}
{
method: "PUT"
path: "/users"
handler: "updateProducts"
auth: false
}
{
method: "POST"
path: "/users/:id"
handler: "deletePosts"
auth: false
}
{
method: "PATCH"
path: "/orders/:id"
handler: "createUsers"
auth: false
}
{
method: "PUT"
path: "/orders/:id"
handler: "getPosts"
auth: false
}
{
method: "PATCH"
path: "/orders"
handler: "deleteOrders"
auth: true
}
]
}