Hi Michael,

I'm very keen to see how the REST API component has been progressing. Do
you think it could be added to ofbiz-framework soon so that we could get a
version incorporated in the 24.x release?

One feature that I think would be useful would be to produce an access
token within OFBiz's decorator screens such that the token is available for
use by javascript running on a page. We might then be able to build an HTTP
client delivered through ofbizutils.js (or other) which helps with making
authenticated calls to the REST API.

The approach of adding an access token to a rendered page was implemented
in the example plugin's example-react-decorator screen using
ApiTokenGenerator.groovy and ApiKey.ftl. ApiContext.tsx would then retrieve
the key from the page and add it to an authorization header in a fetch call.

Another feature I'm hoping for is for components to register themselves
with the API at various paths, rather than the rest-api component
attempting to derive api endpoints from the various services xml file. I
think this would allow for a leaner api without the need to work around any
legacy stuff from the service api. That being said, I imagine a lot of
components would end up registering thin adapter layers to their standard
services.

Looking forward to seeing the new component and contributing where possible.

Thanks,

Dan.

-- 
Daniel Watford

Reply via email to