Example 16953

API Routes

REST API route definitions.

{
base_url: "/api/v1"
routes: [
{
method: "PUT"
path: "/comments/:id"
handler: "createUsers"
auth: false
}

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

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

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

{
method: "PATCH"
path: "/posts"
handler: "deleteUsers"
auth: false
}
]
}

See also