A long export can be started asynchronously and its progress polled through the Server REST API task status.

Start the export, then read the task status.
// Run the template producing a task key
var export = WebRequest.Create($"{RestUrl}/reporttemplates/{ReportTemplateKey}/run");
export.Method = "PUT";
export.Headers.Add("x-sti-SessionKey", sessionKey);
export.Headers.Add("x-sti-DestinationItemKey", pdfFileItemKey);
var taskKey = GetResponseJson(export).Value<string>("ResultTaskKey");

// Poll the task status
var statusReq = WebRequest.Create($"{RestUrl}/task/{taskKey}");
statusReq.Headers.Add("x-sti-SessionKey", sessionKey);
var status = GetResponseJson(statusReq).Value<JObject>("ResultStatus");
// status["IsRunning"], status["IsFinished"], status["IsError"] ..."));

How it works. The export is a background task keyed by id, so a client can start it and check on its progress without holding the connection open.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.