Behavioral paradigm API endpoint

Table of contents

  1. Fields
  2. List view
  3. Add
  4. Detail
  5. Change
  6. Delete
  7. List approvals
  8. Detail approval
  9. Accept approval
  10. Reject approval

Fields

FieldDescription
idUUID identificator formatted as a string
namestring [required] [must be unique]
descriptionstring
categoryrelated behavioral category ID
speciesrelated species ID(s)
original_publicationstring
reference_urlURL string
rridResearch Resource Identifier (RRID)
rrid_urlURL to RRID lookup page [read-only]
external_identifiersJSON object containing external identifier information

List view

  • Allowed portals: public, private
  • Request method: GET
  • URL: https://www.brainstem.org/api/private/taxonomies/behavioralparadigm
  • Data: None
  • Responses: 200 OK; 403 Not allowed; 404 Not found

Use example (using Python API)

resp = client.load_model('behavioralparadigm')

Response example

{'behavioralparadigms': [
    {
        'id': 'e5f6a7b8-9012-34ef-0123-5678901234ef',
        'name': 'Morris Water Navigation Task',
        'description': 'A spatial learning task using a water maze to assess hippocampal-dependent spatial memory',
        'category': 'b2c3d4e5-6789-01bc-def0-2345678901bc',
        'species': [],
        'original_publication': 'Morris 1984',
        'reference_url': '',
        'rrid': None,
        'external_identifiers': None
    },
    {
        'id': 'f6a7b8c9-0123-45f0-1234-6789012345f0',
        'name': 'Elevated Plus Exploration',
        'description': 'Assessment of anxiety-like behavior via open arm avoidance on an elevated plus-shaped maze',
        'category': 'c3d4e5f6-7890-12cd-ef01-3456789012cd',
        'species': [],
        'original_publication': '',
        'reference_url': '',
        'rrid': None,
        'external_identifiers': None
    }
]}

Add

  • Allowed portals: private
  • Request method: POST
  • URL: https://www.brainstem.org/api/private/taxonomies/behavioralparadigm
  • Data: JSON dictionary containing at least the required fields.
  • Responses: 201 OK; 400 Bad request; 403 Not allowed; 404 Not found

Note: Behavioral paradigm submissions go through an approval process.

Use example (using Python API)

resp = client.save_model("behavioralparadigm", data={
        "name": "Rotarod",
        "description": "Assessment of balance, coordination, and motor learning on a rotating rod",
        "category": "c3d4e5f6-7890-12cd-ef01-3456789012cd",
        "original_publication": "Dunham & Miya 1957",
    }
)

Response example

{'behavioralparadigm_approval': {
    'id': 'a7b8c9d0-1234-56a1-2345-7890123456a1',
    'name': 'Rotarod',
    'description': 'Assessment of balance, coordination, and motor learning on a rotating rod',
    'category': 'c3d4e5f6-7890-12cd-ef01-3456789012cd',
    'species': [],
    'original_publication': 'Dunham & Miya 1957',
    'reference_url': '',
    'rrid': None,
    'external_identifiers': None}
}

Detail

  • Allowed portals: public, private
  • Request method: GET
  • URL: https://www.brainstem.org/api/private/taxonomies/behavioralparadigm/<id>/
  • Data: None
  • Responses: 200 OK; 403 Not allowed; 404 Not found

Use example (using Python API)

resp = client.load_model('behavioralparadigm', id='e5f6a7b8-9012-34ef-0123-5678901234ef')

Response example

{'behavioralparadigm': {
    'id': 'e5f6a7b8-9012-34ef-0123-5678901234ef',
    'name': 'Morris Water Navigation Task',
    'description': 'A spatial learning task using a water maze to assess hippocampal-dependent spatial memory',
    'category': 'b2c3d4e5-6789-01bc-def0-2345678901bc',
    'species': [],
    'original_publication': 'Morris 1984',
    'reference_url': '',
    'rrid': None,
    'external_identifiers': None}
}

Change

  • Allowed portals: private
  • Request method: PATCH
  • URL: https://www.brainstem.org/api/private/taxonomies/behavioralparadigm/<id>/
  • Data: dictionary containing the fields to be updated
  • Responses: 200 OK; 400 Bad request; 403 Not allowed; 404 Not found

Note: Behavioral paradigm changes go through an approval process.

Use example (using Python API)

resp = client.save_model("behavioralparadigm", id="e5f6a7b8-9012-34ef-0123-5678901234ef", data={"description": "updated description"})

Response example

{'behavioralparadigm_approval': {
    'id': 'b8c9d0e1-2345-67b2-3456-8901234567b2',
    'name': 'Morris Water Navigation Task',
    'description': 'updated description',
    'category': 'b2c3d4e5-6789-01bc-def0-2345678901bc',
    'species': [],
    'original_publication': 'Morris 1984',
    'reference_url': '',
    'rrid': None,
    'external_identifiers': None}
}

Delete

  • Allowed portals: private
  • Request method: DELETE
  • URL: https://www.brainstem.org/api/private/taxonomies/behavioralparadigm/<id>/
  • Data: None
  • Responses: 204 OK; 403 Not allowed; 404 Not found

Note: only administrators can delete Behavioral paradigms.

Use example (using Python API)

resp = client.delete_model("behavioralparadigm", id="e5f6a7b8-9012-34ef-0123-5678901234ef")

List approvals

  • Allowed portals: private
  • Request method: GET
  • URL: https://www.brainstem.org/api/private/taxonomies/behavioralparadigm_approvals
  • Data: None
  • Responses: 200 OK; 403 Not allowed; 404 Not found

Use example (using Python API)

resp = client.load_model('behavioralparadigmapproval')

Response example

{'behavioralparadigm_approvals': [
    {
        'id': 'a7b8c9d0-1234-56a1-2345-7890123456a1',
        'name': 'Rotarod',
        'description': 'Assessment of balance, coordination, and motor learning on a rotating rod',
        'category': 'c3d4e5f6-7890-12cd-ef01-3456789012cd',
        'species': [],
        'original_publication': 'Dunham & Miya 1957',
        'reference_url': '',
        'rrid': None,
        'external_identifiers': None,
        'instance_id': None,
        'action': 'Add',
        'reviewer': None,
        'status': 'Pending'
    }
]}

Detail approval

  • Allowed portals: private
  • Request method: GET
  • URL: https://www.brainstem.org/api/private/taxonomies/behavioralparadigm_approvals/<id>/
  • Data: None
  • Responses: 200 OK; 403 Not allowed; 404 Not found

Use example (using Python API)

resp = client.load_model('behavioralparadigmapproval', id='a7b8c9d0-1234-56a1-2345-7890123456a1')

Response example

{'behavioralparadigm_approval': {
    'id': 'a7b8c9d0-1234-56a1-2345-7890123456a1',
    'name': 'Rotarod',
    'description': 'Assessment of balance, coordination, and motor learning on a rotating rod',
    'category': 'c3d4e5f6-7890-12cd-ef01-3456789012cd',
    'species': [],
    'original_publication': 'Dunham & Miya 1957',
    'reference_url': '',
    'rrid': None,
    'external_identifiers': None,
    'instance_id': None,
    'action': 'Add',
    'reviewer': None,
    'status': 'Pending'}
}

Accept approval

  • Allowed portals: private
  • Request method: PATCH
  • URL: https://www.brainstem.org/api/private/taxonomies/behavioralparadigm_approvals/<id>/
  • Data: None
  • Responses: 200 OK; 403 Not allowed; 404 Not found

Use example (using Python API)

resp = client.save_model("behavioralparadigmapproval", id="a7b8c9d0-1234-56a1-2345-7890123456a1", options="accept")

Reject approval

  • Allowed portals: private
  • Request method: PATCH
  • URL: https://www.brainstem.org/api/private/taxonomies/behavioralparadigm_approvals/<id>/
  • Data: None
  • Responses: 200 OK; 403 Not allowed; 404 Not found

Use example (using Python API)

resp = client.save_model("behavioralparadigmapproval", id="b8c9d0e1-2345-67b2-3456-8901234567b2", options="reject")