POST <webiURL>/documents/{documentId}/zips?reportIds={reportId[,...]}
Where:
It is represented by a list of integers separated with a comma. This parameter is optional. If not present, all the reports of the document are archived.
Request body: the script that allows the file archiving.
Response type: application/xml or application/json
The response is a message stating the success or failure of the request.
POST <webiURL>/documents/14695/zips?reportIds=1,3
Request body:
<zipfile> <zipentry name="index.html"> <![CDATA[ <html> <head> <title>Save As HTML (customized)</title> <script language="javascript" src="reports.js"></script> </head> <body bgcolor="#EEEEEE"> <div id='content'></div> <script> var content = document.getElementById('content'); content.innerHTML = ''; for (var key in reportIds) { var reportLink = "<a href='" + key + "/report.html'>"; reportLink += reportIds[key]['name']; reportLink += '</a>'; reportLink += '<br/>'; content.innerHTML += reportLink; } </script> </body> </html> ]]> </zipentry> <zipentry name="report.html"> <![CDATA[ <html> <head></head> <body></body> </html> ]]> </zipentry> </zipfile>
Response:
<success> <message>The resource of type 'ZipFile' with identifier '0' has been successfully created.</message> <id>0</id> </success>