Quiz: The Anatomy of an xAPI Statement¶
Test your understanding of Statement identity, immutability, optional Statement pieces, and the RESTful mechanics of an xAPI Endpoint with these review questions.
1. What is the primary purpose of a Statement ID in xAPI?¶
- To give every Statement a permanent, globally unique identifier so it can be looked up or checked for duplicates
- To record which Learning Record Store first received the Statement
- To indicate the order in which Statements were generated by a Learning Record Provider
- To encode the Actor's account name in a URL-safe format
Show Answer
The correct answer is A. A Statement ID is a UUID that gives a Statement a permanent, globally unique identity so it can be located or checked for duplication among billions of others. B is wrong because the ID identifies the Statement, not the receiving store. C is wrong because Statement IDs are not sequential and don't encode ordering. D is wrong because Actor identity is handled separately through Inverse Functional Identifiers, not through the Statement ID.
Concept Tested: Statement ID
2. According to Statement Immutability, what is true of a Statement once a Learning Record Store has accepted it?¶
- It can be updated by the original Learning Record Provider within 24 hours
- It can be deleted only by a district administrator with elevated privileges
- It is never edited or deleted; corrections happen only through new Statements
- It automatically expires and is purged after one academic year
Show Answer
The correct answer is C. Statement Immutability means an accepted Statement is never edited or deleted — mistakes are corrected by sending new Statements, not by altering history. A is wrong because there is no time-limited edit window in xAPI. B is wrong because no role, however privileged, can delete a Statement under this rule. D is wrong because immutability says nothing about automatic expiration; retention is a separate policy concern.
Concept Tested: Statement Immutability
3. How does a Learning Record Provider formally retract an earlier Statement it now believes was wrong?¶
- It re-sends the same Statement ID with PUT and an updated Result field
- It sends a new Statement whose Verb is
voidedand whose Object points to the original Statement's ID - It issues an HTTP DELETE request against the original Statement's ID
- It appends a
voided: trueflag to the original Statement in place
Show Answer
The correct answer is B. Voiding sends a brand-new Statement with the reserved Verb voided whose Object is a StatementRef naming the Statement ID being retracted — the original is never touched. A is wrong because PUT to an existing Statement ID fails under immutability enforcement. C is wrong because there is no DELETE verb for Statements. D is wrong because that would mean editing the original Statement's fields, which immutability forbids.
Concept Tested: Voided Statement
4. What is an Inverse Functional Identifier (IFI) in xAPI?¶
- A unique code assigned to every Verb used across a textbook's Statements
- A hash of a Statement's full JSON body used to detect duplicate submissions
- The registration UUID that groups Statements from one learning attempt
- A property of an Actor guaranteed to identify one and only one person, such as an Actor Account
Show Answer
The correct answer is D. An IFI is the umbrella term for any Actor property — such as mbox, mbox_sha1sum, openid, or account — that uniquely identifies one person, and every Actor must use exactly one. A confuses IFIs with Verb identifiers, which are separate IRIs. B describes a hypothetical deduplication hash, not an IFI. C describes Registration, a different concept used for grouping attempts, not identifying people.
Concept Tested: Inverse Functional Identifier
5. Why does xAPI include the Sub-Statement construct?¶
- To let one Statement describe or report on another action without asserting that action happened as its own top-level record
- To let a Statement store binary files like screenshots or certificates inline
- To let two unrelated Statements be merged into a single database row for efficiency
- To let a Learning Record Store split one large Statement into several smaller ones during storage
Show Answer
The correct answer is A. A Sub-Statement nests a complete Actor-Verb-Object structure inside another Statement's Object, used when a Statement needs to describe another action — like a recommendation — without independently asserting it occurred. B describes Attachments, not Sub-Statements. C and D describe storage-merging or splitting behaviors the specification does not define; Sub-Statements are not independently stored records.
Concept Tested: Sub-Statement
See: Statements Inside Statements, and Everything Else Optional
6. How does a Statement reference binary data such as a PDF certificate through the Attachment mechanism?¶
- By embedding the raw file bytes directly inside the Statement's JSON body
- By storing a link to an external, unauthenticated file-sharing service
- By referencing a cryptographic hash and content type, while the actual bytes travel as a separate part of the same HTTP request
- By converting the file into a custom Extension key-value pair
Show Answer
The correct answer is C. An Attachment references the file by a SHA-2 hash and contentType, while the raw bytes travel as a separate part of the same HTTP request, rather than being embedded in the JSON. A is wrong because raw bytes are not embedded directly in the Statement JSON. B is wrong because the chapter describes no such external-link mechanism. D is wrong because Extensions hold custom key-value data, not binary files, which is why Attachments exist as a separate mechanism.
Concept Tested: Attachment
See: Statements Inside Statements, and Everything Else Optional
7. Why does xAPI require an Extension's key to be an IRI rather than a plain word like hintsUsed?¶
- IRIs load faster over HTTP than plain-text keys
- An IRI namespaces the key so two textbooks can each define a similarly-named extension without their data colliding
- Plain words are reserved for the five core Statement fields and cannot be reused
- IRIs are required so the Learning Record Store can automatically translate the value into any language
Show Answer
The correct answer is B. Using an IRI as the Extension key namespaces it to whichever textbook or system defined it, so two different hintsUsed extensions from different sources don't collide. A is a fabricated performance claim not discussed in the chapter. C is incorrect — there's no such reservation rule for plain words. D invents a translation feature that Extensions do not provide.
Concept Tested: Extensions
See: Statements Inside Statements, and Everything Else Optional
8. What architectural idea does xAPI adopt by using a RESTful API as its transport?¶
- Every operation requires a matching operation to be defined from scratch by each vendor
- Every request must be sent as a single large batch at the end of a school day
- Clients and servers negotiate a custom binary protocol unique to xAPI
- Every Statement, Activity, and Agent is treated as a resource with its own address, acted on by a small, fixed set of standard operations
Show Answer
The correct answer is D. REST treats each piece of data as a resource with a fixed set of standard operations acting on it, letting xAPI reuse existing web infrastructure like proxies and caches. A contradicts REST's whole point — a small, fixed set of shared operations means vendors do not invent new ones per resource. B invents a batching requirement not in the chapter. C is wrong because REST specifically avoids custom protocols, relying on ordinary HTTP.
Concept Tested: RESTful API
9. A Learning Record Provider wants to store one Statement at a Statement ID it already generated itself, and expects the request to fail if that ID already exists in the store. Which HTTP Verb should it use?¶
- PUT
- GET
- POST
- PATCH
Show Answer
The correct answer is A. PUT stores one new Statement at a client-supplied Statement ID and fails if that ID already exists, enforcing immutability at the protocol level. B is wrong because GET only retrieves data and cannot store anything. C is wrong because POST lets the LRS assign IDs and does not guarantee a failure on a pre-existing client-supplied ID the same way. D is wrong because PATCH is not one of the three HTTP Verbs an xAPI Endpoint supports for Statements.
Concept Tested: HTTP Verb
10. A textbook publisher is building a browser-based MicroSim that will send xAPI Statements directly from client-side JavaScript running in a student's browser. Which authentication scheme fits this situation best, and why?¶
- Basic Authentication, because it is simpler to implement in JavaScript
- OAuth Authentication, because it avoids embedding a long-lived password in code exposed to the browser's developer tools
- Basic Authentication, because server-side trust is irrelevant for browser code
- Neither scheme is needed since MicroSims run entirely offline
Show Answer
The correct answer is B. OAuth exchanges credentials once for a short-lived, revocable token, avoiding the exposure of a permanent password in client-side code that anyone could inspect via developer tools — exactly the untrusted-environment case the chapter describes. A and C wrongly recommend Basic Authentication, which exposes a long-lived credential on every request, unsuitable for untrusted browser code. D is wrong because MicroSims that report xAPI Statements still require authenticated network requests to an LRS.
Concept Tested: OAuth Authentication vs. Basic Authentication