- Get Started
- Write Code
The Tin Can API specification defines the structure of various objects such as statement, agent, verb, activity etc. The primary reader of the specification is a developer. If we wanted a computer program to be able to understand and apply the spec in order to validate statements, that program wouldn’t be able to read the English specification. We’d need to translate the structures defined in the specification into a language that a computer could understand.
That’s exactly what schema are: translations of the structures defined in the specification into a machine-readable format. Schema are particularly useful for validating data structures such as statements sent by an activity provider to an LRS.
You can get the Tin Can Schema here.
If you are an activity provider generating Tin Can statements, you won’t need to use the schema. Instead, using code libraries will help to ensure your statements have the correct structure and you can test to confirm using Workshop.
The Tin Can schema will help you to validate that statements are valid against the specification, but they won’t help to test that the content of your statements is useful or that you’ve followed best practices and [recipes]. Be sure to follow the advice in the [statements deep dive] in addition to technically validating for statements.