What problem does it solve?
This skill removes the guesswork and repetitive setup when building RESTful APIs in ColdBox by providing clear patterns for routing, handlers, authentication, versioning, and consistent response formatting so teams can ship stable APIs faster.
Core Features & Use Cases
- RestHandler patterns & rendering: use RestHandler and event.renderData to produce consistent JSON responses and proper HTTP status codes.
- Authentication & token lifecycle: implement JWT/bearer authentication, login/refresh/logout flows, and secure endpoints with cbSecurity.
- Versioning, routing & pagination: organize APIs into modules for version isolation, define resource routes, and return paginated memento-style payloads with meta and links.
- Use Case: implement a versioned users/posts API with JWT-secured endpoints, create/update/delete actions, validation errors as 422 responses, and paginated index endpoints.
Quick Start
Create a RestHandler users API in a module with /api/v1 routing, JWT login/refresh endpoints, and use event.renderData for all JSON success and error responses.