Prefer using email? Write us at hello@moveshelf.com
subject_metadata_filters: {
"key": "<metadata_key>" # e.g., "subject-sex"
"operator": "EQ" # currently, only EQ is supported
"value": "<metadata_value>" # e.g., "Male"
} subject_metadata_filters: {
"logic": "AND", # Supported logics: AND, OR
"filters": [
{ "key": "subject-sex", "operator": "EQ", "value": "Female" },
{
"logic": "OR",
"filters": [
{ "key": "subject-diagnosis", "operator": "EQ", "value": "Cerebral Palsy" },
{ "key": "subject-diagnosis", "operator": "EQ", "value": "ACL Rupture" }
]
}
]
} ## README: this example shows how we can retrieve sessions from Moveshelf
# using the Moveshelf API.
## General configuration. Set values before running the script
my_project = "<organizationName/projectName>" # e.g. support/demoProject
subject_metadata_filters: {
"logic": "AND", # Supported logics: AND, OR
"filters": [
{ "key": "subject-sex", "operator": "EQ", "value": "Female" },
{
"logic": "OR",
"filters": [
{ "key": "subject-diagnosis", "operator": "EQ", "value": "Cerebral Palsy" },
{ "key": "subject-diagnosis", "operator": "EQ", "value": "ACL Rupture" }
]
}
]
}
## Add here the code to retrieve the project_id
# ... my_project_id = projects[idx_my_project]["id"]
## Get all subjects in the project that fullfill metadata criteria
## Set include_additional_data to True to also retrieve
## clips/trials and data files
subjects = api.getFilteredProjectSubjects(
my_project_id,
subject_metadata_filters=subject_metadata_filters,
include_additional_data=False
)
session_filters: {
"sessionDates": {
"startDate": None or "<startDate>" # start date (inclusive) in "YYYY-MM-DD" format or None,
"endDate": None or "<endDate>" # end date (inclusive) in "YYYY-MM-DD" format or None,
},
"numSessions": {
"min": None or <int> # minimum number of sessions (inclusive)
"max": None or <int> # maximum number of sessions (inclusive)
}
}## README: this example shows how we can retrieve sessions from Moveshelf
# using the Moveshelf API.
## General configuration. Set values before running the script
my_project = "<organizationName/projectName>" # e.g. support/demoProject
session_filters: {
"sessionDates": {
"startDate": "01-01-2010",
"endDate": "01-01-2015"
},
"numSessions": {
"min": 2
}
}
## Add here the code to retrieve the project_id
# ... my_project_id = projects[idx_my_project]["id"]
## Get all subjects in the project that fullfill metadata criteria
## Set include_additional_data to True to also retrieve
## clips/trials and data files
subjects = api.getFilteredProjectSubjects(
my_project_id,
session_filters=session_filters,
include_additional_data=False
)
## README: this example shows how we can retrieve sessions from Moveshelf
# using the Moveshelf API.
## General configuration. Set values before running the script
my_project = "<organizationName/projectName>" # e.g. support/demoProject
subject_metadata_filters: {
"logic": "AND", # Supported logics: AND, OR
"filters": [
{ "key": "subject-sex", "operator": "EQ", "value": "Female" },
{
"logic": "OR",
"filters": [
{ "key": "subject-diagnosis", "operator": "EQ", "value": "Cerebral Palsy" },
{ "key": "subject-diagnosis", "operator": "EQ", "value": "ACL Rupture" }
]
}
]
}
session_filters: {
"sessionDates": {
"startDate": "01-01-2013",
"endDate": "30-04-2020"
},
"numSessions": {
"min": 2,
"max": 2
}
}
## Add here the code to retrieve the project_id
# ... my_project_id = projects[idx_my_project]["id"]
## Get all subjects in the project that fullfill metadata criteria
## Set include_additional_data to True to also retrieve
## clips/trials and data files
subjects = api.getFilteredProjectSubjects(
my_project_id,
subject_metadata_filters=subject_metadata_filters,
session_filters=session_filters,
include_additional_data=False
)