Skip to navigation

Add Url Source

Add a URL as a knowledge source

Headers

xi-api-keystringOptional
xi-workspace-idstringRequired
The customer workspace a reseller's API key acts on.

Request

This endpoint expects an object.
urlstringRequiredformat: "uri"1-2048 characters
The HTTPS page or site to read.
crawl_entire_sitebooleanOptionalDefaults to false
Crawl the whole site instead of only the page at url.

Response

Successful Response
idstring
The knowledge source's ID.
source_typeenumOptionalDefaults to file
Whether the source is an uploaded file or a web page or site.
Allowed values:
source_urlstring or nullOptional
The page or site URL for 'url' sources.
last_scraped_at_unixinteger or nullOptional
When the URL was last read, as a Unix timestamp in seconds.
original_filenamestringOptionalDefaults to

The uploaded file’s name for ‘file’ sources; empty for URLs.

content_typestringOptionalDefaults to

The uploaded file’s MIME type; empty for URLs.

file_size_bytesintegerOptionalDefaults to 0

The uploaded file’s size in bytes; 0 for URLs.

statusenumOptionalDefaults to processing

Where processing stands: ‘processing’, ‘ready’ or ‘error’.

Allowed values:
error_messagestring or nullOptional
Why processing failed, when status is 'error'.
failure_reasonenum or nullOptional

Machine-readable cause of the failure, when status is ‘error’.

crawl_entire_sitebooleanOptionalDefaults to false

Whether the whole site was crawled rather than the single page at source_url.

scraped_pages_countintegerOptionalDefaults to 0
How many pages were read for 'url' sources.
content_previewstring or nullOptional

A short plain-text preview of the content.

processing_started_at_unixinteger or nullOptional
When processing started, as a Unix timestamp in seconds.
created_at_unixintegerOptional
When this was created, as a Unix timestamp in seconds.
updated_at_unixintegerOptional
When this was last updated, as a Unix timestamp in seconds.

Errors

422
Unprocessable Entity Error