Sitevision API
Last updated
Last updated
Ebbot utilizes the Sitevision REST API to fetch Sitevision content and convert it to Ebbot documents for EbbotGPT to generate responses from. In order to fetch information, the REST API must be enabled within Sitevision. This can be done in Sitevision's edit mode:
Click the cog wheel icon in the top bar and select site settings
Under 'Integration' - select REST-API
Check 'Enable REST-API', adjust any restrictions to the API you would like to apply and click OK.
This enables the API, for more information about additional configuration, please consult the Sitevision help & documentation:
https://help.sitevision.se/en/siteRestApiSettingsHelp.html
https://developer.sitevision.se/docs/rest-api/model-rest-api
There are multiple settings in Ebbot for the Sitevision connection, to control which content you would like the scraper to fetch. Here is a closer look at each setting:
This is the domain of your site. Enter only the domain without protocol.
Example: mysite.domain.com
The scraper uses the HTTPS protocol when doing API calls, adding https:// or http:// before the domain will not work.
If your Rest-API is not publicly accessible, you would enter the username / password to a user that has access to the API. This is marked as optional since this varies between sites, but if the API is not set to public, these credentials are required.
This is where the scrape will start. By default it uses the root node of your site, which means this can be left blank if you want to include the full site.
If you would like to start the scraping process at a different part of your site, you can enter the node ID of the page from where it should start.
The scraping process traverses down the site tree from the root node
Checking this box will exclude any pages that have been hidden from the navigation menu in Sitevision
Add the page ID's of any pages you want to exclude. If you want to exclude the specific page but include its subpages, deselect the 'Exclude subpages' checkbox.
There are two primary ways to get the ID of a page.
From the address bar in the Sitevision editor. When in Sitevision edit mode, the ID is the final part of the URL: https://mysite.example.com/edit/2.11fcab81189aff705752d89f
From the browsers console: By opening the page and running `window.sv.PageContext.pageId` in the developer console, it will output the ID of the current page.
In some cases you might not want to start at the root and only grab certain parts of the site.
Let’s say that we only want the EbbotGPT have knowledge about “Miljökämpen”, we would enter that page’s id.
The scraper get’s the following nodes:
Text
Block
Inline
When getting either the block or inline nodes, it gets the HTML name and turns it into the corresponding markdown tag. If there is no corresponding tag, the node gets ignored.
For example: