Example 755

API Routes

REST API route definitions.

{
base_url: "/api/v3"
routes: [
{
method: "POST"
path: "/users"
handler: "createOrders"
auth: true
}

{
method: "PUT"
path: "/users"
handler: "updateOrders"
auth: true
}

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

{
method: "DELETE"
path: "/products"
handler: "getPosts"
auth: true
}

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

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

See also