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
+77-1Lines changed: 77 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1423,4 +1423,80 @@ paths:
1423
1423
'404':
1424
1424
description: The target dataset could not be found
1425
1425
'500':
1426
-
description: Internal error
1426
+
description: Internal error
1427
+
'/datasets/{id}/revisions':
1428
+
get:
1429
+
summary: 'From a given ID of a versioned dataset, retrieve a list of every dataset in the chain ordered from most recent to oldest. The revision number, as well as the dataset uuid will be included. An optional parameter ?include_dataset=true will include the full dataset for each revision as well. Public/Consortium access rules apply, if is for a non-public dataset and no token or a token without membership in HuBMAP-Read group is sent with the request then a 403 response should be returned. If the given id is published, but later revisions are not and the user is not in HuBMAP-Read group, only published revisions will be returned. The field next_revision_uuid will not be returned if the next revision is unpublished'
1430
+
parameters:
1431
+
- name: id
1432
+
in: path
1433
+
description: The unique identifier of entity. This identifier can be either an HuBMAP ID (e.g. HBM123.ABCD.456) or UUID
1434
+
required: true
1435
+
schema:
1436
+
type: string
1437
+
- name: include_dataset
1438
+
in: query
1439
+
description: A case insensitive string. Any value besides true will have no effect. If the string is 'true', the full dataset for each revision will be included in the response
1440
+
required: false
1441
+
schema:
1442
+
type: string
1443
+
enum: ['true', 'false']
1444
+
responses:
1445
+
'200':
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'
1460
+
'400':
1461
+
description: Invalid or misformatted entity identifier, or the given entity is not a Dataset
1462
+
'401':
1463
+
description: The user's token has expired or the user did not supply a valid token
1464
+
'403':
1465
+
description: The user is not authorized to query the revision number of the given dataset.
1466
+
'404':
1467
+
description: The target dataset could not be found
1468
+
'500':
1469
+
description: Internal error
1470
+
'/datasets/{id}/retract':
1471
+
put:
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.'
1473
+
parameters:
1474
+
- name: id
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
1480
+
requestBody:
1481
+
description: A json body with a single, required retraction_reason parameter contianing the reason why the dataset is being retracted.
1482
+
content:
1483
+
application/json:
1484
+
schema:
1485
+
type: object
1486
+
properties:
1487
+
retraction_reason:
1488
+
type: string
1489
+
description: Free text describing why the dataset was retracted
1490
+
responses:
1491
+
'200':
1492
+
description: The complete dataset with modified sub_status and retraction_reason
1493
+
'400':
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
1495
+
'401':
1496
+
description: The user's token has expired or the user did not supply a valid token
1497
+
'403':
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
1499
+
'404':
1500
+
description: The target dataset could not be found
0 commit comments