v1

latestOpenAPI 3.1.02026-08-04164270844.7 KB
Courses

List all courses statistics

🔑

Required OAuth scope: courseStats:read.

📖

This endpoint is paginated with a page size of 500 courses attempts statistics. For more information, see the Pagination guide.

Lists all courses statistics in your platform.

get/api/v2/courses/stats

Query parameters

ltstring date-time

Filter on dates lower than the given one

gtestring date-time

Filter on dates greater than or equal the given one

Filter on completedAt property with LHS bracket notation.

Expected value format is a date (YYYY-MM-DDThh:mm:ss.sssZ). The milliseconds are always set to 0.

{
  "lt": "2020-01-01T10:30:26.000Z",
  "gte": "2020-01-01T10:30:26.000Z"
}
eqstring ObjectId

Filter on values equal to the given one

nestring ObjectId

Filter on values not equal to the given one

instring[]

Filter on values including the given ones

ninstring[]

Filter on values excluding the given ones

Filter on courseId property with LHS bracket notation.

Expected value format is a valid ID (24 digits or letters).

{
  "eq": "507f1f77bcf86cd799439011",
  "ne": "507f1f77bcf86cd799439011",
  "in": [
    "507f1f77bcf86cd799439011"
  ],
  "nin": [
    "507f1f77bcf86cd799439011"
  ]
}
eqstring ObjectId

Filter on values equal to the given one

nestring ObjectId

Filter on values not equal to the given one

instring[]

Filter on values including the given ones

ninstring[]

Filter on values excluding the given ones

Filter on userId property with LHS bracket notation.

Expected value format is a valid ID (24 digits or letters).

{
  "eq": "507f1f77bcf86cd799439011",
  "ne": "507f1f77bcf86cd799439011",
  "in": [
    "507f1f77bcf86cd799439011"
  ],
  "nin": [
    "507f1f77bcf86cd799439011"
  ]
}

Headers

360-api-version'v2.0' required

The version of the API.

Response

Returns one page of 500 courses attempts statistics.

_idstring ObjectId required

The unique ID of the attempt.

versionNumberinteger

The version number of the course the learner attempted.

lang'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'fi' | 'fr' | 'hr' | 'ht_HT' | 'hu' | 'id' | 'it' | 'ja' | 'kar_MM' | 'ko' | 'lt' | 'mh_MH' | 'nl' | 'nl_BE' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'rw_RW' | 'sk' | 'sl' | 'so_SO' | 'sv' | 'sw_KE' | 'th' | 'ti_ET' | 'tr' | 'uk' | 'zh' | 'am_ET' | 'bn' | 'bs' | 'ca' | 'cy' | 'en_CA' | 'en_GB' | 'es_AR' | 'es_MX' | 'et' | 'fr_CA' | 'gu' | 'he_IL' | 'hy' | 'kk' | 'km' | 'lo' | 'lv' | 'mi' | 'mn_MN' | 'mr' | 'ms' | 'my_MM' | 'nn_NO' | 'or' | 'pa' | 'pt_BR' | 'pt_MZ' | 'rn_BI' | 'si' | 'ta' | 'te' | 'tl_PH' | 'ur' | 'uz' | 'yo_NG' | 'zh_tw' | 'el' | 'hi' | 'sr' | 'ar' | 'vi' | 'zh_HANT' required

The language of the course the learner attempted.

firstActivityAtstring date-time

The date and time of the first activity of the user on the course attempt, in the YYYY-MM-DDThh:mm:ss.sssZ format (ISO 8601 in Coordinated Universal Time (UTC)).

lastActivityAtstring date-time

The date and time of the last activity of the user on the course attempt, in the YYYY-MM-DDThh:mm:ss.sssZ format (ISO 8601 in Coordinated Universal Time (UTC)).

timeSpentnumber required

The time spent by the user in the course attempt in milliseconds.

progressinteger required

The completion rate of the user as a percentage.

scoreinteger

The score obtained by the user as a percentage.

completedAtstring date-time

The date and time when the attempt was completed, in the YYYY-MM-DDThh:mm:ss.sssZ format (ISO 8601 in Coordinated Universal Time (UTC)).

pathIdstring ObjectId

The unique ID of the path if the course is played in the path context.

pathSessionIdstring ObjectId

The unique ID of the path session if the course is played in the path context.

courseIdstring ObjectId required

The unique ID of the course.

userIdstring ObjectId required

The unique ID of the user having performed this attempt.

Example response

[
  {
    "_id": "507f1f77bcf86cd799439011",
    "pathId": "507f1f77bcf86cd799439011",
    "pathSessionId": "507f1f77bcf86cd799439011",
    "courseId": "507f1f77bcf86cd799439011",
    "userId": "507f1f77bcf86cd799439011"
  }
]