question

Upvotes
Accepted
68 3 4 8

Ghost list

Hello everybody,

With the web interface (https://hosted.datascope.reuters.com/dataScope) I created a list with a few instruments, a schedule with a template and a trigger.

I obtained the data.

I am now trying to obtain it by code, to master the API.

ReportExtraction re = extractionsContext.ReportExtractionOperations.Get("2"); // example
Schedule s = extractionsContext.ScheduleOperations.Get(re.ScheduleId);
EntityList l = extractionsContext.EntityListOperations.Get(s.ListId);

The two first lines seem OK, but "l", the EntityList, remains null, whereas the identifier in s.ListId corresponds to what appears in the URL in the web interface.

What did I miss ?

tick-history-rest-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
13.7k 26 8 12

@hubert.Canevet.external, with the GUI, did you create an instrument list or an entity list ? I'm guessing (from the initial part of your query) that you created an instrument list.

To retrieve the instrument list from your schedule s, you can use:

InstrumentList myList = extractionsContext.InstrumentListOperations.Get(s.ListId);

After that you could display the Instrument list list ID:

Console.WriteLine("Returned instrument list ID: " + myList.ListId);
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
68 3 4 8

Oh nice, thank you very much.

Still an interrogation to go further.

myList.Count gives the number of instruments, how do I get them individually ?

I should have thought to myList.Items, but it has no item.

We have to distinguish between myList.Count and myList.Items.Count, and in the first case I do not see how to get the elements.

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.

Upvote
68 3 4 8

I think I got it :

IDssEnumerable<InstrumentListItem> listInst = extractionsContext.InstrumentListOperations.GetAllInstruments(myList);

Thanks
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.

I was too slow to answer, you found it on your own, great. Thank you for sharing your solution !

Sorry about the order, this is supposed to be the fourth message (maybe last).

Click below to post an Idea Post Idea