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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 0 1

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 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
11.3k 25 8 13

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 5.0 MiB each and 10.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 8 13

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 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 0 1

Great thank you

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
38.1k 69 35 53

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 5.0 MiB each and 10.0 MiB total.

Thanks for the answer!

Click below to post an Idea Post Idea