question

Upvotes
Accepted
50 12 22 29

VBD data file download

I am trying to download data files as per the information given in the page#125 of ThomsonReutersTickHistory11.0RESTAPIUserGuidev1.0.pdf document. But I am not able to download the files. It is showning the details of the file only.I am using below query.

Query:

curl -k -X GET -H "Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" https://10.xxx.xxx.xxx/RestApi/v1/StandardExtractions/UserPackageDeliveries%28%270x05cd6940a5eb3016%27%29/$value

Output:

{ "@odata.context": "https://10.xxx.xxx.xxx/RestApi/v1/$metadata#UserPackageDeliveries/$entity", "ContentMd5": "435a1e4ba9b1ca6bfcf2e86bc4a8589a", "FileSizeBytes": 1412, "Frequency": "Daily", "Name": "ASQ-2017-07-20-REF-Report-1-of-1.csv.gz", "PackageDeliveryId": "0x05cd6940a5eb3016", "ReleaseDateTime": "2017-07-21T04:00:00.000Z", "SubscriptionId": "0x0400dc1d24a00cb4", "UserPackageId": "0x04f21a8d14859cb1" }

tick-history-rest-apivenue-by-day
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 @Ayan,

Were you able to follow the suggestions below and download VBD?

If not, please provide more details?

Upvotes
Accepted
11.3k 25 9 14

@Ayan

I have found the same result. It seems that the "$value" in the uri is treated as an variable, so it will be interpreted to blank. As result, the end point has been changed to just "/RestApi/v1/StandardExtractions/UserPackageDeliveries('VALID_PACKAGE_DELIVERY_ID')".

You may need to change the "$" character to "%24".

Also, the result normally is in gzip format. You may need to add the "-o <output file>" in the command to write the result to file.

curl -k -X GET -H "Authorization: Token 
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 
https://10.xxx.xxx.xxx/RestApi/v1/StandardExtractions/UserPackageDeliveries%28%270x05cd6940a5eb3016%27%29/%24value -o <gzip output file>
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
32.2k 40 11 20

Hello @Ayan,

Have you requested the list of valid packageDeliveryIds as described in TRTH REST API User Guide as per request

curl -k -X GET -H "Authorization: Token YOUR_TOKEN_HERE" https://HOSTED_URL/RestApi/v1/StandardExtractions/UserPackageDeliveryGetUserPackageDeliveriesByPackageId(PackageId='YOUR_PACKAGE_ID')  

Then if it's a valid PackageDeliveryId you should be able to substitute like so

 curl -k -X GET -H "Authorization: Token YOUR_TOKEN_HERE" https://HOSTED_URL/RestApi/v1/StandardExtractions/UserPackageDeliveries('VALID_PACKAGE_DELIVERY_ID')/$value 

You should back a gz file.

Once you know the request is working, have received the response you expect, you wish to process this file with an app, not curl.

Hope this helps clarify

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
50 12 22 29

Facing issue while downloading MARKETPRICE and NORMALIZEDLL2 file type.

curl -vk -X GET -H 'Content-Type: application/json' -H 'Prefer: respond-async' -H 'Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' -o TYO-2017-08-07-MARKETPRICE-Data-1-of-1.csv.gz https://10.192.6.221/RestApi/v1/StandardExtractions/UserPackageDeliveries%28%270x05d305c76d5b2f76%27%29/%24value

* About to connect() to 10.192.6.221 port 443 (#0) * Trying 10.192.6.221... connected * Connected to 10.192.6.221 (10.192.6.221) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * warning: ignoring value of ssl.verifyhost * skipping SSL peer certificate verification * SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA256 * Server certificate: * subject: CN=hosted.datascopeapi.reuters.com,O=Thomson Reuters,L=New York,ST=New York,C=US * start date: Nov 14 00:00:00 2015 GMT * expire date: Nov 14 23:59:59 2017 GMT * common name: hosted.datascopeapi.reuters.com * issuer: CN=Symantec Class 3 Secure Server CA - G4,OU=Symantec Trust Network,O=Symantec Corporation,C=US > GET /RestApi/v1/StandardExtractions/UserPackageDeliveries%28%270x05d305c76d5b2f76%27%29/%24value HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: 10.192.6.221 > Accept: */* > Content-Type: application/json > Prefer: respond-async > Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxx > % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0< HTTP/1.1 404 Not Found < Set-Cookie: DSSAPI-COOKIE=R2485808843; path=/ < Cache-Control: no-cache < Pragma: no-cache < Content-Type: application/json; charset=utf-8 < Expires: -1 < Server: Microsoft-IIS/7.5 < X-Request-Execution-Correlation-Id: d9ce692e-9f92-4508-8123-fc0f6f974dd9 < X-App-Id: Custom.RestApi < X-App-Version: 11.1.534.64 < Date: Thu, 10 Aug 2017 18:51:01 GMT < Content-Length: 64 < { [data not shown] 0 64 0 64 0 0 41 0 --:--:-- 0:00:01 --:--:-- 68 0 64 0 64 0 0 41 0 --:--:-- 0:00:01 --:--:-- 68* Connection #0 to host 10.192.6.221 left intact * Closing connection #0

Please help.

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.

I am also unable to download these files via GUI.

  • TYO-2017-08-07-MARKETPRICE-Data-1-of-1.csv.gz
  • TYO-2017-08-07-NORMALIZEDLL2-Data-1-of-1.csv.gz
It returns 404 - Not Found. It could be the problem in the server. I will contact TRTH support team to verify the problem.

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.