For a deeper look into our DataScope Select REST 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 512.0 KiB each and 1.0 MiB total.

@jirapongse.phuriphanvichai

The user posted a follow-up question on this thread. Could you please take a look and respond? Thank you very much.

Hello @c.ciurlo

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS


Upvotes
Accepted
78.8k 250 52 74

@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 512.0 KiB each and 1.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
78.8k 250 52 74

@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 512.0 KiB each and 1.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 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.