From cf2cb53578ad8641ff3e39e4ccd7602f515f9077 Mon Sep 17 00:00:00 2001 From: sdelatorrep Date: Thu, 2 May 2019 15:09:33 +0200 Subject: [PATCH] Add access levels (issue #274) --- beacon.yaml | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/beacon.yaml b/beacon.yaml index 9429d70b..6fc246a6 100644 --- a/beacon.yaml +++ b/beacon.yaml @@ -258,6 +258,65 @@ paths: schema: $ref: '#/components/schemas/BeaconAlleleRequest' required: true + /access_levels: + get: + description: Get information about the access levels applying to this Beacon. All the parameters described can be combined. + operationId: getAccessLevels + parameters: + - name: fields + description: 'Comma separated list of field(s) to get the access level.' + in: query + required: false + schema: + type: string + example: + beaconOrganization, id + - name: datasetIds + description: 'Comma separated list of dataset(s) to get the access level.' + in: query + required: false + schema: + type: string + example: dataset_1, dataset_2 + - name: level + description: 'Access level of the field(s) to retrieve.' + in: query + required: false + schema: + type: string + enum: + - PUBLIC + - REGISTERED + - CONTROLLED + - NOT_SUPPORTED + example: CONTROLLED + - name: includeFieldDetails + description: '' + in: query + required: false + schema: + type: boolean + default: false + - name: displayDatasetDifferences + description: '' + in: query + required: false + schema: + type: boolean + default: false + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/AccessLevel' + '400': + description: Bad request (e.g. invalid level, field/dataset not found) + content: + application/json: + schema: + $ref: '#/components/schemas/AccessLevel' components: schemas: Chromosome: @@ -708,3 +767,37 @@ components: This would be the "preferred Label" in the case of an ontology term. default: null example: "BAM format" + AccessLevel: + type: object + required: + - beaconId + - error + - fields + - datasets + description: 'Get information about the access levels applying to this Beacon.' + properties: + beaconId: + description: 'Identifier of the beacon, as defined in `Beacon`.' + type: string + error: + $ref: '#/components/schemas/BeaconError' + fields: + description: 'Access level required for each of the fields in the Beacon spec.' + type: object + example: + beacon: PUBLIC, + beaconOrganization: { + id: PUBLIC, + name: PUBLIC + } + datasets: + description: 'Access level required for each dataset in the Beacon. Only the global access level for the dataset and the differences with the default level for each field (if any) must be described here. ' + type: object + example: + dataset_1: CONTROLLED, + dataset_2: { + beaconDatasetAlleleResponse: { + callCount: NOT_SUPPORTED + } + } +