Learning_Experience_API__xAPI_
Learning_Experience_API__xAPI_
Oracle Learning
Disclaimer
This document in any form, software or printed matter, contains proprietary
information that is the exclusive property of Oracle. Your access to and use of
this confidential material is subject to the terms and conditions of your Oracle
software license and service agreement, which has been executed and with
which you agree to comply. This document and information contained herein
may not be disclosed, copied, reproduced or distributed to anyone outside
Oracle without prior written consent of Oracle. This document is not part of your
license agreement nor can it be incorporated into any contractual agreement
with Oracle or its subsidiaries or affiliates.
This document is for informational purposes only and is intended solely to assist
you in planning for the implementation and upgrade of the product features
described. It is not a commitment to deliver any material, code, or functionality,
and should not be relied upon in making purchasing decisions. The
development, release, and timing of any features or functionality described in
this document remains at the sole discretion of Oracle. Due to the nature of the
product architecture, it may not be possible to safely include all features
described in this document without risking significant destabilization of the code.
The revenue recognition disclaimer on this page is required for any business
brief that addresses future functionality or for products that are not yet generally
available (GA). If you are unsure whether your statement of direction needs the
disclaimer, read the revenue recognition policy. If you have further questions
about your content and the disclaimer requirements, e-mail
[email protected]. If you do not need the disclaimer, you may delete it
and the page that it appears. First, display hidden characters by clicking on the
Paragraph icon on the Home toolbar. It is a small, square icon that appears to the
left of the Quick Style Gallery. Then, highlight all the text on this page and press
the Delete key. Notice that there is a section break displayed as a double-dotted
line at the bottom of this page. Continue to press Delete until the page
disappears and your cursor is on the Table of Contents page. Be sure not to
remove the section break, or the formatting of the title page will be incorrect.
Delete this note before publishing.
The testing disclaimer in the TM block on the last page (highlighted in yellow) is
provided by the FCC for hardware products. It must appear in the TM block.
Purpose statement 2
Disclaimer 2
Document Control 5
Introduction 6
Key points 6
API Details 6
User Setup 6
Sample POST Request 6
Anatomy of an xAPI statement 9
1.Actors 11
2.Verbs 13
3. Object 14
4. Result 16
5. Version 17
6. Timestamp 17
7. Id 17
Validations 17
Sample Payloads 20
Sample 1- verbs that mark a learner in progress 20
Sample 2 - statement to mark learner completed 20
Sample 3- statement to mark learner exempted 21
Manual Processing of statements 22
FAQ’s 23
Helpful Resources 23
When you POST a statement with all above details in an acceptable format described further in this document, Oracle
will immediately process the statement learner enrolment updates will be reflected near real time.
Key points
API Details
DETAIL VALUE
User Setup
The user who is authenticating the API should have the functional security privilege
WLF_REST_SERVICE_ACCESS_LEARNING_XAPI_PRIV. Users with this privilege will be able to POST statements for
any learner so we recommend to exercise caution while assigning this privilege.
Starting release 25A, you can enable learners to POST their own progress or completions for URL-based learning by
explicitly assign the privilege WLF_POST_PROGRESSION_FOR_SELF_USING_XAPI.
Note - For real time processing, include only a single statement in each request. Request with multiple statements will
not be processed automatically and will need to be handled manually by scheduling an ESS job.
80c1-ef682037c7f2",
"version": "1.0.0",
"object": {
"definition": {
"name": {
"en": "Leading in the Age of
Generative AI"
},
"type":
"https://w3id.org/xapi/video
/activity-type/course"
},
"id":
"https://xapi.provider.com/x
api/course/OID_COURSE_00
402123",
"objectType": "Activity"
},
"timestamp": "2024-03-
21T06:09:57.290Z"
}
"actor": {1
"account": {
"name":"meg.fitzimmons",
"homePage": "https://oraclesandbox.oracle.com"
},
"objectType": "Agent"
},
"verb": {2
"display": {
"en": "completed"
},
"id": "http://adlnet.gov/expapi/verbs/completed"
},
"object":{3
"definition":{
"name":{
"en":"The art of staying focused"
},
"type":"http://adlnet.gov/expapi/activities/course"
},
"id":"https://xapi.CompanyX.com/xapi/course/562c1f97-fea5-11e6-8638-0242c0a80b06",
"objectType":"Activity"
},
"result":{4
"duration":"PT2M57S",
"score":{
"min":0,
"max":100,
"raw":89
}
},
"version":"1.0.0",5
"timestamp":"2023-02-21T12:58:36.561Z",6
"id":"{{$randomUUID}}"7
"objectType": "Agent"
7 id "id":"{{$randomUUID}}" UUID No
1.Actors
Actor element is used to identify the learner in Oracle Learning whose statement is being processed. Actor
information can be passed using either account or mbox formats. We recommend setting up the actor to utilize the
Account format which utilizes the username to identify the learner.
We discourage use of mbox format as multiple people might have the same email address (mbox account) and email
addresses change more frequently than account name. If there are duplicate email addresses, we cannot guarantee
that statement will be processed for the correct person.
"actor":{
"account":{
"name":"ravi.chouhan",
"homePage":"https://oraclesandbox.provider.com"
},
"objectType":"Agent"
"actor": {
"objectType": "Agent",
"mbox": "mailto:[email protected]",
"name": "Ravi"
2.Verbs
Verbs indicate the user action performed. Based on the user action, Oracle Learning will update the Enrollment
status/sub status. There are a number of standard xAPI verbs, but Oracle supports a subset of verbs listed below.
"verb": {
"display": {
"en": "completed"
},
"id": "http://adlnet.gov/expapi/verbs/completed"
},
Below are acceptable values for the verb Id. If you send a value outside this list, request may succeed but statement
will not be processed.
3. Object
Object uniquely identifies a content in Oracle learning. The Id of the object must map to the learning item number of a
Weblink type of Self-Paced learning (also called Digital Learning) in Oracle Learning.
"object":{3
"name":{
},
"type":"http://adlnet.gov/expapi/activities/course"
},
"id":"https://xapi.CompanyX.com/xapi/course/562c1f97-fea5-11e6-8638-0242c0a80b06",
"objectType":"Activity"
id Unique identifier of the learning item in Oracle Yes Used to identify the learning
Learning Cloud. item in Oracle Learning which
learner has experienced.
Note: Id needs to be in form of an IRI as per xAPI Further, used to fetch or create
specifications. For processing purpose, the term learner's enrollment on this
after the last “/” of the IRI will be picked. For learning item.
example, if object.id is specified as
“https://xapi.provider.com/xapi/video/5bad8340-
ddd5-11e7-90ec” , last part of the IRI will be
extracted and id will be considered as “5bad8340-
ddd5-11e7-90ec”. This must match with the
learning Item number of a valid URL based self-
paced learning.
type IRI of the object type indicating the type such as Yes Not used in statement
Course, Book, Video etc. processing but required to
maintain the xAPI standards.
# TYPE IRI
1 Article http://activitystrea.ms/schema/1.0/article
2 Assessment http://adlnet.gov/expapi/activities/assessment
3 Book http://id.tincanapi.com/activitytype/book
4 Document http://id.tincanapi.com/activitytype/document
5 Observation https://xapi.oracle.com/xapi/activity-type/observationchecklist
Checklist
5 Online http://adlnet.gov/expapi/activities/course
Course
6 Podcast https://xapi.oracle.com/xapi/activity-type/podcast
7 Video https://w3id.org/xapi/video/activity-type/video
8 AudioBook http://activitystrea.ms/schema/1.0/audio
4. Result
The result element represents a measured learning outcome. Some of the values in results element are processed
and stored in Oracle Learning. They are listed below. Values outside this list will be accepted in the statement but will
not be stored or displayed in Oracle Learning.
SUPPORTED
DEFINITION REQUIRED USAGE
EXTENSIONS
duration Duration of the time No Stored as "actual effort" on the activity attempt and will
learner spent on the be shown on learner transcript as actual effort.
experience.
Note- Duration must be expressed in ISO 8601
duration format with the highest permissible unit as
Days. We will not process duration if expressed in
Month, Week or years.
score Raw score achieved by No Stored as "actual score" on the activity attempt and will
the learner. be shown on learner transcript as score.
• raw
Note - When passed along with a min score and a max
score, raw score must be a number greater than or
equal to 0. It should be smaller than max score and
greater than min score.
Always use 1.0.0 as version. This is a required element in the xAPI statement.
6. Timestamp
"timestamp":"2023-02-21T12:58:36.561Z"
timestamp Represents the Yes For verbs that indicate start of a content, timestamp is stored
time when the as activity attempt start date.
user action was
performed. For verbs that indicate completion, timestamp is stored as
activity attempt completion date.
7. Id
UUID of the statement. Id will be auto generated if not passed in the statement.
"id":"{{$randomUUID}}"
Validations
Oracle Learning has implemented xAPI validations, on functionality Oracle Learning supports, based on xAPI
standard validation requirements and also Oracle Learning specific validations since we do not support all the
functionality within xAPI. An example of an Oracle Learning specific validation is that Oracle Learning will fail if a valid
xAPI verb is passed that Oracle Learning does not use/support. Oracle Learning is not using all of the xAPI
functionality so Oracle Learning is only using the xAPI validations that are relevant to the functionality that has been
implemented.
Providers can utilize the xAPI standards validation spec and also utilize the conformance test suite to validate xAPI
statements.
https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Communication.md#partthree
Actor (Learner) should be valid No Error in the response but statement will be marked failed. While processing the
statement actor will be validated against HCM persons. If actor is invalid, i.e. no
person record is found, statement will be marked as failed and won’t be processed
anymore
Time stamp: should be in UTC No error message but during processing it will be assumed to be in UTC.
format
Id Property Requirements • Id must be a UUID. If Id is not provided in the POST request, code will
generate it automatically.
Versioning Validations • Should fail when Statement POST/PUT/GET without header "X-
Experience-API-Version". The value should in format "1.0.x"
• An LRS sends a header response with "X-Experience-API-Version" as the
name and the latest patch version after "1.0.0" as the value
Verb Property Validations • Verb Id should not be null and should be a valid IRI.
• Statement Verb "display" should be an object. It should fail when display is
defined as numeric or string.
Object Validations • Statement Object Id should not be null and should be a valid IRI.
• Object Definition "type", if present should be a valid IRI.
• Object Type if present should have the value "Activity".
• Object Definition should fail when not declared as object.
• Object Extensions should fail when not declared as object.
Statement Lifecycle Requirements • should return 404 when no statement is returned using GET with
"statementId"
Result Property Requirements • Statement result score.scaled must be between -1.0 and 1.0 (inclusive).
• statement result "score.raw" must be less than or equal to score.max and
greater than or equal to score.min
Error Code validations • Should reject with error code 400 Bad Request any request to a Resource
which uses a parameter not recognized by the LRS
• In case of multiple statements in a request, should not persist any
statement when there is a failure.
Stored property validations • Using POST, LRS must accept statements with stored property.
Timestamp Property Validations • Should fail when statement has invalid string in timestamp.
• Should fail when statement has invalid date in timestamp.
• Should be in ISO 8601 format.
Special Data Types and Rules • Statement Activity extension key should fail when key is invalid IRI.
• Statement Result extension key should fail when key is invalid IRI.
• Should reject statements having timestamp with -00 offset.
• Should reject statements having timestamp with -0000 offset.
• Should reject statements having timestamp with -00:00 offset.
• Statement must contain a timestamp property when retrieved using a
GET operation.
• Statement must contain a stored property when retrieved using a GET
operation.
Formatting Requirements • statement verb should fail when display language map has a key with null
value
• statement object must not be empty
• should fail when attributes have string where numbers are required
• should fail when attributes have number when strings are required
• should fail when attributes have strings where Boolean is required
• statementId should be UUID
• statement actor "agent" account "name" property should be string
• should fail when any of these is not present in the statement: "id", "actor",
"verb", "object", "timestamp", "version"
• An LRS rejects a not well-created JSON Object
Sample Payloads
PROPERTY VALUE
Request https://{{host}}/hcmRestApi/redwood/xAPI/statements
Operation POST
Request {
Payload "actor": {
"account": {
"name": "learnimpl",
"homePage": "https://oraclesandbox.oracle.com"
},
"objectType": "Agent"
},
"verb": {
"display": {
"en": "initialized"
},
"id": "https:\/\/fanyv88.com:443\/http\/adlnet.gov\/expapi\/verbs\/initialized"
},
"object": {
"definition": {
"name": {
"en": "Leading in the Age of Generative AI"
},
"type": "https:\/\/fanyv88.com:443\/https\/w3id.org\/xapi\/video\/activity-type\/course"
},
"id": "https:\/\/fanyv88.com:443\/https\/xapi.provider.com\/xapi\/course\/OLC4323232",
"objectType": "Activity"
},
"id":"{{$randomUUID}}",
"version": "1.0.0",
"timestamp": "2024-02-07T06:09:57.290Z"
}
Response 200 OK
[
"ec572ce3-9f34-429f-80c1-ef682037c7f2"
]
Request https://{{host}}/hcmRestApi/redwood/xAPI/statements
Operation POST
Request {
Payload "actor": {
"account": {
"name": "learnimpl",
"homePage": "https:\/\/fanyv88.com:443\/https\/oraclesandbox.oracle.com"
},
"objectType": "Agent"
},
"verb": {
"display": {
"en": "scored"
},
"id": "https:\/\/fanyv88.com:443\/https\/w3id.org\/xapi\/dod-isd\/verbs\/scored"
},
"object": {
"definition": {
"name": {
"en": "Leadership Transitions: Moving into Senior Leadership"
},
"type": "https:\/\/fanyv88.com:443\/https\/adlnet.gov\/exapi\/activities\/course"
},
"id": "https:\/\/fanyv88.com:443\/https\/xapi.provider.com\/xapi\/course\/badfc56a-bb6b-4aa3",
"objectType": "Activity"
},
"result": {
"duration": "PT20M39S",
"score": {
"raw": 56,
"min": 0,
"max": 100
}
},
"version": "1.0.0",
"timestamp": "2023-10-01T06:09:57.290Z"
}
Response 200 OK
[
"ec572ce3-9f34-9f-80c1-ef682037c7f543"
]
PROPERTY VALUE
Request https://{{host}}/hcmRestApi/redwood/xAPI/statements
Operation POST
Request {
Payload "actor": {
"account": {
"name": "learnimpl",
"homePage": "https:\/\/fanyv88.com:443\/https\/oraclesandbox.oracle.com"
},
"objectType": "Agent"
},
"verb": {
"display": {
"en": "waived"
},
"id": "https:\/\/fanyv88.com:443\/https\/w3id.org\/xapi\/dod-isd\/verbs\/waived"
},
"object": {
"definition": {
"name": {
"en": "Leadership Transitions: Moving into Senior Leadership"
},
"type": "https:\/\/fanyv88.com:443\/https\/adlnet.gov\/exapi\/activities\/course"
},
"id": "https:\/\/fanyv88.com:443\/https\/xapi.provider.com\/xapi\/course\/badfc56a-bb6b-4aa3",
"objectType": "Activity"
},
"version": "1.0.0",
"timestamp": "2023-10-01T06:09:57.290Z"
Response 200 OK
[
"ec572ce3-9f34-9f-80c1-ef682037c7f543"
]
In this case, while processing the xAPI statement, Oracle Learning will create a net new voluntary enrollment for the
learner and update the status according to the information in xAPI statement.
2) What happens is learner has already completed the learning item and a new xAPI statement is sent?
In this case, Oracle Learning will create a net new voluntary enrollment for the learner and update the status
according to the information in xAPI statement.
3) What happens if learner or admin withdraws the learner from the active enrolment and an xAPI statement is sent
saying learner completed the learning item?
If an active enrolment is not found, a net new voluntary enrollment will be created for the learner and will be updated
to completed.
Helpful Resources
1) About xAPI
2) xAPI specifications
Call +1.800.ORACLE1 or visit oracle.com. Outside North America, find your local office at: oracle.com/contact.
Copyright © 2024, Oracle and/or its affiliates. All rights reserved. This document is Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be
provided for information purposes only, and the contents hereof are subject to change trademarks of their respective owners.
without notice. This document is not warranted to be error-free, nor subject to any other
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC
warranties or conditions, whether expressed orally or implied in law, including implied
trademarks are used under license and are trademarks or registered trademarks of SPARC
warranties and conditions of merchantability or fitness for a particular purpose. We
International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or
specifically disclaim any liability with respect to this document, and no contractual
registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open
obligations are formed either directly or indirectly by this document. This document
Group. 0120
may not be reproduced or transmitted in any form or by any means, electronic or
mechanical, for any purpose, without our prior written permission. Disclaimer: If you are unsure whether your data sheet needs a disclaimer, read the revenue
recognition policy. If you have further questions about your content and the disclaimer
This device has not been authorized as required by the rules of the Federal
requirements, e-mail [email protected].
Communications Commission. This device is not, and may not be, offered for sale or
lease, or sold or leased, until authorization is obtained.