browse_next
When the number of nodes exceeds the server's limit per page (the underlying system limits a single request to a maximum of 1000 records), the server includes a non-empty continuation_point (paging token) in the BrowseResult. Use browse_next to retrieve the next page.
- To obtain a continuation_point, you must use browse_with_paging, Regular browse Will be discarded CP (only References are retained; continuation tokens are not read).
Signature
def browse_next(self,
continuation_point: Optional[bytes],
release: bool = False) -> BrowsePage: ...
| Parameters | Note |
|---|---|
| continuation_point | Last browse_with_paging / browse_next returned continuation token (bytes) |
| release | True = Abort the continuation; the server releases resources (does not return references) |
BrowsePage Field
@dataclass
class BrowsePage:
references: List[Reference] # Default: None; becomes [] after construction
continuation_point: Optional[bytes] = None # "None" means there are no more pages
Complete Page-Turning Example
page = ua.browse_with_paging("ns=2;s=BigFolder")
all_refs = list(page.references)
while page.continuation_point is not None:
page = ua.browse_next(page.continuation_point)
all_refs.extend(page.references)
print(f"Total {len(all_refs)} children")
Proactive Release (Saves Server Resources)
The server maintains ContinuationPoint a state for each one, which consumes resources. If you decide to stop browsing partway through, call the method to explicitly release=True release it:
ua.browse_next(page.continuation_point, release=True)
In "release" mode, the server only releases references and no longer issues new ones, so the result BrowsePage.references is an empty list, and the value is continuation_point None.SDK I don't know how long it takes for the server to reclaim unreleased resources. CP —— That's a server-side issue; if you want to ensure that resources are released, do so explicitly release=True.
Note
continuation_pointIt is opaquebytes, Do not modify / parse- Always useMost recent
browse_nextreturnedcontinuation_pointto continue (The server returns a new one with each page turn CP) - CP The maximum number and the timing of retrieval are determined by the server; the client SDK side only performs transparent forwarding.