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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 0 2

Error when trying to create an instrument list for FileCode 66

Hi, my client is trying to create an instrument list for file code 66 using the following code but it is not working, any ideas? {"ExtractionRequest":{"@odata.type":"#ThomsonReuters.Dss.Api.Extractions.SubjectLists.InstrumentListItem","Identifier":"66","IdentifierType":"FileCode"}} It seemed to return a malformed request content error back. Could you tell me what I got wrong please?

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

@Johan.Hempel

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

@Johan.Hempel

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
11.3k 25 9 14

Hi @Johan.Hempel

According to this question, if the client wants to extract data for file code: 66. The request message should contain all attributes required by each report template. The example of request is in the "On Demand..." tutorials on this page. For example, below is the request for the TermsAndConditons report template.

POST https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractWithNotes
{
    "ExtractionRequest": {
        "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TermsAndConditionsExtractionRequest",
        "ContentFieldNames": [
           "RIC", "ISIN","SEDOL", "CUSIP"
        ],
        "IdentifierList": {
            "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [
                { "Identifier": "66", "IdentifierType": "FileCode" }
            ]
        }
    }
}
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.

Thanks for the answer @veerapath.rungruengrayubkul , for the odata.type above, what is the list of @odata.type value can we have? Where is documented in the REST API Reference Tree?

@Sunny.Wu

I cannot find the list of @odata.type. However, you can use "JSON Model" tabl in the Reference Tree as a guide. The "Request/Response Examples" at the bottom of the page also provide example messages.

odatatype.png (80.5 KiB)
Sunny.Wu avatar image Sunny.Wu veerapath.rungruengrayubkul

Thanks for the answer!

Upvotes
11.3k 25 9 14

Hi @Johan.Hempel

You needs to have two separated requests:

1) to create an empty instrument list

POST https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentLists
{
  "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.SubjectLists.InstrumentList",
  "Name": "<Instrument List Name>"
}

2) to append instruments to the instrument list

POST https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/InstrumentLists('<InstrumentList ID>')/ThomsonReuters.Dss.Api.Extractions.InstrumentListAppendIdentifiers
{
  "Identifiers": [
    {
      "Identifier": "66",
      "IdentifierType": "FileCode"
    }]
}

For more detailed information, please see this tutorial.

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
1 0 0 2

Great thank you

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
78.8k 250 52 74

If the client would like to use FileCode in the ExtractRequest, the client can use this request:

{
  "ExtractionRequest": {
   ...
    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
      "InstrumentIdentifiers": [{
        "Identifier": "66",
        "IdentifierType": "FileCode"
      }]
    },
...
}

Moreover, the client can directly post DSS API questions in this forum. The forum is public so anyone can access it.

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.

Thanks for the answer!

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.