Hi Sumedha, Offset is the starting point for the return data. Say if there are 25 items and someone wants to get last 5 items, he can set the offset to 20 and limit it to 5.
On Fri, Mar 13, 2015 at 12:04 PM, Sumedha Rubasinghe <[email protected]> wrote: > Why not make this something like, > > GET apps/mobile/v1 - gives a list of all apps > GET apps/mobile/v1/<query> - gives a matching app list > GET apps/mobile/v1/<query>/limit/<no of apps> - limits the list of apps > shown > > - Its more RESTy. > - will also facilitate other type of app downloads > > > What is the offset about? > > > > > On Thu, Mar 5, 2015 at 7:52 AM, Chathura Dilan <[email protected]> wrote: > >> Hi All, >> >> To provide app information to CDM, we decided to developed a Jax-RS web >> service. This web service will be connected to CDM through mutual auth. >> >> The information about web service as follows >> >> *Path* >> >> GET mobileapp-services/v1/apps >> >> *Parameters* >> >> >> >> *Name* >> >> *Located in* >> >> *Description* >> >> *Required* >> >> *Type* >> >> q >> >> query >> >> Search the app by name >> >> false >> >> string >> >> limit >> >> query >> >> Number of records to be displayed >> >> false >> >> number >> >> offset >> >> query >> >> Offset of the app list >> >> false >> >> number >> >> >> >> *Responses* >> >> *Status 200* >> >> Sample Response >> >> { >> "apps": [ >> { >> "id": "Szqw45623", >> "name": "WSO2 Con", >> "type": "entrpirse", >> "platform": "android", >> "version": 1, >> "location": "https://192.168.1.1:9443/apps/app.apk", >> "iconImage": "https://192.168.1.1:9443/images/app.png", >> "packageName": "com.wso2.conapp", >> "identifier": "com.wso2.conapp" >> }, >> { >> "id": "R456xxEr", >> "name": "Antivirus", >> "type": "public", >> "platform": "android", >> "version": 1, >> "iconImage": "https://192.168.1.1:9443/images/app1.png", >> "packageName": "com.wso2.antiv", >> "identifier": "com.wso2.antiv" >> }, >> { >> "id": "DD4567we", >> "name": "WSO2 Dinner on Demand", >> "type": "public", >> "platform": "ios", >> "version": 2, >> "iconImage": "https://192.168.1.1:9443/images/app.png", >> "appIdentifier": "com.wso2.dod", >> "identifier": "com.wso2.dod" >> }, >> { >> "id": "Tyere34343", >> "name": "WSO2 Sports", >> "type": "webapp", >> "platform": "all", >> "version": 2, >> "location": "https://192.168.1.1:9443/apps/webapp", >> "iconImage": "https://192.168.1.1:9443/images/app.png", >> "identifier": "https://192.168.1.1:9443/apps/webapp" >> } >> ], >> "query": { >> "status": "ok", >> "found": 4, >> "length": 10, >> "offset": 110, >> "total": 114 >> } >> } >> >> >> Also Please mention if you need any search queries for this version of >> the API >> >> -- >> Regards, >> >> Chatura Dilan Perera >> *(Senior Software Engineer** - WSO2 Inc.**)* >> www.dilan.me >> > > > > -- > /sumedha > m: +94 773017743 > b : bit.ly/sumedha > -- Regards, Chatura Dilan Perera *(Senior Software Engineer** - WSO2 Inc.**)* www.dilan.me
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
