Cursor issue

Hi guys, my proxy queries more than 10 entities and hence I used cursor to get next set of data, which didnt happen. Kindly check the attached proxy and suggest a solution.

Use this, http://siddharth1-test.apigee.net/cats-10/cat_05

There are 22 records of cat_05 in BaaS.

This doesnt work.

http://siddharth1-test.apigee.net/cats-10/cat_05?...

@Anil Sagar

0 4 230
4 REPLIES 4

@Barahalikar Siddharth

It seems that you have coded your target URL as

<AssignVariable>
  <Name>target.url</Name>       
  <Value>http://api.usergrid.com/siddharth1/sandbox/cats?ql=select * where cat_id='{urirequest.cat_id}'</Value>
</AssignVariable>

This cause that each time your request will hit to this URL only. The cursor query parameter get skipped in flow.

Yes, is there any work around for the cursor to work?

One of the possible solution is to modify the request through javascript. i.e adding the queryparam "ql" and "cursor" (if present). So that the request you want will be hit.

I have tried this solution in your proxy. I detached the AssignMesaage Policy and add one javascript policy to your request flow.Its basic solution, you can modify accordingly.

Here is my code.