Specifically, how can we create the part of the XML PriceHistory Report indicated in bold using Java API Rest?
…
<NumericDataField>
<Name>Open Price</Name>
<FieldNumber>5</FieldNumber>
<DataFieldType>Numeric</DataFieldType>
<Justification>Left</Justification>
<Width>18</Width>
<WidthStyle>Variable</WidthStyle>
<DecimalPlaces>5</DecimalPlaces>
<DecimalSeparator>Period</DecimalSeparator>
<IntegerPlaces>12</IntegerPlaces>
<LeadingZeroes>No</LeadingZeroes>
<TrailingZeroes>No</TrailingZeroes>
<ThousandSeparator>No</ThousandSeparator>
<ThousandCharacter>Comma</ThousandCharacter>
<NegativePosition>Before</NegativePosition>
</NumericDataField>
<NumericDataField>
<Name>High Price</Name>
<FieldNumber>6</FieldNumber>
<DataFieldType>Numeric</DataFieldType>
<Justification>Left</Justification>
<Width>18</Width>
<WidthStyle>Variable</WidthStyle>
<DecimalPlaces>5</DecimalPlaces>
<DecimalSeparator>Period</DecimalSeparator>
<IntegerPlaces>12</IntegerPlaces>
<LeadingZeroes>No</LeadingZeroes>
<TrailingZeroes>No</TrailingZeroes>
<ThousandSeparator>No</ThousandSeparator>
<ThousandCharacter>Comma</ThousandCharacter>
<NegativePosition>Before</NegativePosition>
</NumericDataField>
…
Below you can see a first attempt to create the Pricing Report attached.
/**
* Create a PriceHistory Report Template
*
*@paramreportTemplateName
*@returnreportTemplateId
*/
publicString createPHReportTemplate(StringreportTemplateName) {
StringreportTemplateId="";
try{
HttpPosthttppost=newHttpPost(urlHost+"/Extractions/PriceHistoryReportTemplates");
httppost.addHeader("content-type","application/json;odata.metadata=minimal");
httppost.addHeader("Authorization","Token "+sessionToken);
// Note: content fields are specific to each report template type
JSONOrderedObjectTAndCTemplateJSONObject=newJSONOrderedObject()
.put("@odata.type","#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.PriceHistoryReportTemplate")
.put("Name",reportTemplateName)
.put("ShowColumnHeaders",true)
.put("CompressionType","None")
.put("Headers",newJSONArray() )
.put("OutputFormat","CommaSeparatedValues")
.put("Delimiter","None")
.put("DeliveryType","None")
.put("Trailers",newJSONArray() )
.put("ContentFields",newJSONArray()
.put(newJSONObject()
.put("FieldName","Trade Date")
.put("Format","ContentFieldDateFormat")
.put("DateFormat","yyyyMMdd")
.put("Justification","Left")