Appearance
2351 - API Routes
REST API route definitions. This is an example of a MAML document.
maml
{
base_url: "/api/v2"
routes: [
{
method: "PATCH"
path: "/orders/:id"
handler: "getProducts"
auth: false
}
{
method: "PUT"
path: "/posts"
handler: "createPosts"
auth: true
}
{
method: "PUT"
path: "/products/:id"
handler: "getPosts"
auth: false
}
{
method: "DELETE"
path: "/users"
handler: "createPosts"
auth: true
}
{
method: "DELETE"
path: "/comments/:id"
handler: "listPosts"
auth: true
}
{
method: "DELETE"
path: "/posts/:id"
handler: "getUsers"
auth: false
}
]
}