Skip to content

Full ticket export

ExportAllTickets.cs streams every project ticket into CSV by using EnumerateTicketsAsync with PerPage = 200.

The async iterator follows Okatana's server-provided next_page_url; it does not compute page URLs. This makes the export tolerant of paginator changes and centralizes pagination security checks.

For large exports, process each item as it arrives rather than loading all pages into memory. Write to a temporary file and atomically replace the final export when complete. Pass a cancellation token from the job scheduler so shutdowns stop HTTP calls and file work cleanly.

If the destination supports resumable imports, persist a checkpoint after each page or output chunk. Do not assume ticket order alone is a durable incremental cursor unless the API contract states that behavior.