Example 3745

API Routes

REST API route definitions.

{
base_url: "/api/v2"
routes: [
{
method: "PUT"
path: "/orders"
handler: "deleteUsers"
auth: true
}

{
method: "PUT"
path: "/orders"
handler: "createPosts"
auth: false
}

{
method: "PATCH"
path: "/orders"
handler: "updateProducts"
auth: false
}

{
method: "PATCH"
path: "/comments"
handler: "deleteProducts"
auth: true
}

{
method: "GET"
path: "/comments/:id"
handler: "listUsers"
auth: false
}

{
method: "DELETE"
path: "/posts"
handler: "updateOrders"
auth: true
}

{
method: "DELETE"
path: "/comments"
handler: "updatePosts"
auth: true
}
]
}

See also