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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
54 3 5 9

Status code: 501 Not Implemented

I'm often getting 501 responses while performing http requests for operations listed at the API reference tree. I understand these operations, such as ReportTemplate->GetContentFields are to be functional in the future. Am I right? If so, could you provide an estimated time?

Thank you in advance.

dss-rest-apidatascope-selectdssrest-api
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

@carla.martinez

Try this URL:

https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentLists('{}')/ThomsonReuters.Dss.Api.Extractions.InstrumentListGetAllInstruments

It should return a : 404 Not Found and message InstrumentList of id '{}' not found.

Note that this is the same as your request, but with the addition of the full path ThomsonReuters.Dss.Api.Extractions.InstrumentList before GetAllInstruments.

Then try inserting the ID of an existing instrument list (the purpose of this call is to return the instruments that are in a specific instrument list):

https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentLists('0x0551b3bcc142fe65')/ThomsonReuters.Dss.Api.Extractions.InstrumentListGetAllInstruments

This should return a 200 OK and the list of instruments, providing that instrument list ID exists (if it does not exist a 404 is returned).

I agree this is not obvious from the reference tree, especially as this particular method does not have sample code in the tree, but if you look for instance at the AppendIdentifiers method which is in the same branch, and check its HTTP request you will find it also follows this syntax.

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
1.1k 4 3 5

I assume that by "often get" you mean "calls attempted on certain templates always fail" and not "sometimes calls work and sometimes they do not"; is this correct?

The sample application shows an example for "GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ReportTemplates('<<Id>>')/ThomsonReuters.Dss.Api.Extractions.ReportTemplateGetContentFields" under the Report Template Examples -> Get: Content Fields menu. Does this sample work for you?

Can you provide the posted information on one of your failed calls?

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
54 3 5 9

@Rick Weyrauch

Yes, forgive me. By 'often' I meant that I encountered the 501 - Not Implemented status code at various listed operations. Today I tried the already mentioned GetContentFields on ReportTemplate as well as GetAllInstruments on InstrumentList. Neither of them were implemented yet, apparently.

This is the response content for a GetAllInstruments on an existing list, with status code 501:

{
'code': 'EntitySetController Unmapped Request ErrorCode', 
'message': 'EntitySetController Unmapped Request ~/entityset/key/unresolved'
}
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
1.1k 4 3 5

There must be something out of place in these requests - what I really need is the POSTed URL and JSON content. Have you tried these operations via the sample application?

In the meantime, can you please share with me just your account id at rick.weyrauch@thomsonreuters.com (please DO NOT send me your password - just your account id) so that I can look up your activity?

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
54 3 5 9

I think I'm putting the wrong X-client-version (v1.10.2.0.0) at the request header. Which one would be the newest?

Edit: Found it. 10.6.0, is it not? I'm going to test it again.

Edit 2: It doesn't work either way. My request is done in python 3, using Requests library, and it goes like these:

url = "https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/" \
      "InstrumentLists('{}')/GetAllInstruments".format(list_id)

headers = {'Authorization': 'Token ' + token}

r = requests.get(url, headers=headers)

both list_id and token contain a valid authorization token and an id of an existing list.

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
13.7k 26 8 12

@carla.martinez

There is no need for an X-client version in the header. Apart from the authorization token, the only required headers are:

Prefer:respond-async
Content-Type:application/json
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
11.3k 25 8 13

Hi @carla.martinez

I have received the same response with "GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentLists('<list id>')/GetAllInstruments".

It will work if the url is changed to:

"GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentLists('<list id>')/ThomsonReuters.Dss.Api.Extractions.InstrumentListGetAllInstruments"

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
54 3 5 9

Yes, you both are right. That change at the url syntax did fix the problem. The url at the reference tree is a bit misleading in my opinion, though.

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