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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 0 2 1

Query Bond Schedule Table Error:

I am trying to query the bond schedule (specifically the call option within the gui) through the api. To test the query I am using the following:

{
   "ExtractionRequest": {
       "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.BondScheduleExtractionRequest",
       "ContentFieldNames": [
          "Asset ID"
       ],
       "IdentifierList": {
           "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
           "InstrumentIdentifiers": [
               {
                   "Identifier": "05490NAG0",
                   "IdentifierType": "Cusip"
               }
           ]
       }
   }
}

I can see that Asset ID is an option within the gui for Bond Schedule template with Report Option = Call

The code above generates the following error:

{
   "error": {
       "message": "Validation Error:\r\n\r\nInternal constraint \"ReportTemplate.Conditions.InvalidBondScheduleTypeCode\" execution failure: message='Value cannot be null.\r\nParameter name: source' / exid='5b8489d2-31e0-4d96-b4ed-0cc21f454074'"
   }
}

Thanks in advance for your assistance!

dss-rest-apidatascope-selectdsserrorbondssymbology
bondschedules.png (6.3 KiB)
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.

1 Answer

· Write an Answer
Upvotes
Accepted
11.3k 25 9 14

From the error message, the BondScheduleTypeCode parameter is required and cannot be null. This parameters should be equivalent to the Generic Schedule Types in GUI.

For example, the following request is for Call Schedule Type.

{
   "ExtractionRequest": {
       "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.BondScheduleExtractionRequest",
       "ContentFieldNames": [
          "Asset ID"
       ],
       "IdentifierList": {
           "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
           "InstrumentIdentifiers": [
               {
                   "Identifier": "05490NAG0",
                   "IdentifierType": "Cusip"
               }
           ]
       },
       "Condition":
       {
       		"BondScheduleTypeCodes": ["CALS"]
       }
       
   }
}

You can find all defined values for this parameter in the REST API Reference Tree.


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.

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.