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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 0 1

How to Update a SinglePriceHistory Report Template using REST API?

Hello,

I can't seem to succeed to update the Endate of my SinglePriceHistory ReportTemplate using REST API. I always get this error :

{"error":{"message":"Validation Error:\r\n\r\nInternal constraint \"ReportTemplate.InvalidFieldsForAdjustedPrices\" execution failure: message='Value cannot be null.\r\nParameter name: source' / exid='356ee8c2-6d52-4f19-a885-0223874fd7e4'"}}

The body I send is :

{
    "@odata.type": "#DataScope.Select.Api.Extractions.ReportTemplates.SinglePriceHistoryReportTemplate",
    "ShowColumnHeaders": true,
    "Name": "MyTemplateName",
    "Condition":{
        "EndDate": "2022-05-31T00:00:00.000Z",
        "AdjustedPrices": false,
        "LastEntityOnly": false
    }
}

I use a PUT query as stated in the API Documentation with this url :

https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/SinglePriceHistoryReportTemplates('MyTemplateIdIsHere')'

As you can see in my content body, the parameter AdjustedPrices is set. So how can I solve the error "ReportTemplate.InvalideFieldsForAdjustedPrices"?

Also do you see any other error in my query ?

Thanks in advances,

Mathieu

price-historyupdate-messagereport-template
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.

Upvote
Accepted
78.1k 246 52 72

@mathieu.comandini

I checked and found that to avoid the error, I need to specify the content fields in the request message. I got the content fields from the GET method of the /Extractions/SinglePriceHistoryReportTemplates('reportTemplateID') endpoint.


1655718069644.png





1655718069644.png (71.5 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.

Upvotes
1 0 0 1

Thank you, I can make it work with that

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.