Skip to content

Commit 3573002

Browse files
Merge pull request #244 from hubmapconsortium/shirey/update-docs
updated docs
2 parents c38962f + d0a9675 commit 3573002

File tree

1 file changed

+30
-11
lines changed

1 file changed

+30
-11
lines changed

entity-api-spec.yaml

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,9 +1440,23 @@ paths:
14401440
required: false
14411441
schema:
14421442
type: string
1443+
enum: ['true', 'false']
14431444
responses:
14441445
'200':
1445-
description: The revision number (integer) on successful operation
1446+
description: The list of revised datasets that the referenced dataset is a member of including the index number of the revision, where 1 is the oldest version of any revision chain
1447+
content:
1448+
application/json:
1449+
schema:
1450+
type: object
1451+
properties:
1452+
dataset_uuid:
1453+
type: string
1454+
description: The uuid of a dataset
1455+
revision_number:
1456+
type: integer
1457+
description: The number in the revision chain of this dataset where 1 is the oldest revision
1458+
dataset:
1459+
$ref: '#/components/schemas/Dataset'
14461460
'400':
14471461
description: Invalid or misformatted entity identifier, or the given entity is not a Dataset
14481462
'401':
@@ -1455,29 +1469,34 @@ paths:
14551469
description: Internal error
14561470
'/datasets/{id}/retract':
14571471
put:
1458-
summary: 'Takes a json with a single required field {retraction_reason: string}. The dataset for the given id is modified to include this new retraction_reason field and sets the property sub_status to retracted. The complete modified dataset is returned. This will not work for anything besides published datasets. If the user has no token or has a token without membership in HuBMAP-Data-Admin group, then a 403 response should be returned.'
1472+
summary: 'Retracts a dataset after it has been published. Requires a json body with a single field {retraction_reason: string}. The dataset for the given id is modified to include this new retraction_reason field and sets the dataset property sub_status to Retracted. The complete modified dataset is returned. Requires that the dataset being retracted has already been published (dataset.status == Published. Requires a user token with membership in the HuBMAP-Data-Admin group otherwise then a 403 will be returned.'
14591473
parameters:
14601474
- name: id
1461-
in: path
1462-
description: The unique identifier of entity. This identifier can be either a HubMAP ID (e.g. HBM123.ABCD.456) or UUID
1463-
required: true
1464-
schema:
1465-
type: string
1475+
in: path
1476+
description: The unique identifier of entity. This identifier can be either a HubMAP ID (e.g. HBM123.ABCD.456) or UUID
1477+
required: true
1478+
schema:
1479+
type: string
14661480
requestBody:
1481+
description: A json body with a single, required retraction_reason parameter contianing the reason why the dataset is being retracted.
14671482
content:
14681483
application/json:
14691484
schema:
1470-
retraction_reason: string
1485+
type: object
1486+
properties:
1487+
retraction_reason:
1488+
type: string
1489+
description: Free text describing why the dataset was retracted
14711490
responses:
14721491
'200':
14731492
description: The complete dataset with modified sub_status and retraction_reason
14741493
'400':
1475-
description: Invalid or misformatted entity identifier, or the given entity is not a Dataset or is not published
1494+
description: Invalid or misformatted entity identifier, the given entity is not a Dataset, is not published or the required retraction_reason was not included in a json body
14761495
'401':
14771496
description: The user's token has expired or the user did not supply a valid token
14781497
'403':
1479-
description: The user is not authorized to query the retract the given dataset.
1498+
description: The user is not authorized to query the retract the given dataset. The user must be a member of the HuBMAP-Data-Admin group
14801499
'404':
14811500
description: The target dataset could not be found
14821501
'500':
1483-
description: Internal error
1502+
description: Internal error

0 commit comments

Comments
 (0)