diff --git a/entity-api-spec.yaml b/entity-api-spec.yaml index 6730116c..0e34b81d 100644 --- a/entity-api-spec.yaml +++ b/entity-api-spec.yaml @@ -1330,29 +1330,6 @@ components: description: "True of False depending on whether the Entity id is an instance of the type" paths: - '/prov-metadata/{id}': - get: - summary: 'Returns full provenance metadata for a Dataset, which can be used when publishing the Dataset.' - parameters: - - name: id - in: path - description: The unique identifier of entity. This identifier can be either an HuBMAP ID (e.g. HBM123.ABCD.456) or UUID (32 digit hexadecimal number) - required: true - schema: - type: string - responses: - '200': - description: Full provenance information for the given dataset as JSON in the Response body. - content: - application/json: - schema: - $ref: '#/components/schemas/DatasetProvMetadata' - '401': - description: The user's token has expired or the user did not supply a valid token - '403': - description: THe user is not authorized to use this method - '500': - description: Internal error '/entities/{id}': get: summary: Retrieve a provenance entity by id. Entity types of Donor, Sample and Datasets. @@ -1971,7 +1948,31 @@ paths: description: The target entity could not be found '500': description: Internal error - '/datasets/{id}/latest-revision': + '/datasets/{id}/prov-metadata': + get: + summary: 'Returns full provenance metadata for a Dataset, which can be used when publishing the Dataset.' + parameters: + - name: id + in: path + description: The unique identifier of entity. This identifier can be either an HuBMAP ID (e.g. HBM123.ABCD.456) or UUID (32 digit hexadecimal number) + required: true + schema: + type: string + responses: + '200': + description: Full provenance information for the given dataset as JSON in the Response body. + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetProvMetadata' + '401': + description: The user's token has expired or the user did not supply a valid token + '403': + description: THe user is not authorized to use this method + '500': + description: + Internal error +'/datasets/{id}/latest-revision': get: summary: 'Retrive the latest (newest) revision of a given Dataset. Public/Consortium access rules apply - if no token/consortium access then must be for a public dataset and the returned Dataset must be the latest public version. If the given dataset itself is the latest revision, meaning it has no next revisions, this dataset gets returned.' parameters: diff --git a/src/app.py b/src/app.py index aa5e7713..f545b975 100644 --- a/src/app.py +++ b/src/app.py @@ -38,8 +38,8 @@ from schema.schema_constants import TriggerTypeEnum from metadata_constraints import get_constraints, constraints_json_is_valid # from lib.ontology import initialize_ubkg, init_ontology, Ontology, UbkgSDK -from entity_worker import EntityWorker -import entity_exceptions as entityEx +from dev_entity_worker import EntityWorker +import dev_entity_exceptions as entityEx # HuBMAP commons from hubmap_commons import string_helper @@ -661,7 +661,7 @@ def _get_entity_visibility(normalized_entity_type, entity_dict): json Valid JSON for the full provenance metadata of the requested Dataset ''' -@app.route('/prov-metadata/', methods = ['GET']) +@app.route('/datasets//prov-metadata', methods = ['GET']) def get_provenance_metadata_by_id_for_auth_level(id:Annotated[str, 32]) -> str: try: diff --git a/src/entity_exceptions.py b/src/dev_entity_exceptions.py similarity index 100% rename from src/entity_exceptions.py rename to src/dev_entity_exceptions.py diff --git a/src/entity_worker.py b/src/dev_entity_worker.py similarity index 99% rename from src/entity_worker.py rename to src/dev_entity_worker.py index a15eacdd..f1808089 100644 --- a/src/entity_worker.py +++ b/src/dev_entity_worker.py @@ -15,7 +15,7 @@ from hubmap_commons.hm_auth import AuthHelper from hubmap_commons.S3_worker import S3Worker -import entity_exceptions as entityEx +import dev_entity_exceptions as entityEx COMMA_SEPARATOR = ','