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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 2 2 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 512.0 KiB each and 1.0 MiB total.

@akio.tajima
Thank you for your participation in the forum. Are any of the replies below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply that best answers your question. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.
Thanks,
-AHS

Hello @akio.tajima

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

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

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
32.2k 40 11 20

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

@zoya.farberov

Should there be any further response on top of the customer's reply? Otherwise, we'll ask he accept your answer if it is adequate.

Hello @akio.tajima ,

Are you able to access the API reference tree

or only bale to access XSD?

If yes, are you finding all the information you are looking for?

Upvotes
11.3k 25 9 14

@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 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 40 11 20

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 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.