Training

/dataitem/all

Published @ 17/11/23 by

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

Lists all your data items (Also known as "data sets") 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.

agentId string Required
The ID of the agent that you want to retreive the data items of.

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

Return (success)

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

data dataItems[]
An array of data item objects.

{
    "status": true,
    "data": [
        { /* data item 1 */ },
        { /* data item 2 */ }
    ]
  }

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": "An agent with that ID was not found"
  }