CF10/ColdBox-3.8.1- Coldbox-Relax Integration


I am trying to set up a web service and thought that I’d make use of Coldbox-Relax. I watched the intro video of how to install and configure, by adding to the “modules” folder within my CF application. I can’t quite get my head to wrap around the following:
-If my domain is “http://localhost/myapp”; then I made the call to one of the apis like this “http://localhost/myapp/rest/:api/test.jon”. The returned message was that the api/test is an unregistered event.

-Can I use Relax a separately from my application? If yes, how then how can the calling application make a call to the Relax services?

-I noticed in the in the “myapi” example included with the Relax download, all api resources are defined with handler “rest.*”, there’s not such “rest” handler within the Relax module. Is this a handler that supposed to be added to my application handlers?

Am a bit confused on the connection between the main application and the Relax module. I searched but not able to find additional indept tutorial, other than the intro one. Still a newbie here, so please pardon my trivial questions. Thanks!

Hi Tevane,

In summary, Relax is built to help you model, document and build your RESTFul services. It will not scaffold or generate your handlers (yet). The relax CFC you create with your API Spec is used to define the resources you want to create, examples, etc. Then Relax will document that descriptor for you and provide a way to test it as well. It also generates the routing file for you so you can start building the service.

So usually you use it to define the API you want to build, once you are satisfied with the routing and documentation, you can grab the routing file and start implementing it.

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager: