Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Add access levels (issue #274) #286

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions beacon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
}
}