Setting autoarchive rules when creating a job schedule
Set properties of the ArchiveRule element, as shown in the following example, to set autoarchive rules for a report when you create a schedule for the report. If you set an expiration age, express the age in minutes. For example, to set an expiration age of 30 days, express the age as 43200 minutes. If you want the file to inherit archive rules from a file or folder, set IsInherited to True and use InheritedFrom to show the path to the file or folder from which the file inherits its rules.
<SOAP-ENV:Body>
<SubmitJob>
<JobName>pie</JobName>
<Priority>500</Priority>
<InputFileName>/Inventory/pie.rptdesign</InputFileName>
<RunLatestVersion>true</RunLatestVersion>
<RequestedOutputFile>
<Name>/Inventory/pie.rptdocument</Name>
<ReplaceExisting>false</ReplaceExisting>
<ArchiveRule>
<FileType>rptdocument</FileType>
<ArchiveOnExpiration>true</ArchiveOnExpiration>
<ExpirationAge>43200</ExpirationAge>
<IsInherited>false</IsInherited>
</ArchiveRule>
…
</SubmitJob>
</SOAP-ENV:Body>
The response to this operation is the JobId if the job succeeds. If the job fails, an error message appears.