---
title: "Upload dataset"
method: POST
path: "/data"
tags: ["data"]
---

# Upload dataset

`POST /data`

Uploads a dataset. Upon success, it returns the data id.

## Query parameters

- `api_key` string, required

## Response `200`

Id of the uploaded dataset

- object
  - `upload_data_set` InlineResponse2001UploadDataSet
    - `id` string — ID of the uploaded dataset, a positive integer

## Other responses

- `412` — Precondition failed. An error code and message are returned. 130 - Problem with file uploading. There was a problem with the file upload. 131 - Problem validating uploaded description file. The XML description format does not meet the standards. 132 - Failed to move the files. Internal server error, please contact API administrators. 133 - Failed to make checksum of datafile. Internal server error, please contact API administrators. 134 - Failed to insert record in database. Internal server error, please contact API administrators. 135 - Please provide description xml. 136 - File failed format verification. The uploaded file is not valid according to the selected file format. Please check the file format specification and try again. 137 - Please provide API key. In order to share content, please log in or provide your API key. 138 - Authentication failed. The API key was not valid. Please try to login again, or contact API administrators 139 - Combination name / version already exists. Leave version out for auto increment 140 - Both dataset file and dataset url provided. The system is confused since both a dataset file (post) and a dataset url (xml) are provided. Please remove one. 141 - Neither dataset file or dataset url are provided. Please provide either a dataset file as POST variable, or a dataset url in the description XML. 142 - Error in processing arff file. Can be a syntax error, or the specified target feature does not exists. For now, we only check on arff files. If a dataset is claimed to be in such a format, and it can not be parsed, this error is returned. 143 - Suggested target feature not legal. It is possible to suggest a default target feature (for predictive tasks). However, it should be provided in the data. 144 - Unable to update dataset. The dataset with id could not be found in the database. If you upload a new dataset, unset the id.

---

[API](https://skmtc.net/openml/apis/openml-api.md) · [All operations](https://skmtc.net/openml/apis/openml-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openml/openml-api/revisions/263d3d6ee586/schema)
