Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameter

Type

Description

Example

runIdint

The "dpRunId" run identifier returned by the runDataProduct() method, to be provided to the download method in the API data product delivery service.

9505160

maxRetriesint

The number of times to poll the service asking if the product is ready for download, before the method aborts.

Default: 0 (no limit).

1000
downloadResultsOnlyboolean

Whether the files will be downloaded or if only the download URL for each file will be returned.

  • True: Files will not be downloaded. The file download URLs will be included in the method results
  • False: Files are downloaded to the output path

Default: False

True
includeMetadataFileboolean

Indicates if the metadata file associated with the data product request will be downloaded.

  • True: Metadata file will be downloaded
  • False: Metadata file will not be downloaded

Default: FalseTrue

True

overwriteboolean

Whether new files downloaded will overwrite previous files with the same filename found in the output directory.

  • True: Overwrite files with the same filename
  • False: Do not overwrite files (downloaded files with the same filename will be skipped)

Default: False

False

...


Code Block
languagepy
themeDJango
titleExample: Download all data product files with a run id
from onc.onc import ONC
onc = ONC('YOUR_TOKEN_HERE')

result = onc.downloadDataProduct(32234649505160)
onc.print(result)


Returns

...