requestDownloadMetadata

Function
import { requestDownloadMetadata } from "@esri/hub-downloads";
const params = {
  host: 'https://opendata.arcgis.com,
  datasetId: 'abcdef0123456789abcdef0123456789_0',
  format: 'CSV',
  target: 'hub'
};
requestDownloadMetadata(params)
  .then(response => {
    // {
    //   downloadId: 'abcdef0123456789abcdef0123456789_0::csv',
    //   contentLastModified: '2020-06-17T01:16:01.933Z',
    //   lastEditDate: '2020-06-18T01:17:31.492Z',
    //   lastModified: '2020-06-17T13:04:28.000Z',
    //   status: 'stale',
    //   downloadUrl: 'https://dev-hub-indexer.s3.amazonaws.com/files/dd4580c810204019a7b8eb3e0b329dd6/0/full/4326/dd4580c810204019a7b8eb3e0b329dd6_0_full_4326.csv',
    //   contentLength: 1391454,
    //   cacheTime: 13121
    // }
  });

Fetch metadata for a Hub download.

Parameters

Parameter Type Default Notes
params Required IDownloadMetadataRequestParams

Returns

Property Type Notes
downloadId string
status DownloadStatuses
cacheTime Optional number
contentLastModified Optional string
contentLength Optional number
downloadUrl Optional string
errors Optional Error[]
lastEditDate Optional string
lastModified Optional string

Function defined in downloads/src/request-download-metadata.ts:83