You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The list of winningBids was removed from the node, edge and cluster details payload (/networks/{networkID}/nodes/{nodeID}, /networks/{networkID}/edges/{edgeID}/ ) because it was slowing things down significantly for nodes with many tenders.
Instead I created 3 new endpoints where the bids can be retrieved in a paginated way to avoid long and heavy requests:
/networks/{networkID}/nodes/{nodeID}/bids - to retrieve the tenders of an actor
/networks/{networkID}/clusters/{clusterID}/bids - to retrieve the tenders of a cluster
/networks/{networkID}/edges/{edgeID}/bids - to retrieve the tenders of an edge
All the 3 endpoints support 2 parameters for pagination:
limit - how many tenders should be returned per page
page - number of the page, should be increased as you load results until the response is empty
To load the first 10 results of a node, for example you can make the following request:
GET /networks/{networkID}/nodes/{nodeID}/bids?limit=10&page=1
Then to load the next 10 results you would do
GET /networks/{networkID}/nodes/{nodeID}/bids?limit=10&page=2
and so on until you retrieve all the results.
You can tell that you've reached the last page by the fact that the number of results is < limit. If you go past the page with the last set of results, on the next pages after that you will just get an empty array.
The text was updated successfully, but these errors were encountered:
@ca1yps0 I added some more details to the bid results, as we discussed.
So the paginated results on /node/{nodeID}/bids, edge/{edgeId}/bids/cluster/{clusterID}/bids now look like this:
{
"page": "{number of the current page}",
"resultsPerPage": "{current number of results to be returned per page}",
"totalResults": "{total number of results}",
"totalPages": "{number of pages with results}",
"bids": [{array of bids exactly as they looked like before}]
}
The list of
winningBids
was removed from the node, edge and cluster details payload (/networks/{networkID}/nodes/{nodeID}
,/networks/{networkID}/edges/{edgeID}/
) because it was slowing things down significantly for nodes with many tenders.Instead I created 3 new endpoints where the bids can be retrieved in a paginated way to avoid long and heavy requests:
/networks/{networkID}/nodes/{nodeID}/bids
- to retrieve the tenders of an actor/networks/{networkID}/clusters/{clusterID}/bids
- to retrieve the tenders of a cluster/networks/{networkID}/edges/{edgeID}/bids
- to retrieve the tenders of an edgeAll the 3 endpoints support 2 parameters for pagination:
limit
- how many tenders should be returned per pagepage
- number of the page, should be increased as you load results until the response is emptyTo load the first 10 results of a node, for example you can make the following request:
GET /networks/{networkID}/nodes/{nodeID}/bids?limit=10&page=1
Then to load the next 10 results you would do
GET /networks/{networkID}/nodes/{nodeID}/bids?limit=10&page=2
and so on until you retrieve all the results.
You can tell that you've reached the last page by the fact that the number of results is < limit. If you go past the page with the last set of results, on the next pages after that you will just get an empty array.
The text was updated successfully, but these errors were encountered: