Example 15249
API Routes
REST API route definitions.
{
base_url: "/api/v2"
routes: [
{
method: "PUT"
path: "/posts"
handler: "listUsers"
auth: true
}
{
method: "GET"
path: "/users"
handler: "getPosts"
auth: false
}
{
method: "PATCH"
path: "/posts"
handler: "createPosts"
auth: true
}
{
method: "PATCH"
path: "/comments"
handler: "listPosts"
auth: true
}
{
method: "DELETE"
path: "/orders"
handler: "listPosts"
auth: false
}
{
method: "PATCH"
path: "/posts/:id"
handler: "deleteProducts"
auth: true
}
]
}