POST /api/v1/externalContents/groups/{groupId}/externalPlatforms/{externalPlatform}/courses/stats
Update learner statistics for external content from an external platform, imported in a given group.
Request Body
Type: application/json
Property | Type | Mandatory | Description |
---|---|---|---|
statistics | array of externalCourseStats objects | Yes | The list of externalCoursesStats to be imported (max. 20 externalCourseStats objects) |
externalCourseStats object
Property | Type | Mandatory | Description |
---|---|---|---|
externalId | string | Yes | ID of the external course to which an attempt (statistics) will be created, as identified by the external provider |
mail | string | Yes | Email of the 360 Learner to whom an attempt (statistics) will be recorded for the given external course. |
progress | integer | No | Learner’s progress percentage, expressed as an integer (0-100). When progress is set to 100 and completedAt is not provided, then completedAt will be set to the value for lastActivity . |
score | integer | No | Score (0-100) the learner obtained for the given external course |
result | enum | No | The overall learner's course achievement: failed or success |
globalTime | integer | No | The total time in milliseconds the learner spent playing this external course. |
completedAt | datetime as a string | No | Date when the learner has completed the external course, expressed in ISO 8601 format — example: 2022-05-16T22:00:00.000Z . When completedAt is provided, progress will automatically be set to 100. |
firstActivity | datetime as a string | No | Date when the learner has started the external course, expressed in ISO 8601 format — example: 2022-05-16T22:00:00.000Z . |
lastActivity | datetime as a string | No | Date when the learner has last played the external course, expressed in ISO 8601 format — example: 2022-05-16T22:00:00.000Z . |
Returns
Returns the status for each externalCourseStats
imported and a global status report:
statisticsUpdated
: Total number ofexternalCourseStats
updatedimportErrors
: Total number ofexternalCourseStats
that could not be importedexternalCoursesStatsStatus
: An array ofexternalCoursesStatsStatus
objects
externalCourseStatsStatus object
Name | Type | Mandatory | Description |
---|---|---|---|
mail | string | Yes | Email of the 360 Learner to whom an attempt (statistics) will be recorded for the given external course. |
externalId | string | Yes | externalId of the externalCourse that was processed for import |
status | number | Yes | HTTP status code for the import of the externalCourseStats : - 200 : externalCourseStats updated successfully - 404 : externalCourseStats import fails because the externalId is not found - 400 : externalCourseStats import fails |
message | string | Yes | Description of the HTTP status code |
Servers
- https://app.360learning.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
externalPlatform |
String | Yes |
Name of the external platform to which the external content is attached |
groupId |
String | Yes |
ID of the group where external contents are imported |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Query parameters
Name | Type | Required | Description |
---|---|---|---|
company |
String | No |
(Optional) Include the company ID to authenticate calls via the API key as query parameter. For more information on the authentication methods supported by our API, see Authentication Methods. |
apiKey |
String | No |
(Optional) Include the API key to authenticate calls via the API key as query parameter. For more information on the authentication methods supported by our API, see Authentication Methods. |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
statistics[] |
Array | No | |
statistics[].externalId |
String | No | |
statistics[].mail |
String | No |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.