Help writing first REST API

I have never built a rest service in lucee. Can someone point me in the right direction on getting started. I have come across tafey, not sure if its actively being developed. Or whats the best approach? Seems to be very little recent documentation on rest. Help me get started please.


ColdBox MVC does REST very easily and is quite actively developed. Here’s a getting started guide that will have an API up and running in a couple minutes.

1 Like

I second Brad… I did many REST APIs the “Coldbox way” together with the ColdBox REST Base Handler Module


Hi @nalbee,
I hope this helps a lot for you.


How do you know when you need a ReST API?

If you need to provide an API for developers of other applications to interact with yours, then it has to be ReST.

If you don’t need to provide that feature, then it becomes a design decision. In general if you build your application with ReST APIs then it can scale better in the future because it will make it easier to make it a distributed application, so you have to weigh that against the added resources that will be required in order to implement it that way, and determine if it makes sense for your scenario.

So, right now, the application we are working on is strictly a web-based. Eventually we’d like to have a native app. Would a native app be able to hook into the functions we are currently writing for the web-based version? Would that be an example of a need for a ReST app?

If you’re writing a SPA or native you prob need to use rest.

Right. The native app will communicate with the server through the RESTful API.

Thank you for confirming, I sincerely appreciate it.