I've implemented an application using Moqui Framework.I have a field named as "age" in entity.I am trying to get all record from entity where the age between 20 to 25. How to create rest service in order to get the given age between & How to specify the url for this requirement. This is the url:rest/s1/UserMargen/DetailsOfUser And i am getting as
{
"street": "Bridege",
"age": 22,
"city": "kol",
"username": "Debendu",
"lastUpdatedStamp": "2016-04-26T12:43:45+0000",
"userid": "2000"
},
{
"lastUpdatedStamp": "2016-04-26T12:42:42+0000",
"userid": "2001",
"street": "White",
"username": "rolla",
"city": "Ban",
"age": 20
},
{
"username": "Venkatesh",
"street": "T-nager",
"age": 28,
"userid": "2005",
"city": "chennai",
"lastUpdatedStamp": "2016-04-26T12:48:33+0000"
}
In rest.xml I have Defined as
<resource name="DetailsOfUser" >
<method type="get"><entity name="UserInDetails" operation="list"/></method>
<method type="post"><service name="UserMargen.UserMargenServices.create#userDetails"/></method>
<id name="age">
<method type="get"><entity name="UserInDetails" operation="list"/></method>
</id></resource>
If i give /rest/s1/UserMargen/DetailsOfUser/22 it will display which age equals 22. How to get records in between age from 20 to 25 ?