For a deeper look into our DataScope Select SOAP API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
648 4 4 6

Is there any Java example in DSS REST API, which can do on demand extraction by using pre-defined report templates with fields ISIN,SEDOL,RIC,TICKER,Security Name and GICS Industry Code.

dss-rest-apidatascope-selectdssjavarest-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
582 8 12 23

Attached is an example. DSS REST On Demand Extraction does not takes a Report Template Id as param; thus the work around is:

  1. create an Immediate Schedule Extraction (for the Report Template)
  2. check if report is ready
  3. extract the files, when report is complete

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

This sample was added to the Java code sample package today (available under the downloads tab).

The sample under the downloads tab has been updated today.

Note: to create a schedule you need the instrumentListId and reportTemplateId. Code referring to manually created instrument list & report template can retrieve their respective IDs by name. See separate response for the coding details.

Upvotes
426 2 4 4

DSS REST doesn't provide Java Wrapper library like the REST C# library. However, there are Java examples demonstrate how to use HTTP requests. You can download the DSS Rest Java Code examples from DSS Rest Download tag and modify the extraction fields in the LegalEntityDetailReport examples.

.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Thanks @steven.peng, but that also did not answer my question. Consider I have report template (lets say T&C with fields ISIN, CUSIP etc) ready on my DSS or created using Java in the past. Now this report I want use in ON DEMAND EXTRACTION for the any given instruments.

Upvotes
648 4 4 6

Hi All,

Does anyone have solution for my question, this request came from client. If no solution then I can update back client accordingly.

Thanks, Nityanand

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
13.7k 26 8 12

Additional details to Susana's answer:

To create a schedule you need the instrumentListId and reportTemplateId. Code referring to manually created instrument list "myInstrumentListName" & report template "myReportTemplateName" can easily retrieve the respective IDs by name. See how to below (Java, HTTP REST and C#).

Java: see attached code (it is Susana's code with 2 added methods).

HTTP REST:

HTTP GET request by Instrument List name:

https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentListGetByName(ListName='myInstrumentListName')

HTTP response:

Location: https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentLists('')
{
	"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#InstrumentLists/$entity",
	"ListId": "0x054a3d8c310afc5b",
	"Name": "myInstrumentListName",
	... (etc.)
}

HTTP GET request by Report Template name:

https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ReportTemplateGetByName(Name='myReportTemplateName')

HTTP response:

{
	"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ReportTemplates/ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EndOfDayPricingReportTemplate/$entity",
	"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.EndOfDayPricingReportTemplate",
	"ReportTemplateId": "0x054a3dc609e52703",
	... (etc.)
}<br>

C# using the .Net SDK:

myInstrumentList = extractionsContext.InstrumentListOperations.GetByName("myInstrumentListName");
myInstrumentListId = myInstrumentList.ListId;

myReportTemplate = extractionsContext.ReportTemplateOperations.GetByName("myReportTemplateName");
myReportTemplateId = myReportTemplate.ReportTemplateId;<br>

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea