If you are looking to develop and deploy REST APIs for your AEM and/or other web/mobile applications/services, and want to know the options, design considerations and places to be mindful of, you are in the right place.
Depends on the REST API framework of your choice (and I will walk through them in the section below), there are several options to develop and deploy REST APIs for your AEM applications. The most obvious one is Apache Sling. AEM uses Apache Sling as the REST web application framework, hence to implement REST API with Sling, you will create Sling servlets. If you want to develop and deploy your REST APIs inside AEM, but also not limit to AEM in the future, JAX-RS based Jersey is a good choice. I will demonstrate the JAX-RS and Jersey architecture below as well. If you are not bound to AEM and going to develop and deploy your REST APIs outside, you are free to choose any API framework and tech stack. You can choose a popular Java API framework like Spring or Spring Boot, or you can choose a serverless and GraphQL approach with AWS AppSync and AWS Lambda.