Rest API
Get training data
GET /api/v1/ai/training
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
trainingDataIdbefore updating it
Notes
- Without parameters, all training data sources for the website are returned
- Pass
trainingDataIdto fetch one specific source indexedUrlsCount,totalUrlsCountandlastScanTimestamptell you how a website ingestion went
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” 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.
Query Parameters
Section titled “Query Parameters ” trainingDataId
string
Fetch a single training data source by its ID.
Responses
Section titled “ Responses ”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.