Schemas
Some resources carry a type-specific JSON payload validated against the JSON schema of the selected type. The selector field (usually type) picks the type; the payload field holds its properties. If the payload does not match the schema the API returns 400 Bad request with the validation errors.
Every schema version is published at https://www.brainstem.org/schemas/<Family>/<Type>/<version>.json and never changes; see Public schemas for the URL layout and version history.
| Family | Types | Used by (selector → payload) | Status |
|---|---|---|---|
| Consumable | 22 | consumable: type → details, consumableapproval: type → entries | stable |
| ConsumableStock | 21 | consumablestock: type → details | stable |
| Coordinates | 22 | equipment: coordinates_system → coordinates_details, experimentalinterface: coordinates → coordinates_json, experimentalinterfacetemplate: coordinates → coordinates_json, procedure: coordinates_system → coordinates_details, proceduretemplate: coordinates_system → coordinates_details | stable |
| DataAcquisition | 23 | dataacquisition: type → details, dataacquisitiontemplate: type → details | stable |
| Equipment | 58 | equipment: type → details | stable |
| ExperimentalInterface | 44 | experimentalinterface: type → details, experimentalinterfacetemplate: type → details | stable |
| HardwareDevice | 54 | hardwaredevice: type → type_json, hardwaredeviceapproval: type → entries | stable |
| Manipulation | 18 | manipulation: type → details, manipulationtemplate: type → details | stable |
| MaterialUsage | 82 | materialusage: type → details_json, materialusagetemplate: type → details_json | stable |
| Procedure | 46 | procedure: type → details, proceduretemplate: type → details | stable |
| ProcedureLog | 3 | procedurelog: type → entries | stable |
| Specimen | 7 | specimen: type → details | stable |
| SpecimenLog | 10 | specimenlog: type → entries | stable |
| SpecimenProcedure | 17 | specimenprocedure: type → details, specimenproceduretemplate: type → details | experimental |
| SpecimenProcedureStage | 2 | web forms only | experimental |
| SpecimenSet | 8 | specimenset: type → details | stable |
| SubjectLog | 16 | subjectlog: type → entries | stable |
Some resources also validate one of their own JSON fields (additional fields, repository links, external identifiers, specifications) against a schema that does not depend on a type. Those schemas are documented on the resource’s page: behavioralparadigm, datastorage, project, session, setup, species, strain, subject.
Validation troubleshooting
typenot recognized: use one type code from the family’s quick type map.- Missing required property: add every property listed as required for that type.
- Wrong shape: quantities are objects with
valueandunit; multi-selects are lists of codes; tables are lists of row objects. - Unit or option not accepted: use one of the codes listed under Allowed values.
- Unknown property: schemas reject properties they do not declare.