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
This endpoint will allow clients to fetch the list of block skylink hashes.
Design or Proposal
Add a new endpoint such as GET /hash.
Requesting the data should allow for limiting the period by a timestamp (e.g. all records after 2021-11-11).
There are two ways we can go about delivering the data:
pagination
limit on number of records
Pagination
This approach is quite simple - break the data down into pages with predefined size and allow provide a link to the next page in the payload. If that link is not present then the user has the last page of data.
Example payload:
{
"hashes": [ <JSON Array of hash objects> ],
"nextPage": <link to the next page>
}
This approach can work with the other standard approach where the offset if given by query parameters.
The main advantage of this approach is that clients won't need to process the data before querying the next page.
Limit the number of records returned
This works in a slight less obvious way but it achieves the same thing - we still limit the number of records we return but we do not provide pagination. Instead, the user can read and parse the data, figure out the last timestamp present and make a new request with that timestamp+1ns.
The main advantage of this approach is the sheer simplicity of not implementing pagination at all.
The text was updated successfully, but these errors were encountered:
Overview
This endpoint will allow clients to fetch the list of block skylink hashes.
Design or Proposal
Add a new endpoint such as
GET /hash
.Requesting the data should allow for limiting the period by a timestamp (e.g. all records after 2021-11-11).
There are two ways we can go about delivering the data:
Pagination
This approach is quite simple - break the data down into pages with predefined size and allow provide a link to the next page in the payload. If that link is not present then the user has the last page of data.
Example payload:
This approach can work with the other standard approach where the offset if given by query parameters.
The main advantage of this approach is that clients won't need to process the data before querying the next page.
Limit the number of records returned
This works in a slight less obvious way but it achieves the same thing - we still limit the number of records we return but we do not provide pagination. Instead, the user can read and parse the data, figure out the last timestamp present and make a new request with that timestamp+1ns.
The main advantage of this approach is the sheer simplicity of not implementing pagination at all.
The text was updated successfully, but these errors were encountered: