Example 16753

API Routes

REST API route definitions.

{
base_url: "/api/v2"
routes: [
{
method: "PUT"
path: "/orders"
handler: "getPosts"
auth: true
}

{
method: "DELETE"
path: "/posts"
handler: "listOrders"
auth: false
}

{
method: "DELETE"
path: "/users/:id"
handler: "listUsers"
auth: false
}

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

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

See also