Skip to content

Creating new REST service

Amadeusz Kosik edited this page Jan 13, 2014 · 4 revisions

To create new REST service, you must:

  1. Create new get method in the model (optional).
  2. Create new JSON template (optional).
  3. Create new action in the one of the controllers.
  4. Create new route in routes file.

Creating new method in the model

(expand this)

Creating new JSON template

The JSON templates are separated from controllers in the JsonTemplate object from the utils package. It already contains few commonly used templates. (expand this)

Creating new action

(expand this)

Creating new route

Since Geyos is based on Play Framework, please reefer to it's documentation. All REST services are lined to -insert-here- url.