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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
7 2 4 4

How do I know through DSS download file size?


How do I know through DataScope download file size?

I downloaded several files through the REST API and want to know for sure that the file size on the Refinitiv server exactly matches the file size that I downloaded.
How do I do that?


Please provide a step-by-step description of how to recognize file size through DataScope


I am interested in how I can check that the size of the downloaded file on my computer is equal to the size of the file located on the Refinitiv server

I wonder if there's a way to track the size of the files on the Refinitiv server that are being prepared for download on my computer?

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

1 Answer

· Write an Answer
Upvotes
Accepted
32.2k 40 11 20

Hello @mohamed.hisham,

Once your job is completed, you can request the extraction details, including file size, via ExtractionFileId. Please note that this ID is different from accepted JobId:

{ {protocol}}{ {host}}{ {api}}Extractions/ExtractedFiles('{ { extractedDataFileId}}')

An example of a result obtained:

{
    "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ExtractedFiles/$entity",
    "ExtractedFileId": "VjF8MHgwNzgzODFhOWQ3NTc2ZWFhfA",
    "ReportExtractionId": "2000000246945099",
    "ScheduleId": "0x078385142e576ebe",
    "FileType": "Note",
    "ExtractedFileName": "_OnD_0x078385142e576ebe.csv.gz.notes.txt",
    "LastWriteTimeUtc": "2021-04-12T15:04:25.090Z",
    "ContentsExists": true,
    "Size": 1246,
    "ReceivedDateUtc": "2021-04-12T15:04:25.090Z"
}

As this id does not come back in notes or Job status check (this info only becomes available once the extraction is completed), or as an alternative approach, you can request all the extracted files information, and search the result by the jobId.

{ {protocol}}{ {host}}{ {api}}Extractions/ExtractedFiles

For example:

{
    "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ExtractedFiles",
    "value": [
        {
            "ExtractedFileId": "VjF8MHgwNzgzODFhOWQ3NTc2ZWFhfA",
            "ReportExtractionId": "2000000246945099",
            "ScheduleId": "0x078385142e576ebe",
            "FileType": "Note",
            "ExtractedFileName": "_OnD_0x078385142e576ebe.csv.gz.notes.txt",
            "LastWriteTimeUtc": "2021-04-12T15:04:25.090Z",
            "ContentsExists": true,
            "Size": 1246,
            "ReceivedDateUtc": "2021-04-12T15:04:25.090Z"
        },
...

Please review the complete spec via DSS API Reference Tree


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.