Connect Service

The library that enables connection between the OER repository and the X5GON platform. The full documentation of the library is available HERE.

https://platform.x5gon.org/api/v1/snippet/{version}/x5gon-log.min.js

Library URL parameters
versionType: StringTitle: Library VersionOptional: falseThe version of the library. The options are: v1, v2, and latest. If latest, it will automatically take the latest version available.

To include the library add the following line in the repository site header. Replace the latest parameter with the appropriate library URL parameter value.

<script
     type="text/javascript"
     src="https://platform.x5gon.org/api/v1/snippet/latest/x5gon-log.min.js"
></script>

Connect Recommender

Enables embedding of recommendations into HTML. The request URL is different, as shown below.

https://platform.x5gon.org/embed/recommendations?text=text&url=url&width=width&height=height

Query string parameters
textType: StringTitle: Query TextOptional: trueThe query text. Longer text provides better results. If both text and url query parameters are present, url has the priority.
urlType: StringTitle: Query URLOptional: trueThe query URL. The URL must be associated with a material stored in the X5GON database. If no such URL is found, it uses thetext query parameter, if present.
widthType: StringTitle: Container WidthOptional: trueThe embedded containers width. Used to setup the container into HTML.Default value is 280px.
heightType: StringTitle: Container HeightOptional: trueThe embedded containers maximum height. Used to setup the container into HTML.Default value is 400px.
Embedding example

The recommendation results can be embedded by using different tags. The example shows how to embed the recommendation results using theiframe tag. We only use the text query parameter for the recommendations, and both width andheight parameters to assign the size of the embedded page.
NOTE: the difference between the height query parameter and the iframes height style, which is 25px. This is due to the iframes default configuration.

<iframe
     src="https://platform.x5gon.org/embed/recommendations?text=machine%20learning&width=100%25&height=400px"
     style="border:0px;width:100%;height:425px"
></iframe>

The representation of the embedded recommendations.

REST API

All URLs referenced in the REST API section have the following base:

https://platform.x5gon.org/api/v1

The X5GON Platform REST API is served over HTTPS.

Recommender REST API

The Recommender REST API allows the user to retrieve OER materials that are similar to the given query.

Available methods
GET/searchGet a list of relevant open educational resources
GET/recommend/oer_materialsGet a list of relevant open educational resources
GET/recommend/oer_bundlesGet a list of most relevant open educational bundles
GET/recommend/collaborative_filteringGet a list of personalized open educational bundles
Search for relevant materials
GET/search

Get a list of relevant open educational resources (10 per page).

Query string parameters
textType: StringTitle: Query TextOptional: falseThe seed text from which the system finds the relevant open educational resources.
typeType: StringTitle: Material TypeOptional: trueThe type of open educational resources. Possible options: all, video, audio and text.Default value is all.
pageType: IntegerTitle: PageOptional: trueThe page number of the recommended list.Default value is 1.
Response body attributes
queryType: JSONTitle: Query ParametersRead only: trueA JSON object containing the provided query parameters.
query object properties
textType: StringTitle: Query TextRead only: trueThe user provided query text.
typeType: StringTitle: Material TypeRead only: trueThe material type provided.
pageType: IntegerTitle: Result PageRead only: trueThe page number of the results.
rec_materialsType: ArrayTitle: Recommended MaterialsRead only: trueAn array of objects, each representing an recommended open educational resource.
rec_materials object properties
material_idType: IntegerTitle: Material IDRead only: trueThe unique ID of the OER material.
weightType: FloatTitle: Recommendation WeightRead only: trueThe number between 0 and 1 representing the relevance of the OER material. Greater weight means bigger relevance.
urlType: StringTitle: Material URLRead only: trueThe URL of the OER material.
titleType: StringTitle: Material TitleRead only: trueThe title of the OER material.
descriptionType: StringTitle: Material DescriptionRead only: trueThe description of the OER material.
providerType: StringTitle: Material ProviderRead only: trueThe name of the OER materials provider.
languageType: StringTitle: Material LanguageRead only: trueThe language of the OER material in ISO 639-1 code.
wikipediaType: ArrayTitle: Material Wikipedia ConceptsRead only: trueAn array of objects, each representing the most relevant wikipedia concept of the material.
wikipedia object properties
conceptType: StringTitle: Wikipedia ConceptRead only: trueThe Wikipedia concept represented as an URL.
supportType: IntegerTitle: Wikipedia Concept SupportRead only: trueThe amount of elements in the material that support the given Wikipedia concept.
typeType: StringTitle: Material TypeRead only: trueThe type of the OER material.
metadataType: JSONTitle: Result MetadataRead only: trueA JSON object containing the associated metadata. Helpful for navigating through the recommendations.
metadata object properties
num_or_materialsType: IntegerTitle: Number of Found MaterialsRead only: trueNumber of most relevant relevant recommendations.
max_pagesType: IntegerTitle: Max PagesRead only: trueThe total number of result pages.
Get a list of most relevant open educational resources (similar to /search)
GET/recommend/oer_materials

Get a list of most relevant open educational resources.

Query string parameters
textType: StringTitle: Query TextOptional: falseThe seed text from which the system finds the relevant open educational resources.
typeType: StringTitle: Material TypeOptional: trueThe type of open educational resources. Possible options: all, video, audio and text.Default value is all.
pageType: IntegerTitle: PageOptional: trueThe page number of the recommended list.Default value is 1.
Response body attributes
rec_materialsType: ArrayTitle: Recommended MaterialsRead only: trueAn array of objects, each representing an recommended open educational resource.
rec_materials object properties
material_idType: IntegerTitle: Material IDRead only: trueThe unique ID of the OER material.
weightType: FloatTitle: Recommendation WeightRead only: trueThe number between 0 and 1 representing the relevance of the OER material. Greater weight means bigger relevance.
urlType: StringTitle: Material URLRead only: trueThe URL of the OER material.
titleType: StringTitle: Material TitleRead only: trueThe title of the OER material.
descriptionType: StringTitle: Material DescriptionRead only: trueThe description of the OER material.
providerType: StringTitle: Material ProviderRead only: trueThe name of the OER materials provider.
languageType: StringTitle: Material LanguageRead only: trueThe language of the OER material in ISO 639-1 code.
wikipediaType: ArrayTitle: Material Wikipedia ConceptsRead only: trueAn array of objects, each representing the most relevant wikipedia concept of the material.
wikipedia object properties
conceptType: StringTitle: Wikipedia ConceptRead only: trueThe Wikipedia concept represented as an URL.
supportType: IntegerTitle: Wikipedia Concept SupportRead only: trueThe amount of elements in the material that support the given Wikipedia concept.
typeType: StringTitle: Material TypeRead only: trueThe type of the OER material.
Get a list of relevant open educational bundles (web pages)
GET/recommend/oer_bundles

Get a list of relevant open educational bundles (web pages).

Query string parameters
urlType: StringTitle: website URLOptional: falseThe URL of the website containing the OER materials. The URL must be present in the X5GON database
pageType: IntegerTitle: PageOptional: trueThe page number of the recommended list.Default value is 1.
Response body attributes
rec_bundlesType: ArrayTitle: Recommended BundlesRead only: trueAn array of objects, each representing an recommended open educational resource bundle.
rec_bundles object properties
weightType: FloatTitle: Recommendation WeightRead only: trueThe number of common concepts between the given url bundle and this OER bundle. Greater weight means bigger relevance.
urlType: StringTitle: Bundle URLRead only: trueThe URL of the OER bundle.
titleType: StringTitle: Bundle TitleRead only: trueThe title of the OER bundle.
descriptionType: StringTitle: Bundle DescriptionRead only: trueThe description of the OER bundle.
providerType: StringTitle: Bundle ProviderRead only: trueThe name of the OER bundle provider.
languageType: StringTitle: Bundle LanguageRead only: trueThe dominant language of the OER bundle in ISO 639-1 code.
wikipediaType: ArrayTitle: Bundle Wikipedia ConceptsRead only: trueAn array of objects, each representing the most relevant wikipedia concept of the bundle.
wikipedia object properties
conceptType: StringTitle: Wikipedia ConceptRead only: trueThe Wikipedia concept represented as an URL.
supportType: IntegerTitle: Wikipedia Concept SupportRead only: trueThe amount of elements in the material that support the given Wikipedia concept.
typeType: StringTitle: Bundle TypeRead only: trueThe dominant type of the OER bundle.
Get a list of personalized open educational bundles recommendations
GET/recommend/collaborative_filtering

Get a list of personalized open educational bundles recommendations. The personalization is performed via thecollaborative filteringmethod.

Query string parameters
pageType: IntegerTitle: PageOptional: trueThe page number of the recommended list.Default value is 1.
Response body attributes
rec_bundlesType: ArrayTitle: Personalized BundlesRead only: trueAn array of objects, each representing an recommended open educational resource bundle.
rec_bundles object properties
weightType: FloatTitle: Recommendation WeightRead only: trueThe number of times the bundle was viewed by similar users. Greater weight means bigger relevance.
urlType: StringTitle: Bundle URLRead only: trueThe URL of the OER bundle.
titleType: StringTitle: Bundle TitleRead only: trueThe title of the OER bundle.
descriptionType: StringTitle: Bundle DescriptionRead only: trueThe description of the OER bundle.
providerType: StringTitle: Bundle ProviderRead only: trueThe name of the OER bundle provider.
languageType: StringTitle: Bundle LanguageRead only: trueThe dominant language of the OER bundle in ISO 639-1 code.
wikipediaType: ArrayTitle: Bundle Wikipedia ConceptsRead only: trueAn array of objects, each representing the most relevant wikipedia concept of the bundle.
wikipedia object properties
conceptType: StringTitle: Wikipedia ConceptRead only: trueThe Wikipedia concept represented as an URL.
supportType: IntegerTitle: Wikipedia Concept SupportRead only: trueThe amount of elements in the material that support the given Wikipedia concept.
typeType: StringTitle: Bundle TypeRead only: trueThe dominant type of the OER bundle.
Query REST API

This section contains the API routes for retrieving resources based on the query parameters. It contains different examples of resource retrieval based on the provided query parameters.NOTE: Some of the API routes are private and are available only to those who have special credentials.

Query REST API: Open Educational Resources

The Open Educational Resources REST API allows the user to retrieve OER materials.

Available methods
GET/oer_materialsGet a list of open educational resources
POST/oer_materialsUpload a list of open educational resources
GET/oer_materials/{material_id}Get information of a specific open educational resource
GET/oer_materials/{material_id}/contentsGet a list of content of a specific open educational resource
GET/oer_materials/{material_id}/contents/{content_id}Get information of a specific content of a specific open educational resource
GET/oer_materials/{material_id}/contents/{content_id}/valueGet the body value of a specific content of a specific open educational resource
Get a list of open educational resources
GET/oer_materials

Get a list of open educational resources.

Query string parameters
languagesType: ArrayTitle: LanguagesOptional: trueA comma-separated list of languages in ISO 639-1 code.
limitType: IntegerTitle: LimitOptional: trueThe number of records to return.Default value is 20.
offsetType: IntegerTitle: OffsetOptional: trueThe number of records from a collection to skip. Iterating over large collections with this parameter can be slow.Default value is 0.
pageType: IntegerTitle: PageOptional: trueThe page number of the record collection. It overrides the offset parameter.
Response body attributes
oer_materialsType: ArrayTitle: OER MaterialsRead only: trueAn array of objects, each representing an open educational resource.
oer_materials object properties
material_idType: IntegerTitle: Material IDRead only: trueThe unique ID of the OER material.
titleType: StringTitle: Material TitleRead only: trueThe title of the OER material.
descriptionType: StringTitle: Material DescriptionRead only: trueThe description of the OER material.
urlType: StringTitle: Material URLRead only: trueThe URL of the OER material.
languageType: StringTitle: Material LanguageRead only: trueThe language of the OER material in ISO 639-1 code.
typeType: StringTitle: Material TypeRead only: trueThe type of the OER material.
mimetypeType: StringTitle: Material MimetypeRead only: trueThe mimetype of the OER material.
content_idsType: ArrayTitle: Material Content IDsRead only: trueThe IDs of the material contents. Can be accessed throughcontent info method.
providerType: JSONTitle: Material ProviderRead only: trueThe JSON object containing the provider's name and domain.
Upload a list of open educational resources
POST/oer_materials

Uploads a list of open educational resources.

Request body parameters
api_keyType: StringTitle: API KeyOptional: falseThe API key used to submit the OER materials.NOTE: to obtain an API key, please contact the project administrator.
oer_materialsType: ArrayTitle: OER MaterialsOptional: falseAn array of objects, each representing an open educational resource.
oer_materials object properties
titleType: StringTitle: Material TitleOptional: falseThe title of the OER material.
descriptionType: StringTitle: Material DescriptionOptional: trueThe description of the OER material.
provider_uriType: StringTitle: Provider URIOptional: falseThe URL of the webpage on which the material is located.
material_urlType: StringTitle: Material URLOptional: falseThe URL of the OER material.
languageType: StringTitle: Material LanguageOptional: falseThe language of the OER material in ISO 639-1 code.
typeType: StringTitle: Material TypeOptional: falseAn object containing the type information of an open educational resource.
type object properties
extType: StringTitle: Material ExtensionOptional: falseThe extension of the material (i.e. .pdf, .mov, etc).
mimeType: StringTitle: Material MimetypeOptional: falseThe mimetype of the material.
date_createdType: DatetimeTitle: Material Creation DateOptional: trueThe date of the materials creation.Format is YYYY-MM-DD.
provider_tokenType: StringTitle: Material Provider TokenOptional: falseThe token of the material provider. Token must be first created via theregistration form.
licenseType: StringTitle: Material LicenseOptional: falseThe material license. Since we are dealing with OER materials, the license should be CC-BY.
Response body attributes
num_submittedType: IntegerTitle: Number of Materials SubmittedRead only: trueNumber of successfully submitted materials.
errorsType: ObjectTitle: Submission ErrorsRead only: trueThe object containing submission error information.NOTE: only present if there are any errors.
errors object properties
messageType: StringTitle: Error MessageRead only: trueThe submission error message.
invalid_countType: IntegerTitle: Invalid CountRead only: trueNumber of invalid materials.
invalid_materialsType: ArrayTitle: Invalid MaterialsRead only: trueAn array of not valid material objects format.
invalid_materials object properties
materialType: ObjectTitle: OER MaterialRead only: trueThe OER material object with a not valid format.
errorsType: ArrayTitle: Material ErrorsRead only: trueAn array of errors telling why is the material object not valid.
Get information of a specific open educational resource
GET/oer_materials/{material_id}

Get information of a specific open educational resource.

Path parameters
material_idThe unique ID of the open educational resource.
Response body attributes
material_idType: IntegerTitle: Material IDRead only: trueThe unique ID of the OER material.
titleType: StringTitle: Material TitleRead only: trueThe title of the OER material.
descriptionType: StringTitle: Material DescriptionRead only: trueThe description of the OER material.
urlType: StringTitle: Material URLRead only: trueThe URL of the OER material.
languageType: StringTitle: Material LanguageRead only: trueThe language of the OER material in ISO 639-1 code.
typeType: StringTitle: Material TypeRead only: trueThe type of the OER material.
mimetypeType: StringTitle: Material MimetypeRead only: trueThe mimetype of the OER material.
content_idsType: ArrayTitle: Material Content IDsRead only: trueThe IDs of the material contents. Can be accessed throughcontent info method.
providerType: JSONTitle: Material ProviderRead only: trueget-list-of-oer-contents The JSON object containing the provider's name and domain.
Get a list of content of a specific open educational resource
GET/oer_materials/{material_id}/contents

Get a list of content of a specific open educational resource.

Path parameters
material_idThe unique ID of the open educational resource.
Response body attributes
oer_materialsType: JSONTitle: OER MaterialsRead only: trueThe JSON object of the OER material with ID equal tomaterial_id (path parameter).
oer_materials object properties
material_idType: IntegerTitle: Material IDRead only: trueThe unique ID of the OER material.
oer_contentsType: ArrayTitle: OER Material ContentsRead only: trueAn array of objects, each representing a content of the open educational resource.
oer_contents object properties
content_idType: IntegerTitle: Content IDRead only: trueThe unique ID of the content of OER material.
typeType: StringTitle: Content TypeRead only: trueThe type of content. Possible types: text_extraction, transcription, or translation.
extensionType: StringTitle: Content ExtensionRead only: trueThe extension of content. Possible types: plain, or dfxp.
valueType: JSONTitle: Content ValueRead only: trueThe value of the content. Dependant of the content type and extension.
languageType: StringTitle: Content LanguageRead only: trueThe language of the OER material in ISO 639-1 code.
Get information of a specific content of a specific open educational resource
GET/oer_materials/{material_id}/contents/{content_id}

Get information of a specific content of a specific open educational resource.

Path parameters
material_idThe unique ID of the open educational resource.
content_idThe unique ID of the OER content.
Response body attributes
content_idType: IntegerTitle: Content IDRead only: trueThe unique ID of the content of OER material.
typeType: StringTitle: Content TypeRead only: trueThe type of content. Possible types: text_extraction, transcription, or translation.
extensionType: StringTitle: Content ExtensionRead only: trueThe extension of content. Possible types: plain, or dfxp.
valueType: JSONTitle: Content ValueRead only: trueThe value of the content. Dependant of the content type and extension.
languageType: StringTitle: Content LanguageRead only: trueThe language of the OER material in ISO 639-1 code.
Get the body value of a specific content of a specific open educational resource
GET/oer_materials/{material_id}/contents/{content_id}/value

Get the body value of a specific content of a specific open educational resource.

Path parameters
material_idThe unique ID of the open educational resource.
content_idThe unique ID of the OER content.
Response value
content bodyType: StringThe body value of the content of a specific open educational resource.