Solved
How to create a RESTful API using servlet in CQ?
Hi,
I have a sling servlet as below:
@SlingServlet(
label = "REST API",
metatype = true,
resourceTypes = {"sling/servlet/default"},
methods = {"GET"},
extensions = {"json"},
)
Can I call the servlet using below URL instead of /content/path.json?id=< category_id>
/content/path/<category_id>
this API should get <category_id> to run backend logic and return data.
Any suggestion?
Thanks
Jasmine