Skip to main content
Send a field name and JSON Schema, or a fields array for several fields. Returns the created field or fields. Names and schemas cannot be changed through this API.

Signature

Method signatures on client.datasets:

Parameters

createField()

string
required
Dataset ID with prefix ds..
string
required
Name of the new dataset field.
JsonSchema
required
JSON Schema that values in the new field must satisfy.See the HTTP endpoint for the supported JSON Schema fields.

createFields()

string
required
Dataset ID with prefix ds..
{ name: string; jsonSchema: JsonSchema }[]
required
Dataset fields to create, with unique names and their JSON Schemas.

Returns

createField() result

Promise<DatasetField> A field of a dataset.
DatasetFieldId
required
Dataset field ID with prefix df..
string
required
Name of the dataset field.
string | null
required
Description of the field, or null when none is set.
JsonSchema
required
JSON Schema that values in this field must satisfy.See the HTTP endpoint for the supported JSON Schema fields.
boolean
required
True when this field is excluded from pipeline input bindings. The field is still included in dataset field responses.
object | null
required
Set when this is a split field: each row’s value names its part.
DatasetFieldOperation[]
required
Operations currently writing to this field. A split or slice that reads the field is rejected while a blocking operation runs.
string
required
Time the field was created, as an ISO 8601 timestamp.

createFields() result

Promise<DatasetField[]> Dataset fields created by this request. Returns an array. Each item has these fields:
DatasetFieldId
required
Dataset field ID with prefix df..
string
required
Name of the dataset field.
string | null
required
Description of the field, or null when none is set.
JsonSchema
required
JSON Schema that values in this field must satisfy.See the HTTP endpoint for the supported JSON Schema fields.
boolean
required
True when this field is excluded from pipeline input bindings. The field is still included in dataset field responses.
object | null
required
Set when this is a split field: each row’s value names its part.
DatasetFieldOperation[]
required
Operations currently writing to this field. A split or slice that reads the field is rejected while a blocking operation runs.
string
required
Time the field was created, as an ISO 8601 timestamp.

Errors

HTTP errors throw PotatoApiError. The endpoint documents these error responses: HTTP endpoint: POST /datasets/{datasetId}/fields.