POST /datasets/:id/records:retrieve

Description

Generate a pre-signed URL to download the contents of a dataset. The response body provides a URL to the dataset in CSV format or newline-delimited JSON.

Pre-signed URLs are only valid for 1 hour.

Path Parameters

Path ParameterDescriptionNote
:idPassed through the URL. This ID belongs to the dataset you want to access, and can be found in the response body response body of GET /datasets.Required

Parameters

Parameter

Type

Description

Note

contentType

string

Must be either “csv” or “json” depending on what file format you’d like records back.

If “json” - the return file will be formatted as newline-delimited JSON.

Required

URL Structure

https://app.movementinfrastructure.org/api/v1/datasets/:id/records:retrieve

Example Request Body

{ 
  "contentType": "csv"
}

Example Response Body

{
 "url":"https://storage.googleapis.com/example-from-dxapi/dataset.csv?X-Exam-ple=MIG1G4-RVA-QWE234",
}