Upload CSV

Add Datapoints from a CSV file to a Dataset.

This will create a new version of the Dataset with the Datapoints from the CSV file.

If either version_id or environment is provided, the new version will be based on the specified version, with the Datapoints from the CSV file added to the existing Datapoints in the version. If neither version_id nor environment is provided, the new version will be based on the version of the Dataset that is deployed to the default Environment.

You can optionally provide a name and description for the new version using version_name and version_description parameters.

Path parameters

idstringRequired

Unique identifier for the Dataset

Headers

X-API-KEYstringRequired

Query parameters

version_idstringOptional

ID of the specific Dataset version to base the created Version on.

environmentstringOptional

Name of the Environment identifying a deployed Version to base the created Version on.

Request

This endpoint expects a multipart form containing a file.
filefileRequired

A CSV file containing Datapoints to be added to the Dataset.

version_namestringOptional

Name for the new Dataset version.

version_descriptionstringOptional

Description for the new Dataset version.

Response

Successful Response

pathstring

Path of the Dataset, including the name, which is used as a unique identifier.

idstring

Unique identifier for the Dataset. Starts with ds_.

namestring

Name of the Dataset, which is used as a unique identifier.

version_idstring

Unique identifier for the specific Dataset Version. If no query params provided, the default deployed Dataset Version is returned. Starts with dsv_.

created_atdatetime
updated_atdatetime
last_used_atdatetime
datapoints_countinteger

The number of Datapoints in this Dataset version.

directory_idstringOptional

ID of the directory that the file is in on Humanloop.

descriptionstringOptional

Description of the Dataset.

readmestringOptional

Long description of the file.

tagslist of stringsOptional

List of tags associated with the file.

type"dataset"OptionalDefaults to dataset
environmentslist of objectsOptional

The list of environments the Dataset Version is deployed to.

created_byanyOptional

The user who created the Dataset.

version_namestringOptional

Unique name for the Dataset version. Version names must be unique for a given Dataset.

version_descriptionstringOptional

Description of the version, e.g., the changes made in this version.

datapointslist of objectsOptional

The list of Datapoints in this Dataset version. Only provided if explicitly requested.

attributesmap from strings to anyOptional

Additional fields to describe the Dataset. Helpful to separate Dataset versions from each other with details on how they were created or used.

Errors