How to list all extractions created with ExtractRaw?
Hi!
I'm following 'Tick History Rest Api Guide' to download history market data. I made post request ('https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/ExtractRaw') with body:
{"ExtractionRequest":
{
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest",
"ContentFieldNames": ["High", "Last", "Low", "Open", "Volume"],
"IdentifierList": {
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [{"Identifier": "CLZ2", "IdentifierType": "Ric"}],
"UseUserPreferencesForValidationOptions": "False"
},
"Condition": {
"MessageTimeStampIn": "GmtUtc",
"ReportDateRangeType": "Range",
"QueryStartDate": "2022-08-22T00:00:00Z",
"QueryEndDate": "2022-08-23T23:59:00Z",
"DisplaySourceRIC": "True",
"SummaryInterval": "OneMinute"
}
}
}
I got ExtractionId in the respond ('0x0830ea3024a33b1c'). So, I have two questions:
- How to get all extractions made from me? I tried get request https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/ReportExtractions but result is empty:
{
"@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#ReportExtractions",
"value": []
}
2. How to delete extraction ('0x0830ea3024a33b1c') and all related files after I don't need it anymore?
Best Answer
-
Sorry for the issue you are facing, let me see if I can help you in resolving this.
You can use the /Jobs/Jobs endpoint with the GET method to get all extracted jobs.
The output looks like this:
{
"JobId": "0x0830eadfb9933af4",
"UserId": xxx,
"Status": "Completed",
"StatusMessage": " ",
"Description": "TickHistoryTimeAndSalesReportTemplate Extraction",
"ProgressPercentage": 0,
"CreateDate": "2022-10-04T01:32:22.826Z",
"StartedDate": "2022-10-04T01:32:22.826Z",
"CompletionDate": "2022-10-04T01:35:56.156Z",
"MonitorUrl": "https://selectapi.datascope.refinitiv.com/restapi/v1/Extractions/ExtractRawResult(ExtractionId='0x0830eadfb9933af4')"
},You can cancel an In Progress extraction by using the DELETE method with the Extractions/ExtractRawResult(ExtractionId='<job id>') endpoint.
The status of canceled jobs will be PendingCancellation.
{
"@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#Jobs",
"value": [
{
"JobId": "0x08314caddb733ba3",
"UserId": xxx,
"Status": "PendingCancellation",
"StatusMessage": "PendingCancellation",
"Description": "TickHistoryTimeAndSalesReportTemplate Extraction",
"ProgressPercentage": 0,
"CreateDate": "2022-10-04T02:59:10.086Z",
"StartedDate": "2022-10-04T02:59:10.086Z",
"MonitorUrl": "https://selectapi.datascope.refinitiv.com/restapi/v1/Extractions/ExtractRawResult(ExtractionId='0x08314caddb733ba3')"
},
...You can get a list of extracted files from the /Extractions/ExtractedFiles endpoint with the GET method. The output looks like this:
"@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#ExtractedFiles",
"value": [
{
"ExtractedFileId": "VjF8MHgwODMwZjU5ZTU4MzMzYjNkfA",
"ReportExtractionId": "2000000455842161",
"ScheduleId": "0x08314caddb733ba3",
"FileType": "Note",
"ExtractedFileName": "_OnD_0x08314caddb733ba3.csv.gz.notes.txt",
"LastWriteTimeUtc": "2022-10-04T03:02:17.230Z",
"ContentsExists": true,
"Size": 953,
"ReceivedDateUtc": "2022-10-04T03:02:17.230Z"
},
{
"ExtractedFileId": "VjF8MHgwODMwZTk2NDYxNzMzYWYwfA",
"ReportExtractionId": "2000000455817736",
"ScheduleId": "0x0830eadf7fb33af6",
"FileType": "Note",
"ExtractedFileName": "_OnD_0x0830eadf7fb33af6.csv.gz.notes.txt",
"LastWriteTimeUtc": "2022-10-04T01:45:36.740Z",
"ContentsExists": true,
"Size": 953,
"ReceivedDateUtc": "2022-10-04T01:45:36.740Z"
},Then, you can delete a file by using the DELETE method with the /Extractions/ExtractedFiles('<ExtractedFileId>') endpoint.
For more information, please refer to the API Reference Tree.
I hope this will help.
0
Answers
-
Hi @d.alishev,
There are two types of data extractions - scheduled and on-demand. On-Demand extraction like the one you are executing are valid only until they are in progress. Once the extraction is complete and you have downloaded the resulting data file, there is no cleanup required from the application. The extraction ID is invalidated automatically.
0 -
Sorry, I found the answer in manual:
On-demand extractions expire after 3 days
0 -
Correct. I checked the Best Practices & Fair Usage Policy for DataScope Select and Tick History guide and found the following statement.
The files form on-demand extractions will be remvoed after 3 days.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 716 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛