Pagination
Some Data Streams are too large to get all the records via the API in a single call. In such cases, the API lets you paginate the results via the skip and limit parameters.
Last updated
Some Data Streams are too large to get all the records via the API in a single call. In such cases, the API lets you paginate the results via the skip and limit parameters.
Last updated
GET
https://api.fusionbase.com/api/v2/stream/data/{STREAM_ID}?skip=0&limit=2&format=json
Some Data Streams are too large to get all the records via the API in a single call. In such cases the API lets you paginate the results via the skip
and limit
parameters.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
This is a sample data response, the response is always a list of dicts. If format is not explicitly specified, the default response format is msgpack.
skip
and limit
ParametersWhen querying a data stream, you can control the subset of records you retrieve by using skip
and limit
parameters. These parameters are crucial for pagination and managing large datasets.
skip
Parameter: This parameter defines the number of records to skip before starting to collect the result set. It is used to bypass a specific number of entries at the beginning of the data stream. For example, skip=10
means the first 10 records in the data stream will be skipped.
limit
Parameter: This parameter specifies the maximum number of records to include in the result set. It effectively limits the size of your data retrieval. For instance, limit=10
means only 10 records will be retrieved after applying the skip
parameter.
Consider a data stream containing a sequence of records represented by numbers:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
,21,22,23,24,25,...]
Applying the query parameters ?skip=
10&limit=
10:
Skip: The first 10 records (1
to 10
) are skipped.
Limit: The next 10 records after the skipped ones are included in the result set. These are records 11
to 20
.
So, the resulting dataset retrieved with these parameters will be:
[11,12,13,14,15,16,17,18,19,20]
These parameters are particularly useful in scenarios where you need to handle large volumes of data, allowing for efficient data access and reducing the load on both the server and client sides.
STREAM_ID*
String
The ID of the Data Stream
skip
Integer
Indicates the number of records that should be skipped from the beginning of the Data Stream.
limit
Integer
Indicates the number of records that are retrieved in the result set.
format
String