Example 16146

API Routes

REST API route definitions.

{
base_url: "/api/v3"
routes: [
{
method: "POST"
path: "/orders"
handler: "deletePosts"
auth: true
}

{
method: "POST"
path: "/posts/:id"
handler: "deletePosts"
auth: true
}

{
method: "GET"
path: "/products/:id"
handler: "listPosts"
auth: false
}

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

{
method: "PUT"
path: "/users"
handler: "deletePosts"
auth: true
}

{
method: "PATCH"
path: "/posts"
handler: "listUsers"
auth: false
}
]
}

See also