For a deeper look into our DataScope Select SOAP API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
69 9 17 18

Access rights for DSS - Time Series requests

When I execute the DSS2TimeSericesClient Java example. I'm getting the following message. Is it due to missing permissions?

Session Token (expires in 24 hours):

[...]

Press "ENTER" to continue... tsExtractJSONObject.toString()v2:{"ExtractionRequest":{"@odata.type":"#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TimeSeriesExtractionRequest","ContentFieldNames":["RIC","File Code","Trade Date","Bid Price","Currency Code","Exchange Code","High Price","Low Price","Open Price","Volume","Close Price","VWAP Price","Alternate Close Price","Split Factor","Asset Type","Quote ID","Bid Yield","Universal Close Price"],"IdentifierList":{"@odata.type":"#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList","InstrumentIdentifiers":[{"IdentifierType":"Ric","Identifier":"IBM.N"}],"ValidationOptions":null,"UseUserPreferencesForValidationOptions":false},"Condition":{"LastPriceOnly":false,"StartDate":"2015-10-28T00:00:00.000Z","EndDate":"2015-11-04T00:00:00.000Z","LookBackPeriod":"EOD-4M"}}} Response Code : 403 Response Code is not 202 and not 200. The request was not accepted, cannot proceed!!

dss-rest-apidatascope-selectdss
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.

Upvotes
Accepted
13.7k 26 8 12

@Philipp,

The tutorials and queries in the Postman collection made for the DSS REST API will not necessarily work with an account created for TRTH REST API access, because the permissioning is different. To be more specific, retrieving your authentication token will work fine, but most extraction requests will not work. That is why the Java sample you mention in this query does not work for you.

There is a series of tutorials with sample code made specifically for the TRTH API, you will find them here. There is also a Postman collection available for download here. There is no Java sample code yet for TRTH data, but it should be easy to program in Java the requests we deliver in the Postman collection (here the DSS Java samples can come in handy, as they show how to retrieve a token and build requests). Bear in mind that the order of the elements inside the request body must be maintained, that is why the DSS Java samples use JSONOrderedObject.

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.

Although it's probably easiest to retain the order used in the Java and Postman examples, it is only necessary for the odata.type (if included) to be the first property in the object. This is a known issue. Having the @odata.type at the top allows us to boost our JSON serializer performance because we can hydrate the appropriate instance without having to place the values into a dictionary first. However, this is inconvenient for some programming languages to work with and so we do plan to fully support any ordering.

is this now supported? or do we still need to use a customized JSONOrderedObject ?

Not yet, you still need a JSONOrderedObject.

Upvotes
1.1k 4 3 5

I am guessing you received some kind of 400 error. In this case, the replay will contain an error message telling you what the API could not understand or operate on (like lack of assigned rights).

What was the actual HTTP status code and body your received?

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.

Upvotes
69 9 17 18

The responce code is written in the log above. It is 403. This is exactly the Java example provided on your download area. I assume it is usually running, so this is likely a permisson problem?

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.

indeed - I see it now. I got hung up on the "not 202 and not 200" text.

Agreed on the permission issue, the reply should have also had a JSON body that states the details of what exactly was blocked. Can we get that too?

Upvotes
1.1k 4 3 5

Did you want to make a legacy Timeseries extraction or an Elektron Timeseries extraction?

You used "TimeSeriesExtractionRequest" but I think you want "ElektronTimeseriesExtractionRequest".

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.

I believer Elektron Time Series is only available under Tick History permissions. The ETS template is not yet fully compatible with Time Series.

Upvotes
69 9 17 18

I'm running examples provided in your download area. We are currently just checking the API behavior, the content is not in scope yet. That will come later.

Can you help to get your example code running, and/or explain what a 403 response from DSS in general means?

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.

The general meaning of some error status codes can be found in https://hosted.datascopeapi.reuters.com/RestApi.Help/Home/StatusCodes.

You also can get a full list of all possible HTTP Status Codes here.

I'm able to retrieve data via the DSS2TimeSericesClient Java example, so this should be the permission issue.

Upvote
1.1k 4 3 5

They client is trying a sample app that references the existing Timeseries Template, but they do not have claims for that; thus the 403. They do have claims for the new ETS and the Tick Templates, so I assumed they were supposed to be doing some sort of EAP on the new templates.

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