question

Upvotes
Accepted
36 4 6 10

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"})

@Beera.Rajesh @vinod.amarnath

dss-rest-apidatascope-selectdsstick-history-rest-api
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.

Hello @Vinod A

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS


@Vinod A

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

Upvotes
Accepted
78.8k 250 52 74

@Vinod A

From the verbose log, it uses /RestApi/v1/Extractions/RawExtractionResults('0x079892b68c3cc45e')/.

> GET /RestApi/v1/Extractions/RawExtractionResults('0x079892b68c3cc45e')/ HTTP/1.1
> Host: selectapi.datascope.refinitiv.com

The 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.com

Please make sure that the URL is correct.


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
78.8k 250 52 74

@Vinod A

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,,4920271

I 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?



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
36 4 6 10

@jirapongse.phuriphanvichai 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"}}}


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
36 4 6 10

Hi @jirapongse.phuriphanvichai - Could you further advice on the above.

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
78.8k 250 52 74

@Vinod A

I am unable to replicate the issue.

Please use the --verbose option in the curl command to see more information.

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
36 4 6 10

Hi @jirapongse.phuriphanvichai - 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

@Beera.Rajesh @nityanand.koppad

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.