Example 8544

API Routes

REST API route definitions.

{
base_url: "/api/v1"
routes: [
{
method: "PUT"
path: "/users"
handler: "getProducts"
auth: true
}

{
method: "POST"
path: "/products"
handler: "getProducts"
auth: true
}

{
method: "GET"
path: "/users/:id"
handler: "createPosts"
auth: false
}

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

See also