From 5cb4be8c6b8b2fdf1d83d22302df619bd658a246 Mon Sep 17 00:00:00 2001 From: iaigner Date: Mon, 24 Jul 2023 14:32:15 +0200 Subject: [PATCH 1/2] MORE-1033: StudyManagerApi extension --- openapi/StudyManagerAPI.yaml | 75 ++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/openapi/StudyManagerAPI.yaml b/openapi/StudyManagerAPI.yaml index 56ce450a..c77205fe 100644 --- a/openapi/StudyManagerAPI.yaml +++ b/openapi/StudyManagerAPI.yaml @@ -1016,6 +1016,41 @@ paths: '400': description: bad request + /studies/{studyId}/export/getStudySnapshot: + parameters: + - $ref: '#/components/parameters/StudyId' + post: + tags: + - importExport + description: Create export snapshot of existing study data + operationId: createStudySnapshot + responses: + '200': + description: creating a new snapshot was successful + content: + application/json: + schema: + $ref: '#/components/parameters/StudySnapshotId' + '400': + description: bad request + + /studies/{studyId}/export/downloadStudySnapshot: + parameters: + - $ref: '#/components/parameters/StudyId' + get: + tags: + - importExport + description: Export Study Snapshot + operationId: exportStudySnapshot + responses: + '200': + description: downloads a created snapshot + content: + application/json: + schema: + $ref: '#/components/schemas/StudyImportExport' + '400': + description: bad request /studies/{studyId}/import/participants: parameters: @@ -1079,6 +1114,24 @@ paths: '404': description: not found + /studies/{studyId}/studyDataSnapshot: + get: + tags: + - data + description: Gets the available data snapshot list of a study + operationId: getDataSnapshots + parameters: + - $ref: '#/components/parameters/StudyId' + responses: + '200': + description: List of Data Snapshots successfully fetched + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/StudySnapshot' + /studies/{studyId}/datapoints: get: tags: @@ -1700,6 +1753,21 @@ components: - roles readOnly: true + StudySnapshot: + type: object + properties: + studySnapshotId: + type: integer + format: int32 + name: + type: string + timestamp: + type: string + format: date-time + status: + type: string + readOnly: true + PlatformRole: description: | We differentiate between the following roles within a study: @@ -1810,6 +1878,13 @@ components: type: integer format: int32 required: true + StudySnapshotId: + name: studySnapshotId + in: path + schema: + type: integer + format: int32 + required: true securitySchemes: OAuth: From 1778b97b89b33e75c484569db52499c226ae3f4d Mon Sep 17 00:00:00 2001 From: iaigner Date: Mon, 24 Jul 2023 14:40:31 +0200 Subject: [PATCH 2/2] MORE-1033 --- openapi/StudyManagerAPI.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openapi/StudyManagerAPI.yaml b/openapi/StudyManagerAPI.yaml index c77205fe..f5295ca0 100644 --- a/openapi/StudyManagerAPI.yaml +++ b/openapi/StudyManagerAPI.yaml @@ -1016,7 +1016,7 @@ paths: '400': description: bad request - /studies/{studyId}/export/getStudySnapshot: + /studies/{studyId}/export/createStudySnapshot: parameters: - $ref: '#/components/parameters/StudyId' post: @@ -1030,13 +1030,14 @@ paths: content: application/json: schema: - $ref: '#/components/parameters/StudySnapshotId' + $ref: '#/components/schemas/StudySnapshot' '400': description: bad request /studies/{studyId}/export/downloadStudySnapshot: parameters: - $ref: '#/components/parameters/StudyId' + - $ref: '#/components/parameters/StudySnapshotId' get: tags: - importExport