Example 6346

API Routes

REST API route definitions.

{
base_url: "/api/v3"
routes: [
{
method: "PUT"
path: "/posts"
handler: "updateOrders"
auth: true
}

{
method: "DELETE"
path: "/orders"
handler: "createUsers"
auth: false
}

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

{
method: "POST"
path: "/users"
handler: "updateOrders"
auth: false
}

{
method: "POST"
path: "/posts/:id"
handler: "getPosts"
auth: true
}
]
}

See also