Hello both,

On customer project we deployed different engine and handler to use OFBiz as Rest api server. I think I would be nice to share the different method use to expose service, screen and other thourgh OFBiz.

I hope that we have the time during the next month to share our work.

Nicolas

Le 13/03/2024 à 10:55, Daniel Watford a écrit :
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.

Reply via email to