Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NameRequiredDescription
nametrueName of the route.
pathtrueEndpoint/path for the route.
enabledfalseSpecifies whether the route is enabled. If not, it won’t be registered, and won’t accept requests.
sortfalse

Integer An integer that determines the order routes are registered. Routes with a higher sort value are prioritized and registered earlier. For example, say you have /route/:id and /route/foo. If the route with the wildcard has a higher sort than the static route, the static route runs. So create the first with a lower sort, and /route/foo routes properly, as does /api/bar.

methodtrueHTTP method (GET, POST, PUT, DELETE).
descriptiontrueDescription of the route.
actiontrue

Function The function that allows you to interact with API Builder APIs and models and send data to your template engine.

...

API Builder Web supports the EJS, Handlebars, Markdown, and ReactJS renderer engines. Place all template files with the appropriate extension in the web/templates folder.

...