Example 14860

API Routes

REST API route definitions.

{
base_url: "/api/v3"
routes: [
{
method: "PUT"
path: "/users/:id"
handler: "updateProducts"
auth: true
}

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

{
method: "GET"
path: "/products"
handler: "updateOrders"
auth: false
}

{
method: "POST"
path: "/users/:id"
handler: "listPosts"
auth: true
}
]
}

See also