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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 0 3

ScheduleExtractNow not valid for existing scheduleId

For request

POST https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/Schedules('some schedule id')/ThomsonReuters.Dss.Api.Extractions.ScheduleExtractNow

Schedule ID is valid and picked from list of schedules.

We got response

{"error":{"message":"Validation Error:\r\n\r\nYou cannot 'Extract Now' an immediate schedule."}}

Why is that? On API Reference Tree here

https://hosted.datascopeapi.reuters.com/RestApi.Help/Context/Operation?ctx=Extractions&ent=Schedule&opn=ExtractNow&sce=Schedule Examples - Request Adhoc Extraction.primary&stp=5a&tab=2

it states "Runs the extraction for the schedule immediately independent of Recurrence and Trigger types." How else could I reuse existing schedule entry for immediate extraction?
dss-rest-apidatascope-selectdssextraction
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.

1 Answer

Upvotes
Accepted
38.1k 71 35 53

From the error message, you can not use Extract Now with the schedule which is an Immediate recurrence type ("IsImmediate" : true).

{
            "ScheduleId": "0x05cc2ac70bfb2fd6",
            "Name": "07.17.2017 10.30.51",
            "OutputFileName": "test",
            "TimeZone": "SE Asia Standard Time",
            "Recurrence": {
                "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.Schedules.SingleRecurrence",
                "ExtractionDateTime": "2017-07-17T00:00:00Z",
                "IsImmediate": true   
            },
            "Trigger": {
              "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.Schedules.ImmediateTrigger",
                "LimitReportToTodaysData": false
            },
            "UserId": 9008895,
            "CreateDate": "2017-07-17T03:31:12.660Z",
            "LastChangeDate": "2017-07-17T03:31:12.660Z",
            "ListId": "0x05b8dc24c98b2f76",
            "ReportTemplateId": "0x05bd6c25094b2f86"
        }

You need to use Extract Now with the schedule which is not an immediate extraction. For example, the following schedule is weekly recurrence.

 {
            "ScheduleId": "0x05cc2d2f239b2f86",
            "Name": "example-eod",
            "OutputFileName": "",
            "TimeZone": "Central Standard Time",
            "Recurrence": {
                "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.Schedules.WeeklyRecurrence",
                "Days": [
                    "Monday",
                    "Friday"
                ]
            },
            "Trigger": {
                "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.Schedules.TimeTrigger",
                "LimitReportToTodaysData": false,
                "At": [
                    {
                        "Hour": 16,
                        "Minute": 0
                    }
                ]
            },
            "UserId": 9008895,
            "CreateDate": "2017-07-17T04:13:17.640Z",
            "LastChangeDate": "2017-07-17T04:13:17.640Z",
            "ListId": "0x05cc2cdbb33b2f86",
            "ReportTemplateId": "0x05cc2ce2e30b2f86"
        }
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