Example 8552

API Routes

REST API route definitions.

{
base_url: "/api/v3"
routes: [
{
method: "PUT"
path: "/orders/:id"
handler: "createPosts"
auth: true
}

{
method: "POST"
path: "/orders"
handler: "deleteUsers"
auth: false
}

{
method: "POST"
path: "/users"
handler: "listUsers"
auth: true
}

{
method: "PATCH"
path: "/comments/:id"
handler: "getProducts"
auth: false
}

{
method: "GET"
path: "/products"
handler: "updateUsers"
auth: true
}

{
method: "GET"
path: "/orders"
handler: "listPosts"
auth: true
}

{
method: "PATCH"
path: "/users"
handler: "createProducts"
auth: false
}
]
}

See also