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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 0 0 0

How to create RangeQuery of a CorporateAction template

Hi,

how can I create this CorporateActionsStandardReportTemplate (XML file showed below) whit REST API Datascope, in particular the RangeQuery section?

Can you give me an example? Thank you.

Best regards.


<?xml version="1.0"?>

<ReportRequest xmlns="http://www.refinitiv.com/Datascope/ReportRequest.xsd">;

<ReportTemplate xmlns:version="1">

<ReportAction>Replace</ReportAction>

<Name>NEW Historical FULL DATA RTCE Future Corax report</Name>

<CorporateActionsStandardEvents>

<RangeQuery>

<QueryStart>

<AllHistoricalEvents>

<AllowNullDates>No</AllowNullDates>

</AllHistoricalEvents>

</QueryStart>

<QueryEnd>

<AllFutureEvents> </AllFutureEvents>

</QueryEnd>

<AllowEmptyEvents>No</AllowEmptyEvents>

<ExcludeDeletedEvents>Yes</ExcludeDeletedEvents>

</RangeQuery>

...

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

@c.ciurlo

I assume that you would like to create a CorporateActionsStandardReportTemplate with DSS REST API. I have tested with the following request.

POST: Extractions/CorporateActionsStandardReportTemplates
{
  "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.CorporateActionsStandardReportTemplate",
  "ShowColumnHeaders": false,
  "Name": "corax2",
  "Headers": [],
  "Trailers": [],
  "ContentFields": [
    {
      "FieldName": "Corporate Actions Type"
    },
    {
      "FieldName": "Capital Change Event Type"
    },
    {
      "FieldName": "Capital Change Event Type Description"
    },
    {
      "FieldName": "Actual Adjustment Type"
    }
  ],
  "Condition": {
      "ReportDateRangeType": "Range",
      "ExcludeDeletedEvents": true,
      "IncludeDividendEvents": true
      
      }
}

The XML of the corax2 report template has the following RangeQuery property.

<Name>corax2</Name>
    <CorporateActionsStandardEvents>
      <RangeQuery>
        <QueryStart>
          <AllHistoricalEvents>
            <AllowNullDates>No</AllowNullDates>
          </AllHistoricalEvents>
        </QueryStart>
        <QueryEnd>
          <AllFutureEvents> </AllFutureEvents>
        </QueryEnd>
        <AllowEmptyEvents>No</AllowEmptyEvents>
        <ExcludeDeletedEvents>Yes</ExcludeDeletedEvents>
      </RangeQuery>
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.

Hi @jirapongse.phuriphanvichai,

thank you!

So it's enough to specify just "ReportDateRangeType": "Range".



Instead, what parameter is needed to indicate a specific start date?

For example, to obtain this RangeQuery:


<?xml version="1.0"?>

<ReportRequest xmlns="http://www.refinitiv.com/Datascope/ReportRequest.xsd">;

<ReportTemplate xmlns:version="1">

<ReportAction>Replace</ReportAction>

<Name>PROVA_CORPORATE_2021</Name>

<CorporateActionsStandardEvents>

<RangeQuery>

<QueryStart>

<Date>

<Month>3</Month>

<Day>10</Day>

<Year>2021</Year>

</Date>

</QueryStart>

<QueryEnd>

<AllFutureEvents> </AllFutureEvents>

</QueryEnd>

<AllowEmptyEvents>No</AllowEmptyEvents>

<ExcludeDeletedEvents>Yes</ExcludeDeletedEvents>

</RangeQuery>


Thank you.

Best regards

Upvotes
38.1k 69 35 53

@c.ciurlo

Sorry for the late response.

The request looks like this:

POST: Extractions/CorporateActionsStandardReportTemplates
{
  "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.CorporateActionsStandardReportTemplate",
  "ShowColumnHeaders": false,
  "Name": "corax2",
  "Headers": [],
  "Trailers": [],
  "ContentFields": [
    {
      "FieldName": "Corporate Actions Type"
    },
    {
      "FieldName": "Capital Change Event Type"
    },
    {
      "FieldName": "Capital Change Event Type Description"
    },
    {
      "FieldName": "Actual Adjustment Type"
    }
  ],
  "Condition": {
      "ReportDateRangeType": "Range",
      "QueryStartDate": "2021-03-10",
      "ExcludeDeletedEvents": true,
      "IncludeDividendEvents": true
      
      }
}

The XML contains the following:

   <Name>corax2</Name>
    <CorporateActionsStandardEvents>
      <RangeQuery>
        <QueryStart>
          <Date>
            <Month>3</Month>
            <Day>10</Day>
            <Year>2021</Year>
          </Date>
        </QueryStart>
        <QueryEnd>
          <AllFutureEvents> </AllFutureEvents>
        </QueryEnd>
        <AllowEmptyEvents>No</AllowEmptyEvents>
        <ExcludeDeletedEvents>Yes</ExcludeDeletedEvents>
      </RangeQuery>
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
3 0 0 0
Thank you! Regards
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