Skip to content

Rest API

Get training data

GET
/api/v1/ai/training

Retrieve the training data sources of a website: the websites, files, FAQs and integrations the AI has been trained on.

Use cases

  • Account investigation: See which knowledge sources the AI can answer from
  • Ingestion follow-up: Check the status of a source after ingesting a website, including how many URLs were indexed
  • Lookup: Fetch a single source by trainingDataId before updating it

Notes

  • Without parameters, all training data sources for the website are returned
  • Pass trainingDataId to fetch one specific source
  • indexedUrlsCount, totalUrlsCount and lastScanTimestamp tell you how a website ingestion went
x-api-key
required
string

Your API key from account settings.

x-user-email
required
string

The email address of your user.

x-account-id
required
string

The ID of your account. You can find this in the account settings.

x-website-id
required
string

The ID of the workspace you want to use.

trainingDataId
string

Fetch a single training data source by its ID.

The training data sources.

object
trainingData
Array<object>

A training data source. Fields vary by type.

object
Example
{
"trainingData": [
{
"accountId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"websiteId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"trainingDataId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"type": "url",
"method": "all",
"url": "https://www.example.com",
"name": "Example website",
"isPublic": true,
"schedule": "Weekly",
"indexedUrlsCount": 124,
"totalUrlsCount": 130,
"lastScanTimestamp": 1641081600000
}
]
}

Unauthorized - invalid API key.