Training

/dataitem/delete

Published @ 17/11/23 by

author Fatos
Fatos, Founder @ answerly.io
POST https://ai.api.answerly.io/dataitem/delete

Deletes a data item (Also known as "data set") from the knowledge hub of an agent.

Request Body

APIKey string Required
Your API key. You can read more about how to get an API Key by clicking here.

dataItem.id string Required
The ID of the data item.

Every time you create a data item, the server will respond with your data item object, which includes the id.

You can also find data item IDs when you request all data item objects, with the /dataitem/all/ request.

curl --request POST \
    --url https://ai.api.answerly.io/dataitem/delete \
    --header 'Content-Type: application/json' \
    --data '{
      "APIKey": "YOUR_API_KEY",
      "dataItem": {
          "id": "YOUR_DATAITEM_ID"  
      }
  }'

Return (success)

status boolean
A boolean indicating the success or failure of the request.

data object
An empty object.

{
    "status": true,
    "data": {}
}

Return (failure)

status boolean
A boolean indicating the success or failure of the request.

data string
An error message returned by the server.

{
    "status": false,
    "data": "A data item with that ID was not found"
  }