Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-27 Thread Ben Fortuna
Hi Lance, I would personally recommend that you find a different solution for serving REST APIs. I also thought it might be good to service an API from Sling, as it does make JSON a "first class citizen", but then I realised that Sling is geared towards serving resources from JCR and ultimately

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-27 Thread lancedolan
These APIs I'm looking to build are likely to use other OSGI services I've written, and perhaps even write to the JCR for other reasons. Imagine doing a GET /api/images/my-new-image.jpg and the image lives in Amazon S3, but you want to write some audit data into the JCR. I'm still thinking

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-27 Thread Roy Teeuwen
Hey Lance, If you really want to use jax-rs, have a look at the following: https://github.com/apache/aries-jax-rs-whiteboard Greets, Roy > On 27 Jan 2017, at 23:29, lancedolan wrote: > > These APIs I'm looking to

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-27 Thread Mike Nimer
Check out http://neba.io/ it should do what you need with Spring instead of Jersey. hope this helps --mike On Fri, Jan 27, 2017 at 3:27 PM, lancedolan wrote: > Hi friends, > > I've tried routing questions through stackoverflow to cut down my mails to > this list. I'm

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-27 Thread Andreas Schaefer Sr.
I never develop for Sling but a few years doing backend on AEM. So I am wondering if you used the Sling IDE Tooling (Eclipse or our IntelliJ Plugin) and debugged your code there. Did you try to use a Servlet that is bound to a Type instead of a Path? This might do what you want. Cheers - Andy

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-27 Thread Steven Walters
On Sat, Jan 28, 2017 at 6:27 AM, lancedolan wrote: > Hi friends, > > I've tried routing questions through stackoverflow to cut down my mails to > this list. I'm losing lots of time on this one, though, and am stuck. > > I need to create APIs which don't represent Sling

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-27 Thread Henry Saginor
Can’t you just create sling servlet registered to some resource type? You can then simply create JCR node(s) mapped to your resource type. You can also use a SynthaticResource via custom resource provider, which is the track you’re on and what Steven is suggesting. But I find that in most