question

Upvotes
Accepted
9 5 3 4

What would be the url for obtaining the list of extractions given a ScheduleId?

You can get info about the last extraction for a given ScheduleId (i.e GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/Schedules('xxxxxxxx')/LastExtraction"

But how can you get the list of all extractions for that schedule? Or even better a list of the extractions for that schedule that happened between two dates?

I thought requests like:

could work, however neither these or similar ones I've tried work.

Do you know how to do it? Or where in the docs can I find how to do it? (I'm using Python requests library)

dss-rest-apitick-history-rest-apiapi
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
11.3k 25 9 14

@alvaro.canencia

You can use GetByScheduleId to get all extractions that matchs the given schedule id. However, the results will include all status of extraction (Pending, Processing, Completed). If you want to get only completed extractions, you need to manually filter the status.

Sample uri:

GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ReportExtractionGetByScheduleId(ScheduleId='0x0559a3998332fe65')

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 a lot @veerapath.rungruengrayubku,

It works fine. An improvement for my code would be If I could retrieve just extractions between two dates (do you if is possible?) Currently I have the logic in my code but as time passes the response with all the extractions will grow bigger and at some point it could take too long.

Or do you know which is the best doc for this kind of questions?


Upvotes
11.3k 25 9 14

@alvaro.canencia

According to the ReportExtractions in API Reference Tree, the ReportExtractions and ExtractedFiles exist in the DataScope Select's databases for a limited time. Currently, that time window is 45 days. This means that API will return list of extractions for the last 45 days only.

Also, I have just realised that there are other methods such as GetCompletedByDateRangeByScheduleId and GetCompletedByScheduleId. You can use these methods if you want to retreive only completed 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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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