Now I have a template using REST API like below:
How can I add the codes to make the output file compressed, just like xxx.csv.gz?
JSONOrderedObject reportTemplateJSONObject = new JSONOrderedObject() .put("@odata.type", "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.HistoricalReferenceReportTemplate") .put("ShowColumnHeaders", true)
.put("Name", reportTemplateName )
.put("Headers", new JSONArray() )
.put("Trailers", new JSONArray() )
.put("ContentFields", new JSONArray() .put( new JSONObject() .put("FieldName", "RIC") .put( "Format", JSONObject.NULL)) .put( new JSONObject() .put("FieldName", "Change Date") .put( "Format", JSONObject.NULL)) .put( new JSONObject() .put("FieldName", "Strike Price") .put( "Format", JSONObject.NULL)) .put( new JSONObject() .put("FieldName", "Expiration Date") .put( "Format", JSONObject.NULL)) .put( new JSONObject() .put("FieldName", "Exercise Style") .put( "Format", JSONObject.NULL)) .put( new JSONObject() .put("FieldName", "OCC Code") .put( "Format", JSONObject.NULL)) .put( new JSONObject() .put("FieldName", "Tick Value") .put( "Format", JSONObject.NULL)) .put( new JSONObject() .put("FieldName", "Method of Delivery") .put( "Format", JSONObject.NULL)) .put( new JSONObject() .put("FieldName", "Asset Category") .put( "Format", JSONObject.NULL)) .put( new JSONObject() .put("FieldName", "CFI Code") .put( "Format", JSONObject.NULL)) .put( new JSONObject() .put("FieldName", "ISIN") .put( "Format", JSONObject.NULL)) .put( new JSONObject() .put("FieldName", "Place of Listing Flag") .put( "Format", JSONObject.NULL)) .put( new JSONObject() .put("FieldName", "Market Segment Name") .put( "Format", JSONObject.NULL)) .put( new JSONObject() .put("FieldName", "Start date") .put( "Format", JSONObject.NULL)) ) .put("Condition", new JSONOrderedObject() .put( "StartDate", StartDate + "T00:00:00.000-00:00" ) .put( "EndDate", EndDate + "T00:00:00.000-00:00" ));