download_multiple_dataset_files

DatasetsApi.download_multiple_dataset_files(id, action, role_id, content_type=None, limit=None, multi_file_download=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Trigger multi-file ZIP download

Starts asynchronous ZIP batch job(s) for multiple files. Query action=multiple-files is required. Select files via body Files, and/or query limit (latest N completed files, 1-250), and/or body DateRange. Email notification is sent when ZIP(s) are ready. Caller needs download access (including TBAC where applicable).

Parameters:
  • id (str) – Dataset ID containing the files. (required)

  • action (str) – Must be multiple-files. (required)

  • role_id (str) – Amorphic role ID used for authorization. (required)

  • content_type (str) – Optional request Content-Type; use application/json when sending a body.

  • limit (str) – Latest N completed files to include when Files is omitted (1-250).

  • multi_file_download (MultiFileDownload)

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

DownloadMultipleDatasetFilesResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: POST /datasets/{id}/files/download

Request

The request body is optional.

Request / response example

{
  "Files": [
    "data/report_week1.csv",
    "data/report_week2.csv"
  ]
}

Success (HTTP 200)

ZIP job(s) triggered; email follows when ready.

Request / response example

{
  "Message": "2 ZIP batch job(s) have been triggered for 40 files. You will receive email notification(s) when ready."
}

Errors

Documented error codes: IPV-1042, IPV-1043, IPV-1008.

HTTP 400

Validation failure. Codes include IPV-1042 (missing/invalid action), IPV-1043-1047 selection errors, IPV-1008, plus download validation codes.

Missing action

{
  "Message": "IPV-1042 - action must be multiple-files"
}

HTTP 500

Backend failure initiating ZIP jobs.