You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: entity-api-spec.yaml
+30-11Lines changed: 30 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1440,9 +1440,23 @@ paths:
1440
1440
required: false
1441
1441
schema:
1442
1442
type: string
1443
+
enum: ['true', 'false']
1443
1444
responses:
1444
1445
'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'
1446
1460
'400':
1447
1461
description: Invalid or misformatted entity identifier, or the given entity is not a Dataset
1448
1462
'401':
@@ -1455,29 +1469,34 @@ paths:
1455
1469
description: Internal error
1456
1470
'/datasets/{id}/retract':
1457
1471
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.'
1459
1473
parameters:
1460
1474
- 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
1466
1480
requestBody:
1481
+
description: A json body with a single, required retraction_reason parameter contianing the reason why the dataset is being retracted.
1467
1482
content:
1468
1483
application/json:
1469
1484
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
1471
1490
responses:
1472
1491
'200':
1473
1492
description: The complete dataset with modified sub_status and retraction_reason
1474
1493
'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
1476
1495
'401':
1477
1496
description: The user's token has expired or the user did not supply a valid token
1478
1497
'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
1480
1499
'404':
1481
1500
description: The target dataset could not be found
0 commit comments