Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
207 changes: 201 additions & 6 deletions bazaar/interface.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,207 @@

Bazaar Interfaces
*****************
Edustore Distributed API
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the term Bazaar here as it is defined elsewhere to describe the service which handles material transfer, commerce and licensing. Also "Edustore" is product name of one company.

=========================

LMS
===
draft v0.1

.. contents::

CMS
===

Signing and Authentication
==========================

There are two supported methods:

1. Header HMAC256 AUTH token in headers and JSON body (Similar: http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be written here how the token is calculated and where it is acquired. Example how the call is made with curl from CLI would be nice. What does "and JSON body" means?

2. GET/POST request with params=<json>&authentication=<client_id:hash>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More than one line description of the usage of parameters would be nice. This is now more than confusing to the reader what this means. When is GET and POST used? Explanation what is "params" and "authentication". What does "client_id:hash" mean? Is it one value or two? Should it be "<client_id>:"?


1 Adding material
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In already defined terms this is the Bazaar CMS Interface?

==============================


1.1 Searching and adding material to the LMS
--------------------------------------------

Learning material can be added with three use methods:

1. User open Edustore repository directly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where this is and how it is implemented related to this API? How this can be implemented from this description. Be more specific.

2. | User select materials from the Edustore repository to the LMS by using:
| - Drag and Drop
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The term "drag and drop" is not defined anywhere in this document. What does it mean, where it is used and who is using it? I assume it means in the web page and by the end user, and that they are dragging a link on top of some element in some page somewhere. This needs more info how that should be implemented. Also, "Window to window" is not clear what it means related to "drag and drop".

| - Window to window
| NOTE: These material selection methods cannot be used from mobile devices (Windows Phone, iOS, Android).
3. User selects material from integrated embedded Edustore JS module, which can be included to any LMS. This method uses drag and drop.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where can I obtain this JS module? Is is part of this API specification? Or are there reference implementation somewhere which can be used to build the production version? Should this be part of the API specification as it sounds like it is implementation specific to services which are implementing this API.



API workflow for selecting material from Edustore directly:

1. LMS makes a JSON POST request to the Edustore with params from table 1, using header-based auth.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be specification of the data structure how these parameters are delivered. I can assume from the information in this document that it is a JSON dict which is put to the URL in "?params=" but should the JSON be encoded somehow? Which encoding is used in the content, I assume UTF-8 but cannot be sure, and I assume urlencoding is used but cannot be sure.

2. Edustore replies with unique URL and LMS forwards user to the unique url.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specification of the reply is missing. I assume it comes in the body of the response, but how it is encoded? I assume UTF-8 again, but is it inside JSON document like the request was?

3. User selects learning material from the Edustore and Edustore forwards user back to the add_resource_callback_url, with resource details(ie. name, description).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, missing specification of the request and response data and encoding.


Params table 1:

========================== ================================================ ======= =========
Param Description Type Required
========================== ================================================ ======= =========
first_name First name of user. alpha required
last_name Last name of user. alpha required
email Email of user. email optional
user_id User id from alpha required
context_id Course or page identifier. Must be unique. alpha required
context_title Course or page title alpha required
role Role (enum student, teacher, admin) alpha required
school Name of the school alpha required
school_id School's identifier in the national level. alpha required
city City's name alpha required
city_id City's unique identifier in the national level alpha required
oid User oid alpha optional
add_resource_callback_url LMS callback URL, for adding material to the LMS url optional
cancel_url Forwarding user back to LMS url optional
========================== ================================================ ======= =========


1.1 Material drag and drop
--------------------------

LMS should implement drop functionality directly and parse links with "edustore.fi/<base64 encoded json>.
Base64 encoded JSON has basic information about the resource: name, description and uid.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing information about the JSON document structure and encoding. I can again assume it is a dict, keys and values are UTF-8 and the fields are always the same and only these three: name, description and uid. But what does them mean? What is name? How long can it be? Same for description? Can it be unlimited in length? What is uid and is it integer. If it is integer can it be negative? Or is it a string? And how long can it be?



2 Viewing material
===================

Use case:
Person wants to view selected material/resource.

API workflow:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments apply here as above.


1. LMS makes a JSON POST request to the Edustore with params from table 2, using header-based auth.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It says here that only header-based auth is supported, but at the top of the document two auth methods are introduced.

2. Edustore replies with unique url and LMS forwards user to the unique url.
3. User is forwarded to the resource(if resource is internal pdf, videos, epub, scorms) or forwarded to the publisher system. Publisher should implement 2.2 part of the specs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "internal" here means and how this should be implemented?



Edustore integrated player?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this integrated player defined and implemented? Is it part of this API specification? Should it be?


1. Resource is located at the Edustore server(pdf, epub, scorm) -> resource is shown using integrated player
2. Resource is located at publishers server step 2.2 -> user is forwarded to the publishers server

2.1 LMS to Edustore
--------------------

Workflow:

1. LMS makes a JSON POST request to the Edustore with params from table 2, using header-base authentication.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments as above. Actually those JSON document structures and encoding information should be places in the beginning of the document and then just refer to them here.

2. Edustore replies with unique url and LMS forwards user to the unique url.
3. Edustore displays or forwards user to the selected material.

Edustore does all the license and logging functionality.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is specific to the implementation you guys have, not what might be in some other service implementing this API. This kind of language should be in the Bazaar general explanation page, not in this document.


Params table 2:

========================== ================================================ ======= =========
Param Description Type Required
========================== ================================================ ======= =========
first_name First name of user. required
last_name Last name of user. required
email Email of user. optional
user_id User id from required
context_id Course or page identifier. Must be unique. required
context_title Course or page title required
role Role (enum student, teacher, admin) required
school Name of the school required
school_id School's identifier in the national level. required
city City's name required
city_id City's unique identifier in the national level required
oid User oid optional
resource_uid Resource Edustore UID
return_url Forwarding user back to the LMS optional
========================== ================================================ ======= =========


2.2 Edustore to CMS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already defined term for this is the Bazaar CMS Interface.

-------------------

Edustore forwards user to the publisher CMS system after authentication and license checking is done.

Use case:
Forwarding user from Edustore to the CMS.

API workflow:
1. Edustore generates json payload with params from table 3, using GET/POST authentication.
2. Edustore forwards user to the publisher viewing API with

Params table 3: CMS Viewing API parameters

========================== ================================================================================== ======= ========
Param Description Type Required
========================== ================================================================================== ======= ========
first_name First name of user.
last_name Last name of user
email Email of user.
user_id Edustore user id
context_id Edustore unique context id
context_title Course or page title.
role Role (enum student, teacher, admin)
school Name of the school
school_id School's identifier in the national level.
city City's name
city_id City's unique identifier at the national level
oid OID https://confluence.csc.fi/download/attachments/8127300/Oppijanumero+ja+OID.pdf
resource_uid Edustore resource uid
publisher_material_id Edustore publisher unique identifier
resource_url Edustore resource url
demo_mode demo mode (0, 1)
preview preview mode(0, 1)
return_url url for forwarding user back to LMS
token_date When the token was generated. Datetime in GMT time. Datetime format is ISO 8601.
========================== ================================================================================== ======= ========




3 Central Learning Record Store
================================

3.1 xAPI
--------



@TODO




3 Edustore CMS API
==================

@TODO

4 Logging API
=============

@TODO


5 License API
=============

@TODO


Glossary of Terms
=================

@TODO

API = Application Programming Interface

URL = Uniform Resource Identifier

LMS = Learning Management System

CMS = Content Management System

JSON = JavaScript Object Notation

JS = JavaScript