POST
/
datasets
/
{dataset_id}
/
datapoints
import honeyhive
from honeyhive.models import operations

s = honeyhive.HoneyHive(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.datasets.add_datapoints(dataset_id='<value>', request_body=operations.AddDatapointsRequestBody(
    project='<value>',
    data=[
        {
            'key': '<value>',
        },
    ],
    mapping=operations.Mapping(
        inputs=[
            '<value>',
        ],
        ground_truth=[
            '<value>',
        ],
        history=[
            '<value>',
        ],
    ),
))

if res.object is not None:
    # handle response
    pass
{
  "inserted": true,
  "datapoint_ids": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

dataset_id
string
required

The unique identifier of the dataset to add datapoints to like 663876ec4611c47f4970f0c3

Body

application/json
project
string

Name of the project associated with this dataset like New Project

data
object[]

List of JSON objects to be added as datapoints

mapping
object

Mapping of keys in the data object to be used as inputs, ground truth, and history, everything else goes into metadata

required
any

Response

200 - application/json
Successful addition
inserted
boolean
datapoint_ids
string[]

List of unique datapoint ids added to the dataset