HI
I try to build some Java code to schedule a task to question some inactive RIC but it looks dow not work I got bad request error. this is my java code, any help?
protected JSONArray getRICJsonArray(List<String> ric) {
JSONArray ricList = new JSONArray();
ric.forEach(e ->
ricList.put(new JSONObject()
.put("@odata.type", "#ThomsonReuters.Dss.Api.Search.HistorcalSearchResult")
.put("Description", "Historical Instrument")
.put("Identifier", e)
.put("IdentifierType", "Ric")
.put("FirstDate", "2006-01-01T00:00:00.000Z")
.put("LastDate", LocalDate.now().toString() + "T23:59:59.000Z")
));
return ricList;
}
{"Identifiers":[{"LastDate":"2017-05-26T23:59:59.000Z","Description":"Historical Instrument","Identifier":"PETM.OQ","@odata.type":"#ThomsonReuters.Dss.Api.Search.HistorcalSearchResult","FirstDate":"2006-01-01T00:00:00.000Z","IdentifierType":"Ric"}],"KeepDuplicates":true}
if I replace JSONObject to JSONOrderObject I got
{"Identifiers":["{\"@odata.type\":\"#ThomsonReuters.Dss.Api.Search.HistorcalSearchResult\",\"Description\":\"Historical Instrument\",\"Identifier\":\"PETM.OQ\",\"IdentifierType\":\"Ric\",\"FirstDate\":\"2006-01-01T00:00:00.000Z\",\"LastDate\":\"2017-05-26T23:59:59.000Z\"}"],"KeepDuplicates":true}
Both doesnot work any Idea?