Interface ContainerCollectionResponseWithCursorResponse

A Promise to a response that can be awaited like normal, but at the risk of not getting all results due to API limits. In which case a nextCursor field is returned to request the next page. Helper methods are provided to abstract away the pagination.

Example using client.timeseries.list with a per-request limit of 1000:

const response = client.timeseries.list({ filter: { assetIds: [ASSET_ID] }, limit: 1000 });

You can get up to 1000 elements with normal await:

const { items, nextCursor } = await response;

You can use autoPagingToArray to get more items than the per-request limit. E.g. an array of up to 5000 items:

const timeseries = await response.autoPagingToArray({ limit: 5000 });

You may also specify { limit: Infinity } to get all results.

You can also iterate through all items (unless you break out of the loop) like so:

for await (const value of response) {
// do something to value
}
interface ContainerCollectionResponseWithCursorResponse {
    autoPagingEach: AutoPagingEach<ContainerDefinition>;
    autoPagingToArray: AutoPagingToArray<ContainerDefinition>;
}

Hierarchy (view full)

Properties