Example 9658

API Routes

REST API route definitions.

{
base_url: "/api/v2"
routes: [
{
method: "POST"
path: "/users"
handler: "createProducts"
auth: false
}

{
method: "POST"
path: "/posts"
handler: "updatePosts"
auth: true
}

{
method: "DELETE"
path: "/comments/:id"
handler: "updateUsers"
auth: false
}

{
method: "GET"
path: "/posts/:id"
handler: "createOrders"
auth: true
}

{
method: "DELETE"
path: "/orders/:id"
handler: "getProducts"
auth: false
}

{
method: "POST"
path: "/products/:id"
handler: "deleteUsers"
auth: false
}
]
}

See also