Upload Dataset

upload_file

Create a dataset from a data upload.

Method

POST https://data-api.foursquare.com/v1/datasets/data?name={name}&description={description}
HTTP/1.1

Parameters

HTTP API

ParameterTypeDescription
namestringName of the dataset to create.
descriptionstringOptional. Description of the dataset to create.
Headers
HeaderDescription
Content-TypeRequired. MIME type of data you are uploading, e.g. text/csv or application/json
Body

The body of the request should be the binary data you want to upload, in a format matching the supplied Content-Type.

The map state is fully documented in the Studio Map Configuration format specification.

Response

Created dataset record:

{
  "id": "string",
  "name": "string",
  "createdAt": "2021-02-04T00:17:38.652Z",
  "updatedAt": "2021-02-04T00:17:38.652Z",
  "description": "string",
  "isValid": true
}

Example

curl -X POST https://data-api.foursquare.com/v1/datasets/data?name=My+Dataset \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: text/csv' \
--data-binary '@/path/to/my_dataset.csv'