Example 1059

API Routes

REST API route definitions.

{
base_url: "/api/v3"
routes: [
{
method: "GET"
path: "/orders"
handler: "updatePosts"
auth: true
}

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

{
method: "POST"
path: "/users"
handler: "createOrders"
auth: true
}

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

{
method: "POST"
path: "/users"
handler: "updateProducts"
auth: true
}

{
method: "GET"
path: "/users"
handler: "createOrders"
auth: false
}
]
}

See also