Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Ontology & Vocabularies

SynDB uses controlled vocabularies to standardize dataset metadata — brain regions, species, microscopy techniques, and neurotransmitter types.

Browsing Terms

List All Vocabularies

curl https://api.syndb.xyz/v1/ontology/vocabularies

List Terms in a Vocabulary

curl "https://api.syndb.xyz/v1/ontology/terms?vocabulary=brain_region"

Search Terms

curl "https://api.syndb.xyz/v1/ontology/terms?search=mushroom"

Term Hierarchy

# Get child terms
curl https://api.syndb.xyz/v1/ontology/terms/{term_id}/children

# Get ancestor terms
curl https://api.syndb.xyz/v1/ontology/terms/{term_id}/ancestors

Validating Terms

Before submitting dataset metadata, validate that your terms exist:

curl -X POST -H "Content-Type: application/json" \
  https://api.syndb.xyz/v1/ontology/terms/validate \
  -d '{"terms": ["mushroom_body", "lateral_horn"]}'

Returns which terms are valid and which are unrecognized.

Administration (SuperUser)

Create a Term

curl -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  https://api.syndb.xyz/v1/ontology/terms \
  -d '{
    "name": "calyx",
    "vocabulary": "brain_region",
    "parent_id": "mushroom_body_term_id",
    "description": "Input region of the mushroom body"
  }'

Update a Term

curl -X PUT -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  https://api.syndb.xyz/v1/ontology/terms/{term_id} \
  -d '{"description": "Updated description"}'

Deprecate a Term

curl -X PATCH -H "Authorization: Bearer $TOKEN" \
  https://api.syndb.xyz/v1/ontology/terms/{term_id}/deprecate

Deprecated terms remain in the system but are flagged in search results and validation.

Bulk Import

curl -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: text/csv" \
  https://api.syndb.xyz/v1/ontology/import-csv \
  --data-binary @terms.csv

CSV format: name,vocabulary,parent_name,description

Integration with Datasets

When creating or updating dataset metadata, brain region, species, and microscopy fields are validated against the ontology. Invalid terms are rejected with an error listing the closest matches.