Would you like to contribute to the Titanium docs? To get started, sign up for an account on the Appcelerator Wiki and sign our CLA.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor grammar changes

...

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 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 that allows you to interact with Arrow APIs and models and send data to your template engine.

...

A renderer engine renders data (or locals in the Express framework) to the view (template file).  API Builder provide  provides a few renderer engines and allows you to add your own custom renderer engines.

...

To create a custom renderer engine you need to create an a renderer engine and register it with the API Builder instance's middleware instance.

...

In the preceding example, the route calls the car API. You can retrieve a reference to an API by specifying its path or nickname property when specified by the model/API that you are using. For example:

...