Skip to content
This repository was archived by the owner on Jun 11, 2021. It is now read-only.

API endpoints

Andrew Ang edited this page Jun 18, 2018 · 1 revision

Recommend activity

Recommends an activity from a collection

Endpoint definition

/activity/recommend

HTTP method

POST

Sample request body

{
    learner: <user_id>,
    collection: <collection_id>
    sequence: [ # List of already taken activities
        {
            activity: <source_launch_url>,
            score: <score>,
            is_problem: Bool,
        },
        ....
    ],
}

Sample response

{
    "source_launch_url”: <source_launch_url> # of chosen Activity
    “complete”: <bool> # indicates whether sequence complete
}

The following table describes each item in the response.

Response item Description
source_launch_url Activity url
complete Indicates whether sequence is complete

Error and status codes

The following table lists the status and error codes related to this request.

Status code Meaning
200 Successful response
400 Bad request -- one or more of the parameters was rejected.

Code example

TODO

Clone this wiki locally