A report template can be uploaded to other Server workspaces through the REST API, in size-limited chunks.

Create the file, then append chunks.
var chunks = SplitByteArrayIntoChunks(reportTemplateBytes, 90 * 1024);

// Create the template with the first chunk
var create = WebRequest.Create($"{RestUrl}/files");
create.Method = "POST";
create.Headers.Add("x-sti-SessionKey", sessionKey);
AddBody(create, new JObject {
    new JProperty("Ident", "ReportTemplateItem"),
    new JProperty("Name", reportTemplateName),
    new JProperty("Resource", Convert.ToBase64String(chunks[0].ToArray())) });

var fileKey = /* ResultItems[0].Key */;
var versionKey = /* ResultVersionKey */;

// Append the remaining chunks
for (int i = 1; i < chunks.Count; i++)
{
    var append = WebRequest.Create($"{RestUrl}/files/{fileKey}");
    append.Method = "PUT";
    append.Headers.Add("x-sti-SessionKey", sessionKey);
    append.Headers.Add("x-sti-VersionKey", versionKey);
    AddBody(append, new JObject { new JProperty("Resource", Convert.ToBase64String(chunks[i].ToArray())) });
}

How it works. Large templates are uploaded in ~90 KB chunks under one version key, so a report can be copied into any workspace over REST.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.