Statements
Statements hold all of the xAPI records that have been inserted into the database via the xAPI Statements HTTP interface.
It is accessible through the following HTTP interfaces:
Connection HTTP Interface via http://www.example.org/api/connection/statement.
REST HTTP Interface via http://www.example.org/api/v2/statement.
Whilst statements can be inserted via the Models HTTP interface, this is not recommended as it bypasses all validation, reference and void checking, leading to invalid xAPI records.
Statements can be deleted by the REST API. See Statement Deletion API for more information.
Optional metadata can be added to a statement via the Metadata API. We automatically add metadata in cases such as for question statements (typically coming from Adapt), which makes reporting on assessments much easier than previously possible.
SCHEMA
Name | Type | Description |
---|---|---|
_id | Mongo ID | The id of the role (autogenerated) |
stored | Mongo Date | When this statement was created (autogenerated) |
timestamp | Mongo Date | When this statement’s activity occured (autogenerated) |
organisation | Mongo ID | The organisation this statement belongs in (autogenerated) |
lrs_id | Mongo ID | The store this statement belongs in (autogenerated) |
client | Mongo ID | The client that inserted this statement (autogenerated) |
person | Information about the person associated to the actor in this statement | |
voided | Boolean | Has the statement been voided |
hash | String | A unique hash of the statement used for conflict checks on insert (autogenerated) |
statement | The statement object as constructed and validated by the xAPI service | |
metadata | The metadata related to the statement | |
refs | Array [Statement References] |
|
PERSON
Name | Type | Description |
---|---|---|
_id | Mongo ID | The id of the person (autogenerated) |
name | String | The name of the person - this is auto populated for quick reference to avoid lookups (autogenerated) |
STATEMENT
Please refer to the Statement Properties in the xAPI specification for a full list of possible entries
STATEMENT REFERENCES
This contains an array of any statements that are referenced as part of this statement structure.
EXAMPLE GET DATA
{
"_id" : "111aaa1111a111111aa11111",
"hasGeneratedId" : false,
"organisation" : "111aaa1111a111111aa11111",
"lrs_id" : "111aaa1111a111111aa11111",
"client" : "111aaa1111a111111aa11111",
"person" : {
_id: "111aaa1111a111111aa11111",
name: "Joe Bloggs"
},
"voided" : false,
"timestamp" : "2017-09-08T09:41:58.136Z",
"stored" : "2017-09-08T09:41:58.136Z",
"hash" : "05db245f890c4e5f9513658435ddd5e16c579df1",
"refs" : [ ],
"statement" : {
"actor" : {
"objectType" : "Agent",
"name" : "xAPI mbox",
"mbox" : "mailto:xapi@adlnet.gov"
},
"verb" : {
"id" : "http://adlnet.gov/expapi/verbs/attended",
"display" : {
"en-GB" : "attended",
"en-US" : "attended"
}
},
"object" : {
"objectType" : "Activity",
"id" : "http://www.example.com/meetings/occurances/34534"
},
"id" : "3c5f9182-81ba-4e4c-9aa4-93a6b57a61ee",
"timestamp" : "2017-09-08T09:41:58.136Z",
"stored" : "2017-09-08T09:41:58.136Z",
"authority" : {
"mbox" : "mailto:hello@learninglocker.net",
"name" : "New Client",
"objectType" : "Agent"
},
"version" : "1.0.0"
}
}
Learning Locker and the Squirrel logo are trademark of Learning Pool 2020 | Learning Locker is licensed under GPL 3.0.