Example 13957

API Routes

REST API route definitions.

{
base_url: "/api/v2"
routes: [
{
method: "DELETE"
path: "/comments/:id"
handler: "getOrders"
auth: false
}

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

{
method: "GET"
path: "/products"
handler: "createProducts"
auth: true
}

{
method: "GET"
path: "/posts"
handler: "getOrders"
auth: false
}
]
}

See also