From dbdfac81d40f975fefb8705d558bad5dcad935dd Mon Sep 17 00:00:00 2001 From: James Kent Date: Thu, 27 Mar 2025 18:27:28 -0500 Subject: [PATCH 1/5] add feature_config --- neurostore-openapi.yml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/neurostore-openapi.yml b/neurostore-openapi.yml index 2e60b59..1e4f9b7 100644 --- a/neurostore-openapi.yml +++ b/neurostore-openapi.yml @@ -173,13 +173,34 @@ paths: parameters: - name: feature_filter in: query - description: Filter results by feature content using jsonpath syntax + description: > + Filter results by feature content. Format: "PipelineName[:version]:field_path=value". + Examples: + - "TestPipeline:1.0.0:groups.diagnosis=ADHD" (specific version) + - "TestPipeline:groups.diagnosis=ADHD" (any version) + + Field path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. required: false schema: type: array items: type: string - example: 'groups.diagnosis=ADHD' + example: 'TestPipeline:1.0.0:groups.diagnosis=ADHD' + - name: feature_config + in: query + description: > + Filter results by pipeline config content. Format: "PipelineName[:version]:config_path=value". + Examples: + - "TestPipeline:1.0.0:preprocessing.smoothing=8" (specific version) + - "TestPipeline:model.type=linear" (any version) + + Config path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. + required: false + schema: + type: array + items: + type: string + example: 'TestPipeline:1.0.0:preprocessing.smoothing=8' - name: study_id in: query description: Filter results by base study ID @@ -188,6 +209,12 @@ paths: type: array items: type: string + - name: version + in: query + description: Filter results by pipeline config version + required: false + schema: + type: string responses: '200': description: OK From 4490e97ee3591962e47630ad9ffd8a469339b6c0 Mon Sep 17 00:00:00 2001 From: James Kent Date: Fri, 28 Mar 2025 17:01:22 -0500 Subject: [PATCH 2/5] add config_filter logic --- neurostore-openapi.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/neurostore-openapi.yml b/neurostore-openapi.yml index 1e4f9b7..c2cd1fd 100644 --- a/neurostore-openapi.yml +++ b/neurostore-openapi.yml @@ -1092,10 +1092,34 @@ paths: parameters: - name: feature_filter in: query - description: Filter studies by features + description: > + Filter studies by feature content. Format: "PipelineName[:version]:field_path=value". + Examples: + - "TestPipeline:1.0.0:predictions.age_mean>20" (specific version) + - "TestPipeline:groups.diagnosis=ADHD" (any version) + + Field path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. required: false schema: - type: string + type: array + items: + type: string + example: 'TestPipeline:1.0.0:predictions.age_mean>20' + - name: feature_config + in: query + description: > + Filter studies by pipeline config content. Format: "PipelineName[:version]:config_path=value". + Examples: + - "TestPipeline:1.0.0:settings.min_age=20" (specific version) + - "TestPipeline:model.type=linear" (any version) + + Config path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. + required: false + schema: + type: array + items: + type: string + example: 'TestPipeline:1.0.0:settings.min_age=20' - name: feature_display in: query description: display features from pipelines From bde4e416f1f25bac6a866294213a02dd85e3323c Mon Sep 17 00:00:00 2001 From: James Kent Date: Mon, 31 Mar 2025 11:17:10 -0500 Subject: [PATCH 3/5] rename feature_config to pipeline_config --- neurostore-openapi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neurostore-openapi.yml b/neurostore-openapi.yml index c2cd1fd..7f55583 100644 --- a/neurostore-openapi.yml +++ b/neurostore-openapi.yml @@ -186,7 +186,7 @@ paths: items: type: string example: 'TestPipeline:1.0.0:groups.diagnosis=ADHD' - - name: feature_config + - name: pipeline_config in: query description: > Filter results by pipeline config content. Format: "PipelineName[:version]:config_path=value". @@ -1105,7 +1105,7 @@ paths: items: type: string example: 'TestPipeline:1.0.0:predictions.age_mean>20' - - name: feature_config + - name: pipeline_config in: query description: > Filter studies by pipeline config content. Format: "PipelineName[:version]:config_path=value". From 2e03fdcd60b993fb2f56396605ffbfd8ac3b4bba Mon Sep 17 00:00:00 2001 From: James Kent Date: Mon, 31 Mar 2025 18:54:57 -0500 Subject: [PATCH 4/5] fix wording --- neurostore-openapi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neurostore-openapi.yml b/neurostore-openapi.yml index 7f55583..87b97d3 100644 --- a/neurostore-openapi.yml +++ b/neurostore-openapi.yml @@ -1096,7 +1096,7 @@ paths: Filter studies by feature content. Format: "PipelineName[:version]:field_path=value". Examples: - "TestPipeline:1.0.0:predictions.age_mean>20" (specific version) - - "TestPipeline:groups.diagnosis=ADHD" (any version) + - "TestPipeline:groups.diagnosis=ADHD" (latest version) Field path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. required: false From cfade0511757743d31729a9690dbe5d5a8fb6577 Mon Sep 17 00:00:00 2001 From: James Kent Date: Mon, 31 Mar 2025 18:56:43 -0500 Subject: [PATCH 5/5] Apply suggestions from code review --- neurostore-openapi.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neurostore-openapi.yml b/neurostore-openapi.yml index 87b97d3..917db84 100644 --- a/neurostore-openapi.yml +++ b/neurostore-openapi.yml @@ -177,7 +177,7 @@ paths: Filter results by feature content. Format: "PipelineName[:version]:field_path=value". Examples: - "TestPipeline:1.0.0:groups.diagnosis=ADHD" (specific version) - - "TestPipeline:groups.diagnosis=ADHD" (any version) + - "TestPipeline:groups.diagnosis=ADHD" (latest version) Field path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. required: false @@ -192,7 +192,7 @@ paths: Filter results by pipeline config content. Format: "PipelineName[:version]:config_path=value". Examples: - "TestPipeline:1.0.0:preprocessing.smoothing=8" (specific version) - - "TestPipeline:model.type=linear" (any version) + - "TestPipeline:model.type=linear" (latest version) Config path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. required: false @@ -1111,7 +1111,7 @@ paths: Filter studies by pipeline config content. Format: "PipelineName[:version]:config_path=value". Examples: - "TestPipeline:1.0.0:settings.min_age=20" (specific version) - - "TestPipeline:model.type=linear" (any version) + - "TestPipeline:model.type=linear" (latest version) Config path supports array notation with [], regex search with ~, and comparisons with =, >, <, >=, <=. required: false