question

Upvotes
Accepted
50 9 12 20

AWS URL is not getting generated while downloading MBO data through AWS

We are facing issue with AWS-MBO download (https://community.developers.refinitiv.com/questions/16520/mbo-file-type-template.html). In few cases such as the download of MBO data for 2nd to 6th parts of AEX exchange of the date 18-08-2017 the below command is not generating AWS link to download the MBO data.

curl -Ik -L -H 'Authorization: Token xxxxxxx' -H X-Direct-Download:true -X GET https://10.192.6.221/RestApi/v1/Extractions/RawExtractionResults%28%270x05d9bf1b0c9b2f96%27%29%2F%24value -o /dev/null -w '%{url_effective}'
It returns below link:
https://10.192.6.221/RestApi/v1/Extractions/RawExtractionResults%28%270x05d9bf1b0c9b2f96%27%29%2F%24value

As a result while we are using this link to download the data it is returning HTTP/1.1 401 Unauthorized error. A non-gunzippable file is getting created with entries as below.

{"error":{"message":"Authentication request failed because no token was provided in the Authorization: header"}}

tick-history-rest-apimarket-by-order
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
38.1k 71 35 53

The curl command in the question is unable to cover all cases. I suggest to use this command instead.

curl -Ik -H "Authorization: Token xxx" -H "X-Direct-Download: true" -X GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/RawExtractionResults%28%270x05da0af6572b2f86%27%29%2F%24value

If the status code in the response is 302, you can get the AWS link from the Location header.

HTTP/1.1 302 Found
Set-Cookie: DSSAPI-COOKIE=R2817038826; path=/
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Location: https://s3.amazonaws.com/...
Server: Microsoft-IIS/7.5
X-Request-Execution-Correlation-Id: 6d5d6c89-55c4-40b1-82d7-86727ecde776
X-App-Id: Custom.RestApi
X-App-Version: 11.1.558.64
Date: Tue, 29 Aug 2017 06:55:26 GMT
Content-Length: 0
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea