POST
/
datasets
/
{slug}
/
items
Create a dataset item
curl --request POST \
  --url https://api.getbasalt.ai/datasets/{slug}/items \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Test case 1",
  "values": {
    "columnName1": "value1",
    "columnName2": "value2"
  },
  "idealOutput": "This is the expected output",
  "metadata": {
    "source": "api",
    "context": "testing"
  },
  "isPlayground": false
}'
{
  "warning": "The following columns do not exist in the dataset and were omitted: extraColumn1, extraColumn2",
  "datasetRow": {
    "name": "Test case 1",
    "values": {
      "columnName1": "value1",
      "columnName2": "value2"
    },
    "idealOutput": "This is the expected output",
    "metadata": {
      "source": "api",
      "context": "testing"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

slug
string
required

The slug of the dataset to add an item to

Example:

"my-dataset"

Body

application/json

Response

201
application/json

The created dataset item

The response is of type object.