Entity Type - Data Schema
The Data Schema defines what attributes Entities in an Entity Type are expected to have.
Entities may go against the schema and define their own attributes, however this means they won't be managed by the system and therefor lack care for data types, validation, and search optimizations.
An attribute in the schema must have a key, name, and data type defined. Structure attributes will contain an array of child attribute definitions.
We have an experimental API request for analyzing data to generate a schema and mapping you can learn more about here.
Data model
Below is a basic data model for a Data Schema record.
When documentation refers to IDataSchema or just a Data Schema, you can reference this data model.
Alternative schemas
Typically, you manage an Entity Type's Data Schema directly through the Entity Type record.
You can also save alternative Data Schemas for an Entity Type. Each one carries a Data Mapping from the Entity Type's own schema to the alternative one, and is used to reshape Entities when they are read. You can read about the mapping in Data Mapping.
If you include the query param schema={schema_id} in an Entity request, each Entity is returned mapped to that alternative schema, with the schema ID added as "Bruce/Schema". A list request must also name the Entity Type. An unknown schema ID returns a 404 error. The mapping runs after the records are found, so you can't use it to filter records.