Example 15941

API Routes

REST API route definitions.

{
base_url: "/api/v3"
routes: [
{
method: "GET"
path: "/posts/:id"
handler: "createPosts"
auth: false
}

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

{
method: "PATCH"
path: "/products"
handler: "listProducts"
auth: true
}

{
method: "PATCH"
path: "/orders"
handler: "updateUsers"
auth: true
}

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

{
method: "PUT"
path: "/products"
handler: "listPosts"
auth: true
}

{
method: "DELETE"
path: "/posts"
handler: "updatePosts"
auth: false
}
]
}

See also