Behavioral Assay API endpoint
Table of contents
Fields
| Field | Description |
|---|---|
id | UUID identificator formatted as a string |
name | string [required] [max length: 50] |
description | string [max length: 500] |
setup_type | related environment type ID formatted as a string [required] |
behavioral_paradigm | related behavioral paradigm ID formatted as a string [required] |
licenses | list of related license IDs |
is_public | boolean |
List view
- Allowed portals: public, private
- Request method: GET
- URL: https://www.brainstem.org/api/private/personal_attributes/behavioralassay
- Data: None
- Responses:
200OK;403Not allowed;404Not found
Use example (using Python API)
resp = client.load_model('behavioralassay')
Response example
{'behavioralassays': [
{
'id': 'febe36f7-4769-496d-bb91-6a8443214b94',
'name': 'AlternationRunning',
'description': 'Alternating running task',
'setup_type': '531b2a21-ab1f-4aa8-8eaf-905421168d6b',
'behavioral_paradigm': '00000000-0000-0000-0000-000000000000',
'licenses': [],
'is_public': False
},
{
'id': 'f7bc834e-761c-4147-a3d4-da52293a565c',
'name': 'ContinuousRunning',
'description': 'Continuous running task',
'setup_type': '8e9c4d33-f59c-45ca-8e43-f01789f20332',
'behavioral_paradigm': '00000000-0000-0000-0000-000000000000',
'licenses': [],
'is_public': True
}
]}
Public list responses also include a meta object (pagination/filter metadata).
Add
- Allowed portals: private
- Request method: POST
- URL: https://www.brainstem.org/api/private/personal_attributes/behavioralassay
- Data: JSON dictionary containing at least the required fields.
- Responses:
201OK;400Bad request;403Not allowed;404Not found
Additional notes: both setup_type and behavioral_paradigm are required for create requests.
Use example (using Python API)
resp = client.save_model("behavioralassay", data=
{
'name': 'PlayMarioKart',
'description': 'Play Mario Kart on GameCube',
'setup_type': '8e9c4d33-f59c-45ca-8e43-f01789f20332',
'behavioral_paradigm': '00000000-0000-0000-0000-000000000000',
'licenses': [],
}
)
Response example
{'behavioralassay': {
'id': '22ae80be-e030-4cee-9cd5-b94ac2edc7f8',
'name': 'PlayMarioKart',
'description': 'Play Mario Kart on GameCube',
'setup_type': '8e9c4d33-f59c-45ca-8e43-f01789f20332',
'behavioral_paradigm': '00000000-0000-0000-0000-000000000000',
'licenses': [],
'is_public': False}
}
Detail
- Allowed portals: public, private
- Request method: GET
- URL: https://www.brainstem.org/api/private/personal_attributes/behavioralassay/<id>/
- Data: None
- Responses:
200OK;403Not allowed;404Not found
Use example (using Python API)
resp = client.load_model('behavioralassay', id='22ae80be-e030-4cee-9cd5-b94ac2edc7f8')
Response example
{'behavioralassay': {
'id': '22ae80be-e030-4cee-9cd5-b94ac2edc7f8',
'name': 'PlayMarioKart',
'description': 'Play Mario Kart on GameCube',
'setup_type': '8e9c4d33-f59c-45ca-8e43-f01789f20332',
'behavioral_paradigm': '00000000-0000-0000-0000-000000000000',
'licenses': [],
'is_public': False}
}
Change
- Allowed portals: private
- Request method: PATCH
- URL: https://www.brainstem.org/api/private/personal_attributes/behavioralassay/<id>/
- Data: dictionary containing the fields to be updated
- Responses:
200OK;400Bad request;403Not allowed;404Not found
Use example (using Python API)
resp = client.save_model("behavioralassay", id="22ae80be-e030-4cee-9cd5-b94ac2edc7f8", data={"description": "new text"})
Response example
{'behavioralassay': {
'id': '22ae80be-e030-4cee-9cd5-b94ac2edc7f8',
'name': 'PlayMarioKart',
'description': 'new text',
'setup_type': '8e9c4d33-f59c-45ca-8e43-f01789f20332',
'behavioral_paradigm': '00000000-0000-0000-0000-000000000000',
'licenses': [],
'is_public': False}
}
Delete
- Allowed portals: private
- Request method: DELETE
- URL: https://www.brainstem.org/api/private/personal_attributes/behavioralassay/<id>/
- Data: None
- Responses:
204OK;403Not allowed;404Not found
Use example (using Python API)
resp = client.delete_model("behavioralassay", id="22ae80be-e030-4cee-9cd5-b94ac2edc7f8")