Page tree

Versions Compared

Key

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

...

version - usage: router.version('1.0')

METHOD - GET, POST, or DELETE


Syntax for endpoint (METHOD) definition

Code Block
languagegroovy
router.METHOD('route/path/{variable}') {
    strategy(STRATEGY_NAME){
        ... strategy parameters ...
    }
    accessPermission 'groupName1', 'groupName2', '[roleName1]', '[roleName2]', ...
    mapJson 'notesFieldName', json:'jsonFieldName', type: 'STRING|INTEGER|DOUBLE|DATETIME|ARRAY_OF_STRING|ARRAY_OF_INTEGER|ARRAY_OF_DOUBLE|ARRAY_OF_DATETIME', isformula: true/false, formula: '', readonly: true/false, writeonly: true/false
    mapJson ...
	events EVENT_NAME: {
	}
 }

 METHOD - one of:

  • GET
  • POST
  • DELETE

STRATEGY_NAME - one of:

...