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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 1 4

what is the correct way to link between ReportTemplateTypes and ExtractionRequests derived classes ?

Hi

I tried to create some type of drill down query system for DSS.

Thank you for publishing metadata as XSD, that helps me greatly.

However, I had some trouble about to get ExtractionRequest derived class by ReportTemplateTypes enum name such as DetailEstimateFootNotes and CompanyEstimatesFootnotes.

I would like to know the correct way to link between them.

Below is my struggling:

In many cases, I can get correct ExtractionRequest derived class by concatenating ReportTemplateTypes name and 'ExtractionRequest'. For example 'FundAllocation' + 'ExtractionRequest' => FundAllocationExtractionRequest.

However I can't get 'DetailEstimateFootNotes' + 'ExtractionRequest' class. It seems EstimatesFootnotesDetailExtractionRequest is the correct one.

I also found that each ExtractionRequest derived classes have an annotation with Term=Org.OData.Core.V1.Description. It contains Reference Data such as 'FundAllocation'. Therefore I think it can be linked from ExtractionRequest derived class to ReportTemplateTypes and vice versa.

However, for example TickHistoryRawExtractionRequest has 'Time Bar' and there is no 'Time Bar' in the Enum definition. It seems TickHistoryRaw is the correct one.

---------------------------------

Adding an example (9 May, 2018)

For example,

In Metadata (XSD) on Extractions, I can find the complex type SingleHistoricalPriceExtractionRequest, however, I can't find corresponding ReportTemplateTypes enum members.

Therefore I can't get the list of ContentFieldNames by invoking GetValidContentFieldTypes API because there is no clue of the ReportTemplateTypes name.

Indeed, Extractions -> OnDemandExtractions-> ExtractWEIthNotes

And select SingleHistoricalPriceExtractionRequest for Parameter Name = ExtractionRequest on Features & Behaviors pane.

The ContentFileldNames has blank FieldNames. Therefore we can't find any valid ContentFieldNames.

That is the same thing caused by lacking imcomplete metadata, I should suppose to.

-------------------------------------

Akio

dss-rest-apidatascope-selectdssextractionmetadata
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.

At this time, I have no suitable answers. Only Zoya gave me some comment, howerver as I commented it, this was not about XSD.

Upvotes
Accepted
23k 22 9 14

Have you had a chance to Review

API Reference Tree

?

if you expand Extractions -> OnDemandExtractions-> ExtractRaw,

The drop-down list for ExtractionRequest will contain all the possible values of ExtractionRequest.

Once you select the preferred ExtractionRequest type from the drop-down list, the reference will reflect all the available and required fields for this specific request type.

Is this reference information what you are looking for?

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

I took them from XSD linked from Metadata under the name of Extractions on

https://hosted.datascopeapi.reuters.com/RestApi/v1/

Upvotes
11.3k 25 8 13

@akio.tajima

I understand that ReportTemplateTypes and ExtractionRequest are defined for different extraction request type. The ReportTemplateTypes is used for Schedule Extraction, while the ExtractionRequest is used for On-Demand Extraction. As both extraction types should provide similar data, ReportTemplateTypes and ExtractionRequest might be linked, but they should not be converted directly.

If you want to get ContentFieldNames by ExtractionRequest, you can use the GetValidContentFieldTypesForClass endpoint instead.

Hope this helps.

Below is the example.

Request:
GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/GetValidContentFieldTypesForClass(ReportTemplateOrExtractRequestClassName='SingleHistoricalPriceExtractionRequest')

Response:
{
    "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ContentFieldTypes",
    "value": [
        {
            "Code": "TPX.7 Day Compound Yield",
            "Name": "7 Day Compound Yield",
            "Description": "Instrument's calculated 7-day yield that assumes coupon payments are invested at the current market interest rate at the time of receipt and held until maturity",
            "FormatType": "Number",
            "FieldGroup": " "
        },
        {
            "Code": "TPX.7 Day Yield",
            "Name": "7 Day Yield",
            "Description": "Instrument's calculated 7-day yield, including the day on which the figure is reported, as supplied by NASDAQ",
            "FormatType": "Number",
            "FieldGroup": " "
        },
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
23k 22 9 14

Hello again @akio.tajima,

Thanks for the clarification, now we understand your question better, and I think the answer is that there is no guaranteed direct correspondence between on-demand and template-scheduled requests. Template-based request was designed to mimic GUI-driven request functionality. On-demand was designed separately, and the intention was quick API-based requesting and testing.

Often, there is the same request for on demand and template-based way of extraction, but not always.

Agree with @veerapath.rungruengrayubkul, for your use case GetValidContentFieldTypesForClass request appears to be the best way to find out the available fields for a request type.

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