Performance-based Suggestions

As with any other API, you require appropriate access_token to work with Suggest API. Refer to Authentication Flow for necessary detail.

Performance Based Suggestions API

Resources suggested to users based on the performance of user at current collection in study are termed as performance-based suggestions. These are highly curated content items that are related to the assessment taken by user.

API End Point

Method Type

Request Headers

AuthorizationToken {TOKEN}Replace the {TOKEN} with actual value of access_token obtained from authentication.

Path Variables

NameData TypeValueDescription
typeString'resource'Denotes type of suggestions to surface. This provides future extensibility around suggestions.

Request Params

NameData TypeDefaultDescription
limitInteger3Number of maximum suggestions to return. Value can be anything between 1..10.

Max limit is 10 suggestions.

Request Body

KeyData TypeValueDescription
context.context_typeString'collection-study'Indicates the type of user activity around which suggestions are to be made.
context.context_areaString'study-player'Indicates the application context of users' current activity.
context.collection_idUUIDID of collection being studied by userID of collection being studied by user around which suggestions will be made
context.user_idUUIDID of current userIdentifies the user in Gooru system
metrics.scoreNumberscore at current assessmentIndicates performance of user at the current assessment
metrics.timespentNumberamount of time spent in milliseconds at the current assessmentTime spent by user at the assessment

Sample Call

Curl -i -H "Authorization:Token MTQ3NDM1NDIzMDk1OTowMjE5MDkwYy1hYmU2LTRhMDktOGM5Zi0zNDM5MTFmNWNkODY6YmE5NTZhOTctYWUxNS0xMWU1LWEzMDItZjhhOTYzMDY1OTc" -XPOST ‘’ -d ‘{ "context":{ "context_type":"collection-study", "user_id":"3784de18-1361-4ef0-b0ae-5aca980cdfe3", "container_id":"4784de18-1361-4ef0-b0ae-5aca980cdfe3", "course_id":"5784de18-1361-4ef0-b0ae-5aca980cdfe3", "unit_id":"6784de18-1361-4ef0-b0ae-5aca980cdfe3", "lesson_id":"7784de18-1361-4ef0-b0ae-5aca980cdfe3" }, "metrics":{"score": 34, "timespent": 173848} }’

Response Structure

KeyData TypeValueDescription
executionTimeNumbertime spent in millisecondsIndicates time spent in surfacing suggestions.
suggestResultsJSON ArrayArray of resource objects.Each resource object is a JSON with the keys as:
title, contentFormat, contentSubFormat, description, url, curriculumInfo, etc. This is similar to Search response.
suggestedTypeString'resource'Indicates the type of suggestions responded with - for now it is 'resource'.

Sample Response

  "description":"Why do scientists use microscopes to study plant cells?", 
    "code":"CC0 1.0", 
    "name":"creative commons",
  "collectionTitles":["Quiz: Looking Inside Cells"],
    "subject":[ "Science" ], 
    "domain":[ "Cell Biology" ],
      "curriculumName":[ "CA" ], 
      "curriculumCode":[ "CA.SCI.7.LS.1b" ], 
        "title":"Students know the characteristics that distinguish plant cells from animal cells, including chloroplasts and cell walls.",
      "curriculumDesc":[ "Students know the characteristics that distinguish plant cells from animal cells, including chloroplasts and cell walls."] 
  "title":"Why do scientists use microscopes to study plant cells? ",