Tools › E-learning
xAPI Statement Validator
Check xAPI (Tin Can) statements for missing or malformed parts: actor, verb, object, result, context and attachments. An option adds the extra rules cmi5 sets.
About this tool What it's for, how to use it and an example
What it's for
Check xAPI statements (also called Tin Can statements) before they go to a Learning Record Store (LRS), the system that keeps them. It looks for the mistakes an LRS rejects or quietly mangles: a missing actor, verb or object, an agent with two identifiers, a verb id that isn’t an IRI (a web address-style identifier), a score outside −1 to 1, a badly written time, duration or UUID, and properties the standard doesn’t have. The rules are those of xAPI 1.0.3, with 2.0 where it differs. An option adds the extra rules cmi5 sets for its own statements.
For example, when a course sends statements and the LRS answers with a vague error, paste one here to see which part is wrong and where.
How to use it
Paste one statement, an array of statements, or a statements result (an object with a statements array), or
choose a .json file or drop one on the page. The checks run as you type. Each problem starts with its statement
number (when there is more than one) and the path to the part at fault, such as result.score.scaled. Errors are
things the standard forbids, warnings are allowed but discouraged, and notes are hints.
- cmi5 rules also checks the statements cmi5 defines (launched, initialized, completed, passed, failed, abandoned, waived, terminated and satisfied): the registration, the category and session id, the result each needs, and the order within a session, such as nothing after terminated. The setting is remembered in this browser.
- Format lays the JSON out neatly in the box.
- A short built-in list of ADL and cmi5 verbs gives a note when a verb isn’t one of them but is close to one, such
as
…/verbs/complete, which may be a typo.
Example
Use Try an example, or paste this:
{
"actor": { "name": "Alice Example", "mbox": "mailto:alice@example.com" },
"verb": { "id": "http://adlnet.gov/expapi/verbs/completed", "display": { "en-GB": "completed" } },
"object": { "id": "https://example.com/courses/fire-safety", "definition": { "name": { "en-GB": "Fire safety" } } },
"result": { "completion": true, "score": { "scaled": 0.85 }, "duration": "PT12M30S" },
"timestamp": "2024-05-01T10:30:00Z"
}
The message line reads “Valid: 1 statement, no problems found.” Tick cmi5 rules and it reads “1 statement: 4 errors.”: this statement has no registration, no cmi5 or moveon category, and no session id.
Good to know
It checks the shape of a statement, not whether it makes sense or is true: it can’t tell whether a verb suits the activity, and it doesn’t look at the web addresses. An IRI only has to have a scheme and no spaces. Statement properties are checked exactly, so a property from a later version of the standard is reported as unknown. Notes, and cmi5 rules for verbs cmi5 doesn’t define, are hints, not rules. The order rules for cmi5 follow the order of the statements in what you paste, not their timestamps. Statements are checked in the page and never uploaded, but treat real learner statements with care, as they hold names and email addresses.
Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.
Saved you a few minutes? Say thanks with a coffee.
Something wrong with this tool, or missing from it? Report a bug or suggest a feature.