Example 12143

API Routes

REST API route definitions.

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

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

{
method: "PUT"
path: "/products/:id"
handler: "deleteProducts"
auth: false
}

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

{
method: "PUT"
path: "/orders"
handler: "createProducts"
auth: false
}
]
}

See also