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

PropertyTypeMandatoryDescription
statisticsarray of externalCourseStats objectsYesThe list of externalCoursesStats to be imported (max. 20 externalCourseStats objects)
externalCourseStats object
PropertyTypeMandatoryDescription
externalIdstringYesID of the external course to which an attempt (statistics) will be created, as identified by the external provider
mailstringYesEmail of the 360 Learner to whom an attempt (statistics) will be recorded for the given external course.
progressintegerNoLearner’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.
scoreintegerNoScore (0-100) the learner obtained for the given external course
resultenumNoThe overall learner's course achievement: failed or success
globalTimeintegerNoThe total time in milliseconds the learner spent playing this external course.
completedAtdatetime as a stringNoDate 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.
firstActivitydatetime as a stringNoDate when the learner has started the external course, expressed in ISO 8601 format — example: 2022-05-16T22:00:00.000Z.
lastActivitydatetime as a stringNoDate 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:

externalCourseStatsStatus object
NameTypeMandatoryDescription
mailstringYesEmail of the 360 Learner to whom an attempt (statistics) will be recorded for the given external course.
externalIdstringYesexternalId of the externalCourse that was processed for import
statusnumberYesHTTP 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
messagestringYesDescription of the HTTP status code

Servers

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

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.