iframe API
What is the iframe API?
The iframe API is a set of pages you can embed inside of your own pages that contain content from Smart Knowledge Hub. It is part of the Public Search frontend application and thus only will display information that is set to be available in public.
The base URL
Being part of the Public Search frontend, the base url for the iframe API is https://public.smart.knowledgehub.cloud/, followed by a three letter identifier that defines which tenant and public search filter to use.
As an example, https://public.smart.knowledgehub.cloud/psg/api/header will display the logo for Pokeshot GmbH.
Please note that there will be no background set for the content of the iframe, no matter which theme you are using. Please set a background inside the iframe-tag if you need one.
Query parameters you can use everywhere
There are two query parameters you can use everywhere inside the iframe API:
name | description |
---|---|
lang | This defines the language of the frontend to use. If not set, the application will try to get that information from your browser settings. |
theme | This defines the theme to use. |
Possible languages for the frontend
The following languages can be used as frontend languages:
value | language |
---|---|
de | German |
en | English |
es | Spanish |
Please note that for some of the functions, this has no effect due to the absence of language information.
Available themes
The following themes are available:
value | theme |
---|---|
light | Light mode |
dark | Dark mode |
Available API frontends
Currently, the follwowing frontends are available:
Frontend | description |
---|---|
(general) | This contains general API methods |
SKH | This contains methods that try to imitate the look and feel of the Public Search Frontend application. |
FAQ | This contains API methods that can be embedded inside an FAQ page or similar. |
List of general frontend methods
Header
[base_url]/api/header
This method returns the logo and name of the tenant.
Additional Parameters
none
Login
[base_url]/api/login
This method displays a login button.
Additional Parameters
none
List of SKH frontend methods
Content
[base_url]/api/skh/content/[id]
This method displays the given content using the Smart Knowledge Hub Content Host application.
Additional Parameters
parameter | type | mandatory | description |
---|---|---|---|
id | part of the path | yes | Can either be a GUID or a shortened GUID from a share link |
Promoted
[base_url]/api/skh/promoted
This displays a list of promoted items.
Additional Parameters
parameter | type | mandatory | description |
---|---|---|---|
top | query | no | This can be used to limit the number of results. If not defined, 10 is used as default value. |
Please note that this will only display any results if there is no filter defined for the Public Search you specify using the three letter identifier of the base url.
Usage
[base_url]/api/skh/usage
This displays a list of items that depend on their usage.
Additional Parameters
parameter | type | mandatory | description |
---|---|---|---|
top | query | no | This can be used to limit the number of results. If not defined, 10 is used as default value. |
type | query | no | This can be either 'playlist' or 'element' and can be used to filter the result by type. |
date | query | no | This can be used to filter the result by age. Please use a combination of integer number and unit to define it. If you are using a wrong format, this parameter will be ignored. |
language | query | no | This can be used to filter the result by content language. Please use a two-letter string (three letters for klingon) to define it. |
The following date units are available:
- day
- days
- week
- weeks
- month
- months
- year
- years
Please note that this will only display any results if there is no filter defined for the Public Search you specify using the three letter identifier of the base url.
Search
[base_url]/api/skh/search
This displays a list of search results.
It can also be used to display one or more specific items. Please use 'id:', followed by a comma-separated list of content ids to display, as search term here.
Additional Parameters
parameter | type | mandatory | description |
---|---|---|---|
q | query | yes | Use this parameter to specify your query. |
top | query | no | This can be used to limit the number of results. If not defined, 10 is used as default value. |
Please note that this method will automatically choose between a database-based and a search index-based search; depending on if there is a filter defined for the Public Search you specify using the three letter identifier of the base url. Searches that consist of 'id:', followed by a comma-separated list of content ids, will always be executed as a database search.
List of FAQ frontend methods
Content
[base_url]/api/faq/content/[id]
This method displays the given content using the Smart Knowledge Hub Content Host application.
Additional Parameters
parameter | type | mandatory | description |
---|---|---|---|
id | part of the path | yes | Can either be a GUID or a shortened GUID from a share link |
Promoted
[base_url]/api/faq/promoted
This displays a list of promoted items.
Additional Parameters
parameter | type | mandatory | description |
---|---|---|---|
top | query | no | This can be used to limit the number of results. If not defined, 10 is used as default value. |
Please note that this will only display any results if there is no filter defined for the Public Search you specify using the three letter identifier of the base url.
Usage
[base_url]/api/faq/usage
This displays a list of items that depend on their usage.
Additional Parameters
parameter | type | mandatory | description |
---|---|---|---|
top | query | no | This can be used to limit the number of results. If not defined, 10 is used as default value. |
type | query | no | This can be either 'playlist' or 'element' and can be used to filter the result by type. |
date | query | no | This can be used to filter the result by age. Please use a combination of integer number and unit to define it. If you are using a wrong format, this parameter will be ignored. |
language | query | no | This can be used to filter the result by content language. Please use a two-letter string (three letters for klingon) to define it. |
The following date units are available:
- day
- days
- week
- weeks
- month
- months
- year
- years
Please note that this will only display any results if there is no filter defined for the Public Search you specify using the three letter identifier of the base url.
Search
[base_url]/api/faq/search
This displays a list of search results.
It can also be used to display one or more specific items. Please use 'id:', followed by a comma-separated list of content ids to display, as search term here.
Additional Parameters
parameter | type | mandatory | description |
---|---|---|---|
q | query | yes | Use this parameter to specify your query. |
top | query | no | This can be used to limit the number of results. If not defined, 10 is used as default value. |
Please note that this method will automatically choose between a database-based and a search index-based search; depending on if there is a filter defined for the Public Search you specify using the three letter identifier of the base url. Searches that consist of 'id:', followed by a comma-separated list of content ids, will always be executed as a database search.