Pular para o conteúdo

/api/v1/dataset-items (POST)

POST
/api/v1/dataset-items
curl --request POST \
--url https://api.endless.zaia.app/api/v1/dataset-items \
--header 'Content-Type: application/json' \
--data '{ "datasetId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "enabled": true, "endsAt": null, "startsAt": null, "file": "example", "fileName": "example", "name": "example", "preserveName": true }'

Creates a new dataset item.

Media typeapplication/json
object
datasetId
required

The dataset ID associated with the dataset item.

string format: uuid
enabled

Whether the dataset item is enabled for agent searches.

boolean
default: true
endsAt

The exclusive end of the dataset item availability period.

string format: date-time
nullable
startsAt

The inclusive start of the dataset item availability period.

string format: date-time
nullable
file
required

A base64 encoded string with prefix.

string
/^data:.*;base64,/
fileName

Original uploaded file name, used to validate the extension.

string
>= 1 characters <= 255 characters
name

The display name of the dataset item. Required when preserveName is true; ignored otherwise.

string
>= 3 characters <= 50 characters
preserveName

When true, stores the provided name instead of generating a title from the document content.

boolean

The dataset item was created.

Media typeapplication/json
object
createdAt
required
string format: date-time
id
required

A UUID v4 string that identifies an entity.

string format: uuid
updatedAt
required
string format: date-time
datasetId
required

The dataset ID associated with the dataset item.

string format: uuid
description
required

The internal description of the dataset item.

string
>= 3 characters <= 250 characters
enabled

Whether the dataset item is enabled for agent searches.

boolean
default: true
endsAt

The exclusive end of the dataset item availability period.

string format: date-time
nullable
file
required

The file payload or file reference associated with the dataset item.

string
name
required

The display name of the dataset item.

string
>= 3 characters <= 50 characters
sourceType
required

The source type used to classify the dataset item.

string
Allowed values: text document
startsAt

The inclusive start of the dataset item availability period.

string format: date-time
nullable
status
required

The processing status of the dataset item.

string
Allowed values: pending processing completed failed
Example
{
"enabled": true,
"endsAt": null,
"sourceType": "text",
"startsAt": null,
"status": "pending"
}

Invalid dataset item configuration.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}

Unauthorized.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}

Plan limit exceeded.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}

Dataset not found.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}