Pagination¶
Ticket and document list endpoints use a nested Laravel paginator. The SDK exposes it as OkatanaPage<T>.
var page = await client.Projects.ListTicketsAsync(projectId,
new ListTicketsOptions { PerPage = 100 });
Console.WriteLine($"Page {page.CurrentPage} of {page.LastPage}");
Console.WriteLine($"Total {page.Total}");
foreach (var ticket in page.Items) Console.WriteLine(ticket.Title);
Async enumeration¶
For full exports, use the provided IAsyncEnumerable<T> helpers:
await foreach (var ticket in client.Projects.EnumerateTicketsAsync(projectId,
new ListTicketsOptions { PerPage = 200 },
cancellationToken: cancellationToken))
{
await WriteTicketAsync(ticket, cancellationToken);
}
Organizations.EnumerateDocumentsAsync works the same way.
The iterator follows next_page_url supplied by the server. It does not assume that last_page, page numbering, or URL structure will remain constant. For credential safety, an absolute navigation URL must use the configured scheme/host/port and stay under the configured API base path. A cross-origin or path-escaping URL causes OkatanaUnexpectedResponseException before another HTTP request is sent.