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
version | Type: String | Title: Library Version | Optional: false | The 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
text | Type: String | Title: Query Text | Optional: true | The query text. Longer text provides better results. If both text and url query parameters are present, url has the priority. |
url | Type: String | Title: Query URL | Optional: true | The query URL. The URL must be associated with a material stored in the X5GON database. If no such URL is found, it uses the text{" "} query parameter, if present. |
width | Type: String | Title: Container Width | Optional: true | The embedded containers width. Used to setup the
container into HTML.
Default value is 280px. |
height | Type: String | Title: Container Height | Optional: true | The 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 the iframe
tag. We only use the text query parameter for the recommendations, and both width and height 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, Version 2
All URLs referenced in the REST API Version 2 section have the following base:
https://platform.x5gon.org/api/v2
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 | /search | Get a list of relevant open educational resources |
Search for relevant materials
GET | /search |
Get a list of relevant open educational resources.
Query string parameters
text | Type: String | Title: Query Text | Optional: false | The seed text from which the system finds the relevant open educational resources. |
types | Type: String | Title: Material Types | Optional: true | The type of open educational resources. There are two
approaches of setting this value: (1) set the type group. Options: all, video, audio, text, and image. Note: When all, it will retrieve only video, audio and text materials. When the type is image, we use the Creative Commons Search API to retrieve the images. (2) provide a string of file extensions separated by a comma (example: pdf,doc,docx,mp4 ).
Default value is all. |
licenses | Type: String | Title: Material Licenses | Optional: true | Filters the open educational resources based on the
provided licenses. One can provide multiple Licenses
separated by a comma (example: by,by-nd
). If parameter is cc returns materials
that have the license present. If Null, no filtering
is performed. Options: cc, by, by-nc, by-sa, by-nd,
by-nc-nd, by-nc-sa. Default value is Null. |
languages | Type: String | Title: Material Languages | Optional: true | The language of the open educational resources. This
parameter is a string of ISO 639-1 code languages
separated by a comma (example: sl,es,de
). If Null, no filtering is performed.
Default value is Null. |
content_languages | Type: String | Title: Material Content Languages | Optional: true | The content languages of the open educational
resources. This parameter filters out resources that
have content (i.e. transcriptions, translations)
available in the provided content languages. It is a
string of ISO 639-1 code languages separated by a
comma (example: sl,es,de ). If Null, no
filtering by content languages is performed.
Default value is Null. |
content_extension | Type: String | Title: Material Content Extension | Optional: true | The content extension of the open educational resources.
If this parameter is present, it will retrieve only
resources which contain the contents with the user
specified extensions. In addition, the contents of that type
will be in the result object under the contents
attribute.
Possible options: dfxp, webvtt, plain.
Default value is Null. |
provider_ids | Type: String | Title: Material Provider IDs | Optional: true | The list of material provider IDs. This parameter
filters out resources that are associated with the OER
providers associated. (example: 1,10 ). If
Null, no filtering by providers is done.
Default value is Null. |
wikipedia | Type: Boolean | Title: Material Wikipedia | Optional: true | If True, provides the list of Wikipedia concepts
associated with the resource.
Default value is False. |
wikipedia_limit | Type: Integer | Title: Wikipedia List Length | Optional: true | The number of top Wikipedia concepts returned if the
wikipedia parameter is present. If Null,
returns all Wikipedia concepts.
Default value is Null. |
sort_by | Type: String | Title: Sort By Field | Optional: true | Sorts by the provided material field in descending order.
Possible options are: creation_date and
retrieved_date .
Default value is Null. |
limit | Type: Integer | Title: Page Limit | Optional: true | The number of open eduational resources to return. If
the value is zero or bellow, it automatically returns
the default number of resources. If value is greater
than 100 returns 100 resources.
Default value is 20. |
page | Type: Integer | Title: Page | Optional: true | The page number of the recommended list.
Default value is 1. |
Response body attributes
query | Type: JSON | Title: Query Parameters | Read only: true | A JSON object containing the provided query parameters. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rec_materials | Type: Array | Title: Recommended Materials | Read only: true | An array of objects, each representing an recommended open educational resource. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rec_materials object properties
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata | Type: JSON | Title: Result Metadata | Read only: true | A JSON object containing the associated metadata. Helpful for navigating through the recommendations. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata object properties
|
REST API, Version 1
All URLs referenced in the REST API Version 1 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 | /search | Get a list of relevant open educational resources |
GET | /recommend/oer_materials | Get a list of relevant open educational resources |
GET | /recommend/oer_bundles | Get a list of most relevant open educational bundles |
GET | /recommend/collaborative_filtering | Get 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
text | Type: String | Title: Query Text | Optional: false | The seed text from which the system finds the relevant open educational resources. |
types | Type: String | Title: Material Types | Optional: true | The type of open educational resources. There are two
approaches of setting this value: (1) set the type group. Options: all, video, audio and text. (2) provide a string of file extensions separated by a comma (example: pdf,doc,docx,mp4 ).
Default value is all. |
licenses | Type: String | Title: Material Licenses | Optional: true | Filters the open educational resources based on the
provided licenses. One can provide multiple Licenses
separated by a comma (example: by,by-nd
). If parameter is cc returns materials
that have the license present. If Null, no filtering
is performed. Options: cc, by, by-nc, by-sa, by-nd,
by-nc-nd, by-nc-sa. Default value is Null. |
languages | Type: String | Title: Material Languages | Optional: true | The language of the open educational resources. This
parameter is a string of ISO 639-1 code languages
separated by a comma (example: sl,es,de
). If Null, no filtering is performed.
Default value is Null. |
content_languages | Type: String | Title: Material Content Languages | Optional: true | The content languages of the open educational
resources. This parameter filters out resources that
have content (i.e. transcriptions, translations)
available in the provided content languages. It is a
string of ISO 639-1 code languages separated by a
comma (example: sl,es,de ). If Null, no
filtering by content languages is performed.
Default value is Null. |
provider_ids | Type: String | Title: Material Provider IDs | Optional: true | The list of material provider IDs. This parameter
filters out resources that are associated with the OER
providers associated. (example: 1,10 ). If
Null, no filtering by providers is done.
Default value is Null. |
wikipedia | Type: Boolean | Title: Material Wikipedia | Optional: true | If True, provides the list of Wikipedia concepts
associated with the resource.
Default value is False. |
wikipedia_limit | Type: Integer | Title: Wikipedia List Length | Optional: true | The number of top Wikipedia concepts returned if the{" "}
wikipedia parameter is present. If Null,
returns all Wikipedia concepts.
Default value is Null. |
limit | Type: Integer | Title: Page Limit | Optional: true | The number of open eduational resources to return. If
the value is zero or bellow, it automatically returns
the default number of resources. If value is greater
than 100 returns 100 resources.
Default value is 20. |
page | Type: Integer | Title: Page | Optional: true | The page number of the recommended list.
Default value is 1. |
Response body attributes
query | Type: JSON | Title: Query Parameters | Read only: true | A JSON object containing the provided query parameters. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
query object properties
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rec_materials | Type: Array | Title: Recommended Materials | Read only: true | An array of objects, each representing an recommended open educational resource. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rec_materials object properties
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata | Type: JSON | Title: Result Metadata | Read only: true | A JSON object containing the associated metadata. Helpful for navigating through the recommendations. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata object properties
|
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
text | Type: String | Title: Query Text | Optional: false | The seed text from which the system finds the relevant open educational resources. |
type | Type: String | Title: Material Type | Optional: true | The type of open educational resources. Possible options: all, video, audio and text. Default value is all. |
page | Type: Integer | Title: Page | Optional: true | The page number of the recommended list. Default value is 1. |
Response body attributes
rec_materials | Type: Array | Title: Recommended Materials | Read only: true | An array of objects, each representing an recommended open educational resource. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rec_materials object properties
|
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
url | Type: String | Title: Website URL | Optional: false | The URL of the website containing the OER materials. The URL must be present in the X5GON database |
page | Type: Integer | Title: Page | Optional: true | The page number of the recommended list. Default value is 1. |
Response body attributes
rec_bundles | Type: Array | Title: Recommended Bundles | Read only: true | An array of objects, each representing an recommended open educational resource bundle. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rec_bundles object properties
|
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
page | Type: Integer | Title: Page | Optional: true | The page number of the recommended list. Default value is 1. |
Response body attributes
rec_bundles | Type: Array | Title: Personalized Bundles | Read only: true | An array of objects, each representing an recommended open educational resource bundle. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rec_bundles object properties
|
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_materials | Get a list of open educational resources |
POST | /oer_materials | Upload a list of open educational resources |
GET | /oer_materials/{material_id} | Get information of a specific open educational resource |
GET | /oer_materials/{material_id}/contents | Get 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}/value | Get 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
languages | Type: Array | Title: Languages | Optional: true | A comma-separated list of languages in ISO 639-1 code. |
limit | Type: Integer | Title: Limit | Optional: true | The number of records to return. Default value is 20. |
offset | Type: Integer | Title: Offset | Optional: true | The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. Default value is 0. |
page | Type: Integer | Title: Page | Optional: true | The page number of the record collection. It overrides the offset parameter. |
Response body attributes
oer_materials | Type: Array | Title: OER Materials | Read only: true | An array of objects, each representing an open educational resource. | ||||||||||||||||||||||||||||||||||||||||||||||||||
oer_materials object properties
|
Upload a list of open educational resources
POST | /oer_materials |
Uploads a list of open educational resources.
Request body parameters
api_key | Type: String | Title: API Key | Optional: false | The API key used to submit the OER materials. NOTE: to obtain an API key, please contact the project administrator. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
oer_materials | Type: Array | Title: OER Materials | Optional: false | An array of objects, each representing an open educational resource. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
oer_materials object properties
|
Response body attributes
num_submitted | Type: Integer | Title: Number of Materials Submitted | Read only: true | Number of successfully submitted materials. | ||||||||||||||||||||||||||||||||||||||||
errors | Type: Object | Title: Submission Errors | Read only: true | The object containing submission error information. NOTE: only present if there are any errors. | ||||||||||||||||||||||||||||||||||||||||
errors object properties
|
Get information of a specific open educational resource
GET | /oer_materials/{material_id} |
Get information of a specific open educational resource.
Path parameters
material_id | The unique ID of the open educational resource. |
Response body attributes
material_id | Type: Integer | Title: Material ID | Read only: true | The unique ID of the OER material. |
title | Type: String | Title: Material Title | Read only: true | The title of the OER material. |
description | Type: String | Title: Material Description | Read only: true | The description of the OER material. |
url | Type: String | Title: Material URL | Read only: true | The URL of the OER material. |
language | Type: String | Title: Material Language | Read only: true | The language of the OER material in ISO 639-1 code. |
type | Type: String | Title: Material Type | Read only: true | The type of the OER material. |
mimetype | Type: String | Title: Material Mimetype | Read only: true | The mimetype of the OER material. |
content_ids | Type: Array | Title: Material Content IDs | Read only: true | The IDs of the material contents. Can be accessed through content info method. |
provider | Type: JSON | Title: Material Provider | Read only: true | version-1-get-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_id | The unique ID of the open educational resource. |
Response body attributes
oer_materials | Type: JSON | Title: OER Materials | Read only: true | The JSON object of the OER material with ID equal to material_id (path parameter). | ||||||||||||||||||||||||||||||
oer_materials object properties
| ||||||||||||||||||||||||||||||||||
oer_contents | Type: Array | Title: OER Material Contents | Read only: true | An array of objects, each representing a content of the open educational resource. | ||||||||||||||||||||||||||||||
oer_contents object properties
|
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_id | The unique ID of the open educational resource. |
content_id | The unique ID of the OER content. |
Response body attributes
content_id | Type: Integer | Title: Content ID | Read only: true | The unique ID of the content of OER material. |
type | Type: String | Title: Content Type | Read only: true | The type of content. Possible types: text_extraction, transcription, or translation. |
extension | Type: String | Title: Content Extension | Read only: true | The extension of content. Possible types: plain, or dfxp. |
value | Type: JSON | Title: Content Value | Read only: true | The value of the content. Dependant of the content type and extension. |
language | Type: String | Title: Content Language | Read only: true | The 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_id | The unique ID of the open educational resource. |
content_id | The unique ID of the OER content. |
Response value
content body | Type: String | The body value of the content of a specific open educational resource. |