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.

FamilyTypesUsed by (selector → payload)Status
Consumable22consumable: type → details, consumableapproval: type → entriesstable
ConsumableStock21consumablestock: type → detailsstable
Coordinates22equipment: coordinates_system → coordinates_details, experimentalinterface: coordinates → coordinates_json, experimentalinterfacetemplate: coordinates → coordinates_json, procedure: coordinates_system → coordinates_details, proceduretemplate: coordinates_system → coordinates_detailsstable
DataAcquisition23dataacquisition: type → details, dataacquisitiontemplate: type → detailsstable
Equipment58equipment: type → detailsstable
ExperimentalInterface44experimentalinterface: type → details, experimentalinterfacetemplate: type → detailsstable
HardwareDevice54hardwaredevice: type → type_json, hardwaredeviceapproval: type → entriesstable
Manipulation18manipulation: type → details, manipulationtemplate: type → detailsstable
MaterialUsage82materialusage: type → details_json, materialusagetemplate: type → details_jsonstable
Procedure46procedure: type → details, proceduretemplate: type → detailsstable
ProcedureLog3procedurelog: type → entriesstable
Specimen7specimen: type → detailsstable
SpecimenLog10specimenlog: type → entriesstable
SpecimenProcedure17specimenprocedure: type → details, specimenproceduretemplate: type → detailsexperimental
SpecimenProcedureStage2web forms onlyexperimental
SpecimenSet8specimenset: type → detailsstable
SubjectLog16subjectlog: type → entriesstable

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

  • type not 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 value and unit; 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.