/api/v1/dataset-items (POST)
const url = 'https://api.endless.zaia.app/api/v1/dataset-items';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"datasetId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","enabled":true,"endsAt":null,"startsAt":null,"file":"example","fileName":"example","name":"example","preserveName":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Request Bodyrequired
Seção intitulada “Request Bodyrequired”object
The dataset ID associated with the dataset item.
Whether the dataset item is enabled for agent searches.
The exclusive end of the dataset item availability period.
The inclusive start of the dataset item availability period.
A base64 encoded string with prefix.
Original uploaded file name, used to validate the extension.
The display name of the dataset item. Required when preserveName is true; ignored otherwise.
When true, stores the provided name instead of generating a title from the document content.
Responses
Seção intitulada “Responses”The dataset item was created.
object
A UUID v4 string that identifies an entity.
The dataset ID associated with the dataset item.
The internal description of the dataset item.
Whether the dataset item is enabled for agent searches.
The exclusive end of the dataset item availability period.
The file payload or file reference associated with the dataset item.
The display name of the dataset item.
The source type used to classify the dataset item.
The inclusive start of the dataset item availability period.
The processing status of the dataset item.
Example
{ "enabled": true, "endsAt": null, "sourceType": "text", "startsAt": null, "status": "pending"}Invalid dataset item configuration.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}Unauthorized.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}Plan limit exceeded.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}Dataset not found.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}