Azure blockchain workbench API limitations on contracts workflow id

Ramanjani, Rajiv 26 Reputation points
2020-06-25T19:30:57.15+00:00

When I try to do a GET request with the API for my azure blockchain workbench - specifically to this:
https://p8blkchwkbench-bk3m3c-api.azurewebsites.net/api/v2/contracts?workflowId=250

it returns only the first 20 contracts under that workflowId. Although there are more - the JSON only returns the first 20.

Is there any way to retrieve the latest 20 rather than the earliest 20 with the above API

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,574 questions
{count} vote

2 answers

Sort by: Most helpful
  1. SanaCMSFT-8922 301 Reputation points
    2020-07-06T12:43:44.497+00:00

    Hi RamanjaniRajiv-1749,

    Sorry for the delay.

    Responding to your last query, the choice of ordering by ascending or descending order is currently not supported.

    Let us know if u have any further questions.

    Thanks,
    Sana


  2. Ramanjani, Rajiv 26 Reputation points
    2020-07-19T21:39:28.077+00:00

    You guys are wrong here. I fixed the problem myself
    Try this:
    https://p8blkchwkbench-bk3m3c-api.azurewebsites.net/api/v2/contracts?workflowId=250&sortBy=Timestamp&top=5

    when you give sortBy=Timestamp it sorts it in the descending order by putting the latest contracts on top.

    0 comments No comments