Alternate to defining entities and resources for crud operaitons

Hello All,

I want to create rest resources for CRUD operations on some entities. I am following the pattern I saw in PopCommerce and UDM. We define a entity, create a rest resource, where we define the method and operation.

Something like this -

<resource name="storePicklist" require-authentication="anonymous-all">
        <method type="post"><entity name="org.apache.ofbiz.shipment.picklist.Picklist" operation="store"/></method>
    </resource>

Is there any other way to do it, simplify it even more. Like I could have a flag in the entity definition, if I set it to true it supports standard methods and operations of GET, PUT, POST and DELETE.

If such feature does not exist, Is it wise to implement it ?

There are a few alternatives, the most similar to what you are describing are the general entity endpoints under the /rest path. The best docs for that are in the comments of that screen file:

1 Like

Thanks a lot ! @jonesde

This is exactly what I was looking for.