From 77f1c94432c9c8de4151aa7715ffb5947fd61a15 Mon Sep 17 00:00:00 2001 From: James Kent Date: Fri, 14 Feb 2025 17:44:41 -0600 Subject: [PATCH 1/3] add feature --- neurostore-openapi.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/neurostore-openapi.yml b/neurostore-openapi.yml index 4045aad..099eeec 100644 --- a/neurostore-openapi.yml +++ b/neurostore-openapi.yml @@ -1189,6 +1189,12 @@ paths: schema: $ref: '#/components/schemas/base-study-list' parameters: + - name: features + in: query + description: Filter studies by features + required: false + schema: + type: string - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/page' @@ -2368,6 +2374,9 @@ components: allOf: - $ref: '#/components/schemas/base-study' - $ref: '#/components/schemas/resource-attributes' + properties: + features: + type: object base-study-list: title: base-study-list x-stoplight: From 1d09703cdbda460ac540d4be915163d35abfdb30 Mon Sep 17 00:00:00 2001 From: James Kent Date: Mon, 24 Feb 2025 19:26:40 -0600 Subject: [PATCH 2/3] remove pipeline run and rename run to study --- neurostore-openapi.yml | 234 +++++------------------------------------ 1 file changed, 26 insertions(+), 208 deletions(-) diff --git a/neurostore-openapi.yml b/neurostore-openapi.yml index 099eeec..91572f2 100644 --- a/neurostore-openapi.yml +++ b/neurostore-openapi.yml @@ -160,112 +160,38 @@ paths: responses: '204': description: No Content - - /pipeline-runs/: - get: - summary: GET a list of pipeline runs - tags: - - pipeline-runs - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/pipeline-run-list' - post: - summary: POST/create a pipeline run - tags: - - pipeline-runs - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/pipeline-run' - responses: - '201': - description: Created - /pipeline-runs/{pipeline_run_id}: - get: - summary: GET a pipeline run by ID - tags: - - pipeline-runs - parameters: - - name: pipeline_run_id - in: path - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/pipeline-run' - put: - summary: PUT/update a pipeline run by ID - tags: - - pipeline-runs - parameters: - - name: pipeline_run_id - in: path - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/pipeline-run' - responses: - '200': - description: OK - delete: - summary: DELETE a pipeline run by ID - tags: - - pipeline-runs - parameters: - - name: pipeline_run_id - in: path - required: true - schema: - type: string - responses: - '204': - description: No Content - - /pipeline-run-results/: + + /pipeline-study-results/: get: summary: GET a list of pipeline run results tags: - - pipeline-run-results + - pipeline-study-results responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/pipeline-run-result-list' + $ref: '#/components/schemas/pipeline-study-result-list' post: summary: POST/create a pipeline run result tags: - - pipeline-run-results + - pipeline-study-results requestBody: content: application/json: schema: - $ref: '#/components/schemas/pipeline-run-result' + $ref: '#/components/schemas/pipeline-study-result' responses: '201': description: Created - /pipeline-run-results/{pipeline_run_result_id}: + /pipeline-study-results/{pipeline_study_result_id}: get: summary: GET a pipeline run result by ID tags: - - pipeline-run-results + - pipeline-study-results parameters: - - name: pipeline_run_result_id + - name: pipeline_study_result_id in: path required: true schema: @@ -276,13 +202,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/pipeline-run-result' + $ref: '#/components/schemas/pipeline-study-result' put: summary: PUT/update a pipeline run result by ID tags: - - pipeline-run-results + - pipeline-study-results parameters: - - name: pipeline_run_result_id + - name: pipeline_study_result_id in: path required: true schema: @@ -291,90 +217,16 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/pipeline-run-result' + $ref: '#/components/schemas/pipeline-study-result' responses: '200': description: OK delete: summary: DELETE a pipeline run result by ID tags: - - pipeline-run-results + - pipeline-study-results parameters: - - name: pipeline_run_result_id - in: path - required: true - schema: - type: string - responses: - '204': - description: No Content - - /pipeline-run-result-votes/: - get: - summary: GET a list of pipeline run result votes - tags: - - pipeline-run-result-votes - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/pipeline-run-result-vote-list' - post: - summary: POST/create a pipeline run result vote - tags: - - pipeline-run-result-votes - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/pipeline-run-result-vote' - responses: - '201': - description: Created - /pipeline-run-result-votes/{pipeline_run_result_vote_id}: - get: - summary: GET a pipeline run result vote by ID - tags: - - pipeline-run-result-votes - parameters: - - name: pipeline_run_result_vote_id - in: path - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/pipeline-run-result-vote' - put: - summary: PUT/update a pipeline run result vote by ID - tags: - - pipeline-run-result-votes - parameters: - - name: pipeline_run_result_vote_id - in: path - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/pipeline-run-result-vote' - responses: - '200': - description: OK - delete: - summary: DELETE a pipeline run result vote by ID - tags: - - pipeline-run-result-votes - parameters: - - name: pipeline_run_result_vote_id + - name: pipeline_study_result_id in: path required: true schema: @@ -1189,12 +1041,18 @@ paths: schema: $ref: '#/components/schemas/base-study-list' parameters: - - name: features + - name: feature_filter in: query description: Filter studies by features required: false schema: type: string + - name: feature_display + in: query + description: display features from pipelines + required: false + schema: + type: string - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/page' @@ -1429,62 +1287,22 @@ components: $ref: '#/components/schemas/pipeline-config' metadata: $ref: '#/components/schemas/metadata' - pipeline-run: + pipeline-study-result: type: object properties: id: type: string - status: - type: string - started_at: - type: string - finished_at: - type: string - pipeline-run-list: - type: object - properties: - results: - type: array - items: - $ref: '#/components/schemas/pipeline-run' - metadata: - $ref: '#/components/schemas/metadata' - pipeline-run-result: - type: object - properties: - id: - type: string - pipeline_run_id: + pipeline_config_id: type: string data: type: object - pipeline-run-result-list: - type: object - properties: - results: - type: array - items: - $ref: '#/components/schemas/pipeline-run-result' - metadata: - $ref: '#/components/schemas/metadata' - pipeline-run-result-vote: - type: object - properties: - id: - type: string - pipeline_run_result_id: - type: string - user_id: - type: string - vote: - type: integer - pipeline-run-result-vote-list: + pipeline-study-result-list: type: object properties: results: type: array items: - $ref: '#/components/schemas/pipeline-run-result-vote' + $ref: '#/components/schemas/pipeline-study-result' metadata: $ref: '#/components/schemas/metadata' studyset-return: From 26b5302d2e9510be32bafe5e92874d299d8d286b Mon Sep 17 00:00:00 2001 From: James Kent Date: Tue, 11 Mar 2025 17:51:55 -0500 Subject: [PATCH 3/3] modify feature endpoint --- neurostore-openapi.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/neurostore-openapi.yml b/neurostore-openapi.yml index 91572f2..b297cc1 100644 --- a/neurostore-openapi.yml +++ b/neurostore-openapi.yml @@ -29,6 +29,8 @@ paths: summary: POST/create a pipeline tags: - pipelines + security: + - JSON-Web-Token: [] requestBody: content: application/json: @@ -37,6 +39,8 @@ paths: responses: '201': description: Created + '401': + description: Unauthorized - Authentication required /pipelines/{id}: get: summary: GET a pipeline by ID @@ -166,6 +170,16 @@ paths: summary: GET a list of pipeline run results tags: - pipeline-study-results + parameters: + - name: feature_filter + in: query + description: Filter results by feature content using jsonpath syntax + required: false + schema: + type: array + items: + type: string + example: 'groups.diagnosis=ADHD' responses: '200': description: OK