Example 8249
API Routes
REST API route definitions.
{
base_url: "/api/v1"
routes: [
{
method: "DELETE"
path: "/posts"
handler: "listUsers"
auth: false
}
{
method: "DELETE"
path: "/products/:id"
handler: "updatePosts"
auth: true
}
{
method: "PATCH"
path: "/comments"
handler: "listProducts"
auth: true
}
{
method: "PATCH"
path: "/posts"
handler: "createPosts"
auth: false
}
{
method: "PATCH"
path: "/posts/:id"
handler: "getPosts"
auth: false
}
{
method: "DELETE"
path: "/comments"
handler: "deletePosts"
auth: true
}
]
}