question

Upvotes
Accepted
89 2 6 9

size file REST API-DataScope (code?)

File size downloaded via REST API

File size ordered via DataScope

the forum answered me that the file size on the Refinitiv server should be viewed through DataScope.

What if there's no size?

Is it impossible to send a request through the REST API and receive a response in which information about the size of the downloaded file?

Why such difficulties?

tick-history-rest-api
3.png (25.8 KiB)
2.png (25.3 KiB)
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.

Upvote
Accepted
38.1k 69 35 53

@s61670

This is a method that I used.

In the note text, there is an "Extraction ID" field. I extract the extraction ID from the note text.

string extractionID = getExtractionID(extractionResult.Notes[0]);
...
        static string getExtractionID(string note)
        {
            string pattern = @"Extraction ID: ([0-9]+)";
            string extractionID = "";
            Regex rgx = new Regex(pattern);
            Match match = rgx.Match(note);
            if (match.Success)
            {
                string[] words = match.Value.Split(':');
                extractionID = words[1].ToString().Trim();
                Console.WriteLine("ExtractionID: {0}", extractionID);
            }
            return extractionID;
        }

After getting the extractionID, I use it with the ExtractionsContext.ReportExtractionOperations.Get() method to get the file size.

            var result = ExtractionsContext.ReportExtractionOperations.Get(extractionID);
            ExtractionsContext.LoadProperty(result, "FullFile");
            long fileSize = result.FullFile.Size;
            Console.WriteLine("File Size: {0}", fileSize);
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.

Do I get the size of what's on the Refinitiv server or what I downloaded to my computer?

Tell me, please.

@s61670

It should be the size of the extracted file.

1617878143957.png (66.2 KiB)
1617878189014.png (68.0 KiB)
Upvotes
89 2 6 9


no file size information.


1.png (51.9 KiB)
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