VBD data file download

Ayan
Ayan Contributor

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('0x05cd6940a5eb3016')/$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"
}

Best Answer

Answers

  • zoya faberov
    zoya faberov ✭✭✭✭✭

    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

  • Ayan
    Ayan Contributor

    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('0x05d305c76d5b2f76')/$value


    * 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.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    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.