Skip to content

2058 - API Routes

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

maml
{
  base_url: "/api/v3"
  routes: [
    {
      method: "PATCH"
      path: "/users/:id"
      handler: "getPosts"
      auth: true
    }

    {
      method: "PUT"
      path: "/comments"
      handler: "deleteProducts"
      auth: false
    }

    {
      method: "GET"
      path: "/users/:id"
      handler: "updateProducts"
      auth: false
    }
  ]
}

See Also