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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
11 4 3 5

Immediate extraction using existing Instrument Lists and Report Templates using REST APIs

From the tutorials, I see that it is possible to perform a direct EOD data fetch sending the required fields and identifier lists. Also, it describes how to schedule an extraction through the REST APIs using existing instrument lists and report templates. But is it possible to use existing instrument lists and report templates to make a direct extraction call? That is, be able to get the data directly from the request, rather than an extraction file be generated. If so, could someone point to an example?

Thanks!

dss-rest-apidssdatascope-selectricsrest-apiextractionon-demand-extraction
icon clock
10 |1500

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

Upvotes
Accepted
13.7k 26 8 12

@nisheeth.agarwal

The easiest way to retrieve data directly and immediately is by using the OnDemand API calls.

You can refer to an existing instrument list in an OnDemand extraction API call, but not to an existing report template (but that is not really required).

Instrument list

If you are not using the .Net SDK, you can simply follow the explanations in the REST API Tutorial 9. We do not deliver downloadable sample code for this, but you do not really need any as it is just a very simple modification of the OnDemand extraction. You can easily apply the described change to the OnDemand extractions in all the other REST API Tutorials.

Report template

An OnDemand extraction defines the report template by the data type defined in the extraction request itself, so you cannot refer to a custom one you predefined and saved on the server.

All you really need to do is specify the content field names in the extraction request, this is quite easy.

icon clock
10 |1500

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

Thanks Christiaan, that is what I wanted to know.

Upvotes
648 5 4 6

Hi @nisheeth.agarwal

You can use below example for immediate scheduling,

{

"Name": "example-eod1",

"TimeZone": "Central Standard Time",

"Recurrence": {

"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.Schedules.SingleRecurrence",

"ExtractionDateTime": "2017-03-30T01:31:16.463+05:30",

"IsImmediate": true

},

"Trigger": {

"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.Schedules.ImmediateTrigger",

"LimitReportToTodaysData": true

},

"ListId": "0x05a932aa203b3036",

"ReportTemplateId": "0x0588adc24c6b2f86"

}


icon clock
10 |1500

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

Hi Nityanand,

Thanks for the reply!

But what you suggest would only create a schedule to be executed right? Which would in turn produce an extraction file. And it would require more REST calls to then fetch the contents of this file. Would it be possible to get the response in my initial call itself?