Skip to content

1657 - API Routes

REST API route definitions. This is an example of a MAML document.

maml
{
  base_url: "/api/v2"
  routes: [
    {
      method: "POST"
      path: "/users"
      handler: "deleteUsers"
      auth: false
    }

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

    {
      method: "POST"
      path: "/products/:id"
      handler: "deletePosts"
      auth: false
    }

    {
      method: "POST"
      path: "/users"
      handler: "getProducts"
      auth: false
    }
  ]
}

See Also