REST limit parameter does not work?

1
Hi, I've implemented the Rijksmuseum REST example. The data from Rijksmuseum is persisted in my domainmodel. Next I made a Service Definition which pointed to a microflow to retrieve all ArtObjects from my own domainmodel and give that back as transient objects. That's all working fine. However, when I try to use the 'offset' and 'limit' parameters, I notice that offset works nice, but the limit does not. The url I use in my browser points to my local machine and reads: http://localhost:8080/rest/artobjectsservice/?data=true&contenttype=json&offset=6&limit=2. I expect that the returned objects start at 207 (I deleted first 200 records, so 201 is the first record) and end at 209. However, the result is that the list start at 207 and shows all records until the end (which is 210). What is going wrong? This is the result by the way: [{ "ArtobjectWebimage": {"Url": "http://lh6.ggpht.com/6aIGcpZ79srqgaaYflpZVa0w4a9ELZciYDmDcJxuCLRSrbYGb0KCZTED7BMkAHcOZUXNQytlXqiBJaN1cdKss-j9RE=s0"}, "PrincipalOrFirstMaker": "Anonymous", "Title": "Vers geschreven door J.B.F. van Gogh voor zijn executie, 1778", "key": 207 },{ "ArtobjectWebimage": {"Url": "http://lh5.ggpht.com/QjSoKZOeS1lkYXUgPHgy9W3ZwFYoDGbXLknZz5RyjrKbi4eBMDW5ek5O2vcD5Mp-EtAWSIb8vCrqdR2I2HQrBDgpg=s0"}, "PrincipalOrFirstMaker": "Vincent van Gogh", "Title": "Road behind the Parsonage Garden in Nuenen", "key": 208 },{ "ArtobjectWebimage": {"Url": "http://lh4.ggpht.com/p0gQfwn5ryZ6Fazbkv9dG2MGXJlZF0SGuzQRwyBm8W-7H-JhYUgdhkh6R2iDstWCMaAk-Sisg5O1Z1PM4GVGL0xNZHIL=s0"}, "PrincipalOrFirstMaker": "Vincent van Gogh", "Title": "Schelpenvisser", "key": 209 },{ "ArtobjectWebimage": {"Url": "http://lh5.ggpht.com/LeONPNh8oPUpjMUWxUe3d0GDkktDb3FKgQuy9rRe-1usnLs6u5yrQfvlLC3nARNJWTe3ZOLUR7-hbe1Zai6NN3RU8=s0"}, "PrincipalOrFirstMaker": "Vincent van Gogh", "Title": "Korensnijder met hoed, van achteren gezien", "key": 210 }]
asked
1 answers
1

Shouldn't you need to use the 'top' command, thus $top=2 as mentioned here:

https://world.mendix.com/display/refguide5/OData+Query+Options

Top (limit) Limiting the amount of returned objects can be done using the $top query option, where the value is a positive integer. For example: ?$top=100

answered