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
+57Lines changed: 57 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1422,5 +1422,62 @@ paths:
1422
1422
description: The user is not authorized to query the revision number of the given dataset.
1423
1423
'404':
1424
1424
description: The target dataset could not be found
1425
+
'500':
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
+
responses:
1444
+
'200':
1445
+
description: The revision number (integer) on successful operation
1446
+
'400':
1447
+
description: Invalid or misformatted entity identifier, or the given entity is not a Dataset
1448
+
'401':
1449
+
description: The user's token has expired or the user did not supply a valid token
1450
+
'403':
1451
+
description: The user is not authorized to query the revision number of the given dataset.
1452
+
'404':
1453
+
description: The target dataset could not be found
1454
+
'500':
1455
+
description: Internal error
1456
+
'/datasets/{id}/retract':
1457
+
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.'
1459
+
parameters:
1460
+
- 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
1466
+
requestBody:
1467
+
content:
1468
+
application/json:
1469
+
schema:
1470
+
retraction_reason: string
1471
+
responses:
1472
+
'200':
1473
+
description: The complete dataset with modified sub_status and retraction_reason
1474
+
'400':
1475
+
description: Invalid or misformatted entity identifier, or the given entity is not a Dataset or is not published
1476
+
'401':
1477
+
description: The user's token has expired or the user did not supply a valid token
1478
+
'403':
1479
+
description: The user is not authorized to query the retract the given dataset.
1480
+
'404':
1481
+
description: The target dataset could not be found
0 commit comments