DSS Curl Command doesnt not provide output in the response
Hi,
I tried using the API for extractRaw and it worked to give Job ID but I did not get any data calling the JobID.
Using the url in Chrome; gives the result.
Below what we get in response.
JobID request call
time:2021.06.08D21:26:22.927414000 tz:gmt logLevel:INFO messageType:Sending command: curl -s -i -X GET -H "Prefer: respond-async" -H "Content-Type: application/json" -H "X-Direct-Download: true" -H "Authorization: Token _hyZh8eP0XmiAP9427bWJFQ_98eyHW5ASl4Gk7vDKQk6kpA5J-97x8AC1W-XR7kx-dGgfnsPncO4Ql4qROp6W03Bhd5VI5NuG_yjsscDkXT2SC8lAddyNPp9R-wP3G2F7HR1aIjJ3WewDu5cN7a3eq7D-XkOIPAytwHnlQ7Zsge4YlMgtRmGsP17d6b2-ZzqdUaQRz1YFgYWK3ZSdQ_6NVm1CVe-e4uPb-rXu-s476POL7qHOHcirXXe82yDPYkF0s3MFS1Sb36SFFCeqJpEVvw9B2fvTUVb2xqDsgPm0WoA"https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/RawExtractionResults('0x0796121379ccb766')/$value
response
(`responseHeader`responseLoad)!(("HTTP/1.1 200 Connection established";"";"HTTP/1.1 200 OK";"Cache-Control: no-cache";"Pragma: no-cache";"Content-Type: application/json; charset=utf-8";"Expires: -1";"Server: Microsoft-IIS/10.0";"X-Request-Execution-Correlation-Id: CiD/9015517/AAAAAA.0796145edd7cb774/RA";"X-App-Id: Custom.RestApi";"X-App-Version: 14.5.72.64";"Date: Tue, 08 Jun 2021 21:26:25 GMT";"Content-Length: 141";"");{"@odata.context":"https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#RawExtractionResults/$entity","JobId":"0x0796121379ccb766"})
Best Answer
-
From the verbose log, it uses /RestApi/v1/Extractions/RawExtractionResults('0x079892b68c3cc45e')/.
> GET /RestApi/v1/Extractions/RawExtractionResults('0x079892b68c3cc45e')/ HTTP/1.1
> Host: selectapi.datascope.refinitiv.comThe correct one must be /RestApi/v1/Extractions/RawExtractionResults('0x079892b68c3cc45e')/$value. For example:
> GET /RestApi/v1/Extractions/RawExtractionResults('0x0798bbe54dbcc4f5')/$value HTTP/1.1
> Host: selectapi.datascope.refinitiv.comPlease make sure that the URL is correct.
0
Answers
-
The command looks okay. I can use it to retrieve the data.
curl -s -i -X GET -H "Prefer: respond-async" -H "Content-Type: application/json" -H "X-Direct-Download: true" -H "Authorization: Token <token>" https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/RawExtractionResults('0x0796cdcdf9fcbae1')/$value
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 368
Content-Type: text/plain
Expires: -1
Accept-Ranges: bytes
Server: Microsoft-IIS/10.0
X-Request-Execution-Correlation-Id: CiD/9008895/AAAAAA.0796d25b85fcbb08/RA
X-App-Id: Custom.RestApi
X-App-Version: 14.5.72.64
Date: Fri, 11 Jun 2021 04:08:10 GMT
RIC,Ask Price,Asset Type,Bid Price,Currency Code,Exchange Code,High Price,Instrument ID,Instrument ID Type,Low Price,Open Price,Previous Close Date,Previous Close Price,Security Description,Settlement Price,Trade Date,User Defined Identifier,Volume
0005.HK,47.7,EQTY,47.65,HKD,HKG,48.1,0005.HK,RIC,47.45,47.45,2021/06/10,47.65,HSBC HOLDINGS ORD,,2021/06/11,,4920271I need to know more information about the problem.
1. How often does the problem occur?
2. Does it happen randomly?
3. What report template are you using with that JobID?
0 -
@Jirapongse Hi,
1. How often does the problem occur? Every time client run a extraction
2. Does it happen randomly? Every time
3. What report template are you using with that JobID? Elektron Time Series Report, below API call details. The issue is using GET commend using Curl.
Call to this endpoint à /Extractions/ExtractRaw with following items.
@{"ExtractionRequest":{"@odata.type":"#DataScope.Select.Api.Extractions.ExtractionRequests.ElektronTimeseriesExtractionRequest","ContentFieldNames":["Instrument ID","Open","High","Low","Last","Volume","Bid","Ask","Trade Date"],"IdentifierList":{"@odata.type":"#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList","InstrumentIdentifiers":[{"Identifier":"VOD.L","IdentifierType":"Ric"}]},"Condition":{"ReportDateRangeType":"Range","QueryStartDate":"2021-06-01","QueryEndDate":"2021-06-08"}}}
0 -
Hi @Jirapongse - Could you further advice on the above.
0 -
I am unable to replicate the issue.
Please use the --verbose option in the curl command to see more information.
0 -
Hi @Jirapongse - Below response form client.
Would you be able to assist further.I turned on verbose and found these details- as you can see the connection is established but result set is not complete
time:2021.06.16D16:32:50.313481000 tz:gmt logLevel:INFO messageType:Sending command: curl -s -i -v -X GET -x "http://35.56.104.42:8080" -H "Prefer: respond-async" -H "Content-Type: application/json" -H "X-Direct-Download: true" -H "Authorization: Token _x47Uz0jT0PP5ua2Bd7FoOc2gVMiwsMaq77rzgqqTInYH2jO4OOaw0eX-6cg7psPmOL61jUnBHIquoZ
* Trying 35.56.104.42:8080...
* Connected to 35.56.104.42 (35.56.104.42) port 8080 (#0)
* allocate connect buffer!
* Establish HTTP proxy tunnel to selectapi.datascope.refinitiv.com:443
> CONNECT selectapi.datascope.refinitiv.com:443 HTTP/1.1
> Host: selectapi.datascope.refinitiv.com:443
> User-Agent: curl/7.69.1
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection established
<
* Proxy replied 200 to CONNECT request
* CONNECT phase completed!
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /local/int/live/0/miniconda3/ssl/cacert.pem
CApath: none
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* CONNECT phase completed!
* CONNECT phase completed!
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [91 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [4738 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [333 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; postalCode=10036; ST=New York; L=New York; street=3 Times Square; O=REFINITIV US LLC; CN=selectapi1.datascope.refinitiv.com
* start date: Feb 25 00:00:00 2021 GMT
* expire date: Feb 25 23:59:59 2022 GMT
* subjectAltName: host "selectapi.datascope.refinitiv.com" matched cert's "selectapi.datascope.refinitiv.com"
* issuer: C=GB; ST=Greater Manchester; L=Salford; O=COMODO CA Limited; CN=COMODO RSA Organization Validation Secure Server CA
* SSL certificate verify ok.
} [5 bytes data]
> GET /RestApi/v1/Extractions/RawExtractionResults('0x079892b68c3cc45e')/ HTTP/1.1
> Host: selectapi.datascope.refinitiv.com
> User-Agent: curl/7.69.1
> Accept: */*
> Prefer: respond-async
> Content-Type: application/json
> X-Direct-Download: true
> Authorization: Token _x47Uz0jT0PP5ua2Bd7FoOc2gVMiwsMaq77rzgqqTInYH2jO4OOaw0eX-6cg7psPmOL61jUnBHIquoZNUHnkwbhlu_b5k0xCTDgUzEnkH-A747IBIIlMP-bv4fJ_17U9cp0sOB6fLvH20GnJ8CsgLfh0sy5tXwKGWp8VOVMGUMYzsTY8rzxg3gSRjmGYwDZdE7TatgIsXJ400QkAb_Mqlm2ZsXG4RkvT4YyZptLQ06lC94cSwakfFat_Rr4jb2h9k5ABog7LastJSSdO7UPZ2-VUpDysxn2ilQPQGiGNL6VY
>
{ [5 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Type: application/json; charset=utf-8
< Expires: -1
< Server: Microsoft-IIS/10.0
< X-Request-Execution-Correlation-Id: CiD/9015517/AAAAAA.0798978833bcc466/RA
< X-App-Id: Custom.RestApi
< X-App-Version: 14.5.72.64
< Date: Wed, 16 Jun 2021 16:32:51 GMT
< Content-Length: 141
<
{ [141 bytes data]
* Connection #0 to host 35.56.104.42 left intact
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
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 249 ETA
- 554 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 192 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛