From 81fa46907673d95e954be275acdb7b28b02892ae Mon Sep 17 00:00:00 2001 From: Viktor Bozhinov Date: Tue, 16 Nov 2021 17:28:02 +0000 Subject: [PATCH] configure end part of endpoint urls to contain api extension #283 BREAKING CHANGE: modify endpoint urls to use relevant api extension --- datagateway_api/src/api_start_utils.py | 39 +-- datagateway_api/src/swagger/openapi.yaml | 338 +++++++++++------------ 2 files changed, 190 insertions(+), 187 deletions(-) diff --git a/datagateway_api/src/api_start_utils.py b/datagateway_api/src/api_start_utils.py index cfa93726..0ddf9aeb 100644 --- a/datagateway_api/src/api_start_utils.py +++ b/datagateway_api/src/api_start_utils.py @@ -106,6 +106,7 @@ def create_api_endpoints(flask_app, api, spec): # Create client pool icat_client_pool = create_client_pool() + datagateway_api_extension = config.datagateway_api.extension for entity_name in endpoints: get_endpoint_resource = get_endpoint( entity_name, @@ -115,7 +116,7 @@ def create_api_endpoints(flask_app, api, spec): ) api.add_resource( get_endpoint_resource, - f"/{entity_name.lower()}", + f"{datagateway_api_extension}/{entity_name.lower()}", endpoint=f"datagateway_get_{entity_name}", ) spec.path(resource=get_endpoint_resource, api=api) @@ -128,7 +129,7 @@ def create_api_endpoints(flask_app, api, spec): ) api.add_resource( get_id_endpoint_resource, - f"/{entity_name.lower()}/", + f"{datagateway_api_extension}/{entity_name.lower()}/", endpoint=f"datagateway_get_id_{entity_name}", ) spec.path(resource=get_id_endpoint_resource, api=api) @@ -141,7 +142,7 @@ def create_api_endpoints(flask_app, api, spec): ) api.add_resource( get_count_endpoint_resource, - f"/{entity_name.lower()}/count", + f"{datagateway_api_extension}/{entity_name.lower()}/count", endpoint=f"datagateway_count_{entity_name}", ) spec.path(resource=get_count_endpoint_resource, api=api) @@ -154,7 +155,7 @@ def create_api_endpoints(flask_app, api, spec): ) api.add_resource( get_find_one_endpoint_resource, - f"/{entity_name.lower()}/findone", + f"{datagateway_api_extension}/{entity_name.lower()}/findone", endpoint=f"datagateway_findone_{entity_name}", ) spec.path(resource=get_find_one_endpoint_resource, api=api) @@ -164,7 +165,9 @@ def create_api_endpoints(flask_app, api, spec): backend, client_pool=icat_client_pool, ) api.add_resource( - session_endpoint_resource, "/sessions", endpoint="datagateway_sessions", + session_endpoint_resource, + f"{datagateway_api_extension}/sessions", + endpoint="datagateway_sessions", ) spec.path(resource=session_endpoint_resource, api=api) @@ -174,7 +177,7 @@ def create_api_endpoints(flask_app, api, spec): ) api.add_resource( instrument_facility_cycle_resource, - "/instruments//facilitycycles", + f"{datagateway_api_extension}/instruments//facilitycycles", endpoint="datagateway_isis_instrument_facility_cycle", ) spec.path(resource=instrument_facility_cycle_resource, api=api) @@ -184,7 +187,7 @@ def create_api_endpoints(flask_app, api, spec): ) api.add_resource( count_instrument_facility_cycle_res, - "/instruments//facilitycycles/count", + f"{datagateway_api_extension}/instruments//facilitycycles/count", endpoint="datagateway_isis_count_instrument_facility_cycle", ) spec.path(resource=count_instrument_facility_cycle_res, api=api) @@ -194,8 +197,8 @@ def create_api_endpoints(flask_app, api, spec): ) api.add_resource( instrument_investigation_resource, - "/instruments//facilitycycles/" - "/investigations", + f"{datagateway_api_extension}/instruments/" + f"/facilitycycles//investigations", endpoint="datagateway_isis_instrument_investigation", ) spec.path(resource=instrument_investigation_resource, api=api) @@ -205,28 +208,28 @@ def create_api_endpoints(flask_app, api, spec): ) api.add_resource( count_instrument_investigation_res, - "/instruments//facilitycycles/" - "/investigations/count", + f"{datagateway_api_extension}/instruments/" + f"/facilitycycles//investigations/count", endpoint="datagateway_isis_count_instrument_investigation", ) spec.path(resource=count_instrument_investigation_res, api=api) # Ping endpoint ping_resource = ping_endpoint(backend, client_pool=icat_client_pool) - api.add_resource(ping_resource, "/ping") + api.add_resource(ping_resource, f"{datagateway_api_extension}/ping") spec.path(resource=ping_resource, api=api) # Search API endpoints if config.search_api is not None: # TODO - Use config value when new config style is implemented - search_api_extension = "search_api" + search_api_extension = config.search_api.extension search_api_entity_endpoints = ["datasets", "documents", "instruments"] for entity_name in search_api_entity_endpoints: get_search_endpoint_resource = get_search_endpoint(entity_name) api.add_resource( get_search_endpoint_resource, - f"/{search_api_extension}/{entity_name}", + f"{search_api_extension}/{entity_name}", endpoint=f"search_api_get_{entity_name}", ) spec.path(resource=get_search_endpoint_resource, api=api) @@ -234,7 +237,7 @@ def create_api_endpoints(flask_app, api, spec): get_single_endpoint_resource = get_single_endpoint(entity_name) api.add_resource( get_single_endpoint_resource, - f"/{search_api_extension}/{entity_name}/", + f"{search_api_extension}/{entity_name}/", endpoint=f"search_api_get_single_{entity_name}", ) spec.path(resource=get_single_endpoint_resource, api=api) @@ -242,7 +245,7 @@ def create_api_endpoints(flask_app, api, spec): get_number_count_endpoint_resource = get_number_count_endpoint(entity_name) api.add_resource( get_number_count_endpoint_resource, - f"/{search_api_extension}/{entity_name}/count", + f"{search_api_extension}/{entity_name}/count", endpoint=f"search_api_count_{entity_name}", ) spec.path(resource=get_number_count_endpoint_resource, api=api) @@ -250,7 +253,7 @@ def create_api_endpoints(flask_app, api, spec): get_files_endpoint_resource = get_files_endpoint("datasets") api.add_resource( get_files_endpoint_resource, - f"/{search_api_extension}/datasets//files", + f"{search_api_extension}/datasets//files", endpoint="search_api_get_dataset_files", ) spec.path(resource=get_files_endpoint_resource, api=api) @@ -260,7 +263,7 @@ def create_api_endpoints(flask_app, api, spec): ) api.add_resource( get_number_count_files_endpoint_resource, - f"/{search_api_extension}/datasets//files/count", + f"{search_api_extension}/datasets//files/count", endpoint="search_api_count_dataset_files", ) spec.path(resource=get_number_count_files_endpoint_resource, api=api) diff --git a/datagateway_api/src/swagger/openapi.yaml b/datagateway_api/src/swagger/openapi.yaml index ba5ee0f8..e976c6bc 100644 --- a/datagateway_api/src/swagger/openapi.yaml +++ b/datagateway_api/src/swagger/openapi.yaml @@ -1795,7 +1795,7 @@ info: version: '1.0' openapi: 3.0.3 paths: - /applications: + /datagateway-api/applications: get: description: Retrieves a list of Application objects parameters: @@ -1889,7 +1889,7 @@ paths: summary: Create new Applications tags: - Applications - /applications/{id_}: + /datagateway-api/applications/{id_}: delete: description: Updates Application with the specified ID with details provided in the request body @@ -1976,7 +1976,7 @@ paths: summary: Update Applications by id tags: - Applications - /applications/count: + /datagateway-api/applications/count: get: description: Return the count of the Application objects that would be retrieved given the filters provided @@ -2002,7 +2002,7 @@ paths: summary: Count Applications tags: - Applications - /applications/findone: + /datagateway-api/applications/findone: get: description: Retrieves the first Application objects that satisfies the filters. parameters: @@ -2030,7 +2030,7 @@ paths: summary: Get single Application tags: - Applications - /datacollectiondatafiles: + /datagateway-api/datacollectiondatafiles: get: description: Retrieves a list of DataCollectionDatafile objects parameters: @@ -2124,7 +2124,7 @@ paths: summary: Create new DataCollectionDatafiles tags: - DataCollectionDatafiles - /datacollectiondatafiles/{id_}: + /datagateway-api/datacollectiondatafiles/{id_}: delete: description: Updates DataCollectionDatafile with the specified ID with details provided in the request body @@ -2211,7 +2211,7 @@ paths: summary: Update DataCollectionDatafiles by id tags: - DataCollectionDatafiles - /datacollectiondatafiles/count: + /datagateway-api/datacollectiondatafiles/count: get: description: Return the count of the DataCollectionDatafile objects that would be retrieved given the filters provided @@ -2237,7 +2237,7 @@ paths: summary: Count DataCollectionDatafiles tags: - DataCollectionDatafiles - /datacollectiondatafiles/findone: + /datagateway-api/datacollectiondatafiles/findone: get: description: Retrieves the first DataCollectionDatafile objects that satisfies the filters. @@ -2267,7 +2267,7 @@ paths: summary: Get single DataCollectionDatafile tags: - DataCollectionDatafiles - /datacollectiondatasets: + /datagateway-api/datacollectiondatasets: get: description: Retrieves a list of DataCollectionDataset objects parameters: @@ -2361,7 +2361,7 @@ paths: summary: Create new DataCollectionDatasets tags: - DataCollectionDatasets - /datacollectiondatasets/{id_}: + /datagateway-api/datacollectiondatasets/{id_}: delete: description: Updates DataCollectionDataset with the specified ID with details provided in the request body @@ -2448,7 +2448,7 @@ paths: summary: Update DataCollectionDatasets by id tags: - DataCollectionDatasets - /datacollectiondatasets/count: + /datagateway-api/datacollectiondatasets/count: get: description: Return the count of the DataCollectionDataset objects that would be retrieved given the filters provided @@ -2474,7 +2474,7 @@ paths: summary: Count DataCollectionDatasets tags: - DataCollectionDatasets - /datacollectiondatasets/findone: + /datagateway-api/datacollectiondatasets/findone: get: description: Retrieves the first DataCollectionDataset objects that satisfies the filters. @@ -2504,7 +2504,7 @@ paths: summary: Get single DataCollectionDataset tags: - DataCollectionDatasets - /datacollectionparameters: + /datagateway-api/datacollectionparameters: get: description: Retrieves a list of DataCollectionParameter objects parameters: @@ -2599,7 +2599,7 @@ paths: summary: Create new DataCollectionParameters tags: - DataCollectionParameters - /datacollectionparameters/{id_}: + /datagateway-api/datacollectionparameters/{id_}: delete: description: Updates DataCollectionParameter with the specified ID with details provided in the request body @@ -2686,7 +2686,7 @@ paths: summary: Update DataCollectionParameters by id tags: - DataCollectionParameters - /datacollectionparameters/count: + /datagateway-api/datacollectionparameters/count: get: description: Return the count of the DataCollectionParameter objects that would be retrieved given the filters provided @@ -2712,7 +2712,7 @@ paths: summary: Count DataCollectionParameters tags: - DataCollectionParameters - /datacollectionparameters/findone: + /datagateway-api/datacollectionparameters/findone: get: description: Retrieves the first DataCollectionParameter objects that satisfies the filters. @@ -2742,7 +2742,7 @@ paths: summary: Get single DataCollectionParameter tags: - DataCollectionParameters - /datacollections: + /datagateway-api/datacollections: get: description: Retrieves a list of DataCollection objects parameters: @@ -2836,7 +2836,7 @@ paths: summary: Create new DataCollections tags: - DataCollections - /datacollections/{id_}: + /datagateway-api/datacollections/{id_}: delete: description: Updates DataCollection with the specified ID with details provided in the request body @@ -2923,7 +2923,7 @@ paths: summary: Update DataCollections by id tags: - DataCollections - /datacollections/count: + /datagateway-api/datacollections/count: get: description: Return the count of the DataCollection objects that would be retrieved given the filters provided @@ -2949,7 +2949,7 @@ paths: summary: Count DataCollections tags: - DataCollections - /datacollections/findone: + /datagateway-api/datacollections/findone: get: description: Retrieves the first DataCollection objects that satisfies the filters. parameters: @@ -2977,7 +2977,7 @@ paths: summary: Get single DataCollection tags: - DataCollections - /datafileformats: + /datagateway-api/datafileformats: get: description: Retrieves a list of DatafileFormat objects parameters: @@ -3071,7 +3071,7 @@ paths: summary: Create new DatafileFormats tags: - DatafileFormats - /datafileformats/{id_}: + /datagateway-api/datafileformats/{id_}: delete: description: Updates DatafileFormat with the specified ID with details provided in the request body @@ -3158,7 +3158,7 @@ paths: summary: Update DatafileFormats by id tags: - DatafileFormats - /datafileformats/count: + /datagateway-api/datafileformats/count: get: description: Return the count of the DatafileFormat objects that would be retrieved given the filters provided @@ -3184,7 +3184,7 @@ paths: summary: Count DatafileFormats tags: - DatafileFormats - /datafileformats/findone: + /datagateway-api/datafileformats/findone: get: description: Retrieves the first DatafileFormat objects that satisfies the filters. parameters: @@ -3212,7 +3212,7 @@ paths: summary: Get single DatafileFormat tags: - DatafileFormats - /datafileparameters: + /datagateway-api/datafileparameters: get: description: Retrieves a list of DatafileParameter objects parameters: @@ -3306,7 +3306,7 @@ paths: summary: Create new DatafileParameters tags: - DatafileParameters - /datafileparameters/{id_}: + /datagateway-api/datafileparameters/{id_}: delete: description: Updates DatafileParameter with the specified ID with details provided in the request body @@ -3393,7 +3393,7 @@ paths: summary: Update DatafileParameters by id tags: - DatafileParameters - /datafileparameters/count: + /datagateway-api/datafileparameters/count: get: description: Return the count of the DatafileParameter objects that would be retrieved given the filters provided @@ -3419,7 +3419,7 @@ paths: summary: Count DatafileParameters tags: - DatafileParameters - /datafileparameters/findone: + /datagateway-api/datafileparameters/findone: get: description: Retrieves the first DatafileParameter objects that satisfies the filters. @@ -3448,7 +3448,7 @@ paths: summary: Get single DatafileParameter tags: - DatafileParameters - /datafiles: + /datagateway-api/datafiles: get: description: Retrieves a list of Datafile objects parameters: @@ -3542,7 +3542,7 @@ paths: summary: Create new Datafiles tags: - Datafiles - /datafiles/{id_}: + /datagateway-api/datafiles/{id_}: delete: description: Updates Datafile with the specified ID with details provided in the request body @@ -3629,7 +3629,7 @@ paths: summary: Update Datafiles by id tags: - Datafiles - /datafiles/count: + /datagateway-api/datafiles/count: get: description: Return the count of the Datafile objects that would be retrieved given the filters provided @@ -3655,7 +3655,7 @@ paths: summary: Count Datafiles tags: - Datafiles - /datafiles/findone: + /datagateway-api/datafiles/findone: get: description: Retrieves the first Datafile objects that satisfies the filters. parameters: @@ -3683,7 +3683,7 @@ paths: summary: Get single Datafile tags: - Datafiles - /datasetparameters: + /datagateway-api/datasetparameters: get: description: Retrieves a list of DatasetParameter objects parameters: @@ -3777,7 +3777,7 @@ paths: summary: Create new DatasetParameters tags: - DatasetParameters - /datasetparameters/{id_}: + /datagateway-api/datasetparameters/{id_}: delete: description: Updates DatasetParameter with the specified ID with details provided in the request body @@ -3864,7 +3864,7 @@ paths: summary: Update DatasetParameters by id tags: - DatasetParameters - /datasetparameters/count: + /datagateway-api/datasetparameters/count: get: description: Return the count of the DatasetParameter objects that would be retrieved given the filters provided @@ -3890,7 +3890,7 @@ paths: summary: Count DatasetParameters tags: - DatasetParameters - /datasetparameters/findone: + /datagateway-api/datasetparameters/findone: get: description: Retrieves the first DatasetParameter objects that satisfies the filters. @@ -3919,7 +3919,7 @@ paths: summary: Get single DatasetParameter tags: - DatasetParameters - /datasettypes: + /datagateway-api/datasettypes: get: description: Retrieves a list of DatasetType objects parameters: @@ -4013,7 +4013,7 @@ paths: summary: Create new DatasetTypes tags: - DatasetTypes - /datasettypes/{id_}: + /datagateway-api/datasettypes/{id_}: delete: description: Updates DatasetType with the specified ID with details provided in the request body @@ -4100,7 +4100,7 @@ paths: summary: Update DatasetTypes by id tags: - DatasetTypes - /datasettypes/count: + /datagateway-api/datasettypes/count: get: description: Return the count of the DatasetType objects that would be retrieved given the filters provided @@ -4126,7 +4126,7 @@ paths: summary: Count DatasetTypes tags: - DatasetTypes - /datasettypes/findone: + /datagateway-api/datasettypes/findone: get: description: Retrieves the first DatasetType objects that satisfies the filters. parameters: @@ -4154,7 +4154,7 @@ paths: summary: Get single DatasetType tags: - DatasetTypes - /datasets: + /datagateway-api/datasets: get: description: Retrieves a list of Dataset objects parameters: @@ -4248,7 +4248,7 @@ paths: summary: Create new Datasets tags: - Datasets - /datasets/{id_}: + /datagateway-api/datasets/{id_}: delete: description: Updates Dataset with the specified ID with details provided in the request body @@ -4335,7 +4335,7 @@ paths: summary: Update Datasets by id tags: - Datasets - /datasets/count: + /datagateway-api/datasets/count: get: description: Return the count of the Dataset objects that would be retrieved given the filters provided @@ -4361,7 +4361,7 @@ paths: summary: Count Datasets tags: - Datasets - /datasets/findone: + /datagateway-api/datasets/findone: get: description: Retrieves the first Dataset objects that satisfies the filters. parameters: @@ -4389,7 +4389,7 @@ paths: summary: Get single Dataset tags: - Datasets - /facilities: + /datagateway-api/facilities: get: description: Retrieves a list of Facility objects parameters: @@ -4483,7 +4483,7 @@ paths: summary: Create new Facilities tags: - Facilities - /facilities/{id_}: + /datagateway-api/facilities/{id_}: delete: description: Updates Facility with the specified ID with details provided in the request body @@ -4570,7 +4570,7 @@ paths: summary: Update Facilities by id tags: - Facilities - /facilities/count: + /datagateway-api/facilities/count: get: description: Return the count of the Facility objects that would be retrieved given the filters provided @@ -4596,7 +4596,7 @@ paths: summary: Count Facilities tags: - Facilities - /facilities/findone: + /datagateway-api/facilities/findone: get: description: Retrieves the first Facility objects that satisfies the filters. parameters: @@ -4624,7 +4624,7 @@ paths: summary: Get single Facility tags: - Facilities - /facilitycycles: + /datagateway-api/facilitycycles: get: description: Retrieves a list of FacilityCycle objects parameters: @@ -4718,7 +4718,7 @@ paths: summary: Create new FacilityCycles tags: - FacilityCycles - /facilitycycles/{id_}: + /datagateway-api/facilitycycles/{id_}: delete: description: Updates FacilityCycle with the specified ID with details provided in the request body @@ -4805,7 +4805,7 @@ paths: summary: Update FacilityCycles by id tags: - FacilityCycles - /facilitycycles/count: + /datagateway-api/facilitycycles/count: get: description: Return the count of the FacilityCycle objects that would be retrieved given the filters provided @@ -4831,7 +4831,7 @@ paths: summary: Count FacilityCycles tags: - FacilityCycles - /facilitycycles/findone: + /datagateway-api/facilitycycles/findone: get: description: Retrieves the first FacilityCycle objects that satisfies the filters. parameters: @@ -4859,7 +4859,7 @@ paths: summary: Get single FacilityCycle tags: - FacilityCycles - /groupings: + /datagateway-api/groupings: get: description: Retrieves a list of Grouping objects parameters: @@ -4953,7 +4953,7 @@ paths: summary: Create new Groupings tags: - Groupings - /groupings/{id_}: + /datagateway-api/groupings/{id_}: delete: description: Updates Grouping with the specified ID with details provided in the request body @@ -5040,7 +5040,7 @@ paths: summary: Update Groupings by id tags: - Groupings - /groupings/count: + /datagateway-api/groupings/count: get: description: Return the count of the Grouping objects that would be retrieved given the filters provided @@ -5066,7 +5066,7 @@ paths: summary: Count Groupings tags: - Groupings - /groupings/findone: + /datagateway-api/groupings/findone: get: description: Retrieves the first Grouping objects that satisfies the filters. parameters: @@ -5094,7 +5094,7 @@ paths: summary: Get single Grouping tags: - Groupings - /instrumentscientists: + /datagateway-api/instrumentscientists: get: description: Retrieves a list of InstrumentScientist objects parameters: @@ -5188,7 +5188,7 @@ paths: summary: Create new InstrumentScientists tags: - InstrumentScientists - /instrumentscientists/{id_}: + /datagateway-api/instrumentscientists/{id_}: delete: description: Updates InstrumentScientist with the specified ID with details provided in the request body @@ -5275,7 +5275,7 @@ paths: summary: Update InstrumentScientists by id tags: - InstrumentScientists - /instrumentscientists/count: + /datagateway-api/instrumentscientists/count: get: description: Return the count of the InstrumentScientist objects that would be retrieved given the filters provided @@ -5301,7 +5301,7 @@ paths: summary: Count InstrumentScientists tags: - InstrumentScientists - /instrumentscientists/findone: + /datagateway-api/instrumentscientists/findone: get: description: Retrieves the first InstrumentScientist objects that satisfies the filters. @@ -5330,7 +5330,7 @@ paths: summary: Get single InstrumentScientist tags: - InstrumentScientists - /instruments: + /datagateway-api/instruments: get: description: Retrieves a list of Instrument objects parameters: @@ -5424,7 +5424,7 @@ paths: summary: Create new Instruments tags: - Instruments - /instruments/{id_}: + /datagateway-api/instruments/{id_}: delete: description: Updates Instrument with the specified ID with details provided in the request body @@ -5511,7 +5511,7 @@ paths: summary: Update Instruments by id tags: - Instruments - /instruments/count: + /datagateway-api/instruments/count: get: description: Return the count of the Instrument objects that would be retrieved given the filters provided @@ -5537,7 +5537,7 @@ paths: summary: Count Instruments tags: - Instruments - /instruments/findone: + /datagateway-api/instruments/findone: get: description: Retrieves the first Instrument objects that satisfies the filters. parameters: @@ -5565,7 +5565,7 @@ paths: summary: Get single Instrument tags: - Instruments - /investigationgroups: + /datagateway-api/investigationgroups: get: description: Retrieves a list of InvestigationGroup objects parameters: @@ -5659,7 +5659,7 @@ paths: summary: Create new InvestigationGroups tags: - InvestigationGroups - /investigationgroups/{id_}: + /datagateway-api/investigationgroups/{id_}: delete: description: Updates InvestigationGroup with the specified ID with details provided in the request body @@ -5746,7 +5746,7 @@ paths: summary: Update InvestigationGroups by id tags: - InvestigationGroups - /investigationgroups/count: + /datagateway-api/investigationgroups/count: get: description: Return the count of the InvestigationGroup objects that would be retrieved given the filters provided @@ -5772,7 +5772,7 @@ paths: summary: Count InvestigationGroups tags: - InvestigationGroups - /investigationgroups/findone: + /datagateway-api/investigationgroups/findone: get: description: Retrieves the first InvestigationGroup objects that satisfies the filters. @@ -5801,7 +5801,7 @@ paths: summary: Get single InvestigationGroup tags: - InvestigationGroups - /investigationinstruments: + /datagateway-api/investigationinstruments: get: description: Retrieves a list of InvestigationInstrument objects parameters: @@ -5896,7 +5896,7 @@ paths: summary: Create new InvestigationInstruments tags: - InvestigationInstruments - /investigationinstruments/{id_}: + /datagateway-api/investigationinstruments/{id_}: delete: description: Updates InvestigationInstrument with the specified ID with details provided in the request body @@ -5983,7 +5983,7 @@ paths: summary: Update InvestigationInstruments by id tags: - InvestigationInstruments - /investigationinstruments/count: + /datagateway-api/investigationinstruments/count: get: description: Return the count of the InvestigationInstrument objects that would be retrieved given the filters provided @@ -6009,7 +6009,7 @@ paths: summary: Count InvestigationInstruments tags: - InvestigationInstruments - /investigationinstruments/findone: + /datagateway-api/investigationinstruments/findone: get: description: Retrieves the first InvestigationInstrument objects that satisfies the filters. @@ -6039,7 +6039,7 @@ paths: summary: Get single InvestigationInstrument tags: - InvestigationInstruments - /investigationparameters: + /datagateway-api/investigationparameters: get: description: Retrieves a list of InvestigationParameter objects parameters: @@ -6133,7 +6133,7 @@ paths: summary: Create new InvestigationParameters tags: - InvestigationParameters - /investigationparameters/{id_}: + /datagateway-api/investigationparameters/{id_}: delete: description: Updates InvestigationParameter with the specified ID with details provided in the request body @@ -6220,7 +6220,7 @@ paths: summary: Update InvestigationParameters by id tags: - InvestigationParameters - /investigationparameters/count: + /datagateway-api/investigationparameters/count: get: description: Return the count of the InvestigationParameter objects that would be retrieved given the filters provided @@ -6246,7 +6246,7 @@ paths: summary: Count InvestigationParameters tags: - InvestigationParameters - /investigationparameters/findone: + /datagateway-api/investigationparameters/findone: get: description: Retrieves the first InvestigationParameter objects that satisfies the filters. @@ -6276,7 +6276,7 @@ paths: summary: Get single InvestigationParameter tags: - InvestigationParameters - /investigationtypes: + /datagateway-api/investigationtypes: get: description: Retrieves a list of InvestigationType objects parameters: @@ -6370,7 +6370,7 @@ paths: summary: Create new InvestigationTypes tags: - InvestigationTypes - /investigationtypes/{id_}: + /datagateway-api/investigationtypes/{id_}: delete: description: Updates InvestigationType with the specified ID with details provided in the request body @@ -6457,7 +6457,7 @@ paths: summary: Update InvestigationTypes by id tags: - InvestigationTypes - /investigationtypes/count: + /datagateway-api/investigationtypes/count: get: description: Return the count of the InvestigationType objects that would be retrieved given the filters provided @@ -6483,7 +6483,7 @@ paths: summary: Count InvestigationTypes tags: - InvestigationTypes - /investigationtypes/findone: + /datagateway-api/investigationtypes/findone: get: description: Retrieves the first InvestigationType objects that satisfies the filters. @@ -6512,7 +6512,7 @@ paths: summary: Get single InvestigationType tags: - InvestigationTypes - /investigationusers: + /datagateway-api/investigationusers: get: description: Retrieves a list of InvestigationUser objects parameters: @@ -6606,7 +6606,7 @@ paths: summary: Create new InvestigationUsers tags: - InvestigationUsers - /investigationusers/{id_}: + /datagateway-api/investigationusers/{id_}: delete: description: Updates InvestigationUser with the specified ID with details provided in the request body @@ -6693,7 +6693,7 @@ paths: summary: Update InvestigationUsers by id tags: - InvestigationUsers - /investigationusers/count: + /datagateway-api/investigationusers/count: get: description: Return the count of the InvestigationUser objects that would be retrieved given the filters provided @@ -6719,7 +6719,7 @@ paths: summary: Count InvestigationUsers tags: - InvestigationUsers - /investigationusers/findone: + /datagateway-api/investigationusers/findone: get: description: Retrieves the first InvestigationUser objects that satisfies the filters. @@ -6748,7 +6748,7 @@ paths: summary: Get single InvestigationUser tags: - InvestigationUsers - /investigations: + /datagateway-api/investigations: get: description: Retrieves a list of Investigation objects parameters: @@ -6842,7 +6842,7 @@ paths: summary: Create new Investigations tags: - Investigations - /investigations/{id_}: + /datagateway-api/investigations/{id_}: delete: description: Updates Investigation with the specified ID with details provided in the request body @@ -6929,7 +6929,7 @@ paths: summary: Update Investigations by id tags: - Investigations - /investigations/count: + /datagateway-api/investigations/count: get: description: Return the count of the Investigation objects that would be retrieved given the filters provided @@ -6955,7 +6955,7 @@ paths: summary: Count Investigations tags: - Investigations - /investigations/findone: + /datagateway-api/investigations/findone: get: description: Retrieves the first Investigation objects that satisfies the filters. parameters: @@ -6983,7 +6983,7 @@ paths: summary: Get single Investigation tags: - Investigations - /jobs: + /datagateway-api/jobs: get: description: Retrieves a list of Job objects parameters: @@ -7076,7 +7076,7 @@ paths: summary: Create new Jobs tags: - Jobs - /jobs/{id_}: + /datagateway-api/jobs/{id_}: delete: description: Updates Job with the specified ID with details provided in the request body @@ -7163,7 +7163,7 @@ paths: summary: Update Jobs by id tags: - Jobs - /jobs/count: + /datagateway-api/jobs/count: get: description: Return the count of the Job objects that would be retrieved given the filters provided @@ -7189,7 +7189,7 @@ paths: summary: Count Jobs tags: - Jobs - /jobs/findone: + /datagateway-api/jobs/findone: get: description: Retrieves the first Job objects that satisfies the filters. parameters: @@ -7217,7 +7217,7 @@ paths: summary: Get single Job tags: - Jobs - /keywords: + /datagateway-api/keywords: get: description: Retrieves a list of Keyword objects parameters: @@ -7311,7 +7311,7 @@ paths: summary: Create new Keywords tags: - Keywords - /keywords/{id_}: + /datagateway-api/keywords/{id_}: delete: description: Updates Keyword with the specified ID with details provided in the request body @@ -7398,7 +7398,7 @@ paths: summary: Update Keywords by id tags: - Keywords - /keywords/count: + /datagateway-api/keywords/count: get: description: Return the count of the Keyword objects that would be retrieved given the filters provided @@ -7424,7 +7424,7 @@ paths: summary: Count Keywords tags: - Keywords - /keywords/findone: + /datagateway-api/keywords/findone: get: description: Retrieves the first Keyword objects that satisfies the filters. parameters: @@ -7452,7 +7452,7 @@ paths: summary: Get single Keyword tags: - Keywords - /parametertypes: + /datagateway-api/parametertypes: get: description: Retrieves a list of ParameterType objects parameters: @@ -7546,7 +7546,7 @@ paths: summary: Create new ParameterTypes tags: - ParameterTypes - /parametertypes/{id_}: + /datagateway-api/parametertypes/{id_}: delete: description: Updates ParameterType with the specified ID with details provided in the request body @@ -7633,7 +7633,7 @@ paths: summary: Update ParameterTypes by id tags: - ParameterTypes - /parametertypes/count: + /datagateway-api/parametertypes/count: get: description: Return the count of the ParameterType objects that would be retrieved given the filters provided @@ -7659,7 +7659,7 @@ paths: summary: Count ParameterTypes tags: - ParameterTypes - /parametertypes/findone: + /datagateway-api/parametertypes/findone: get: description: Retrieves the first ParameterType objects that satisfies the filters. parameters: @@ -7687,7 +7687,7 @@ paths: summary: Get single ParameterType tags: - ParameterTypes - /permissiblestringvalues: + /datagateway-api/permissiblestringvalues: get: description: Retrieves a list of PermissibleStringValue objects parameters: @@ -7781,7 +7781,7 @@ paths: summary: Create new PermissibleStringValues tags: - PermissibleStringValues - /permissiblestringvalues/{id_}: + /datagateway-api/permissiblestringvalues/{id_}: delete: description: Updates PermissibleStringValue with the specified ID with details provided in the request body @@ -7868,7 +7868,7 @@ paths: summary: Update PermissibleStringValues by id tags: - PermissibleStringValues - /permissiblestringvalues/count: + /datagateway-api/permissiblestringvalues/count: get: description: Return the count of the PermissibleStringValue objects that would be retrieved given the filters provided @@ -7894,7 +7894,7 @@ paths: summary: Count PermissibleStringValues tags: - PermissibleStringValues - /permissiblestringvalues/findone: + /datagateway-api/permissiblestringvalues/findone: get: description: Retrieves the first PermissibleStringValue objects that satisfies the filters. @@ -7924,7 +7924,7 @@ paths: summary: Get single PermissibleStringValue tags: - PermissibleStringValues - /publicsteps: + /datagateway-api/publicsteps: get: description: Retrieves a list of PublicStep objects parameters: @@ -8018,7 +8018,7 @@ paths: summary: Create new PublicSteps tags: - PublicSteps - /publicsteps/{id_}: + /datagateway-api/publicsteps/{id_}: delete: description: Updates PublicStep with the specified ID with details provided in the request body @@ -8105,7 +8105,7 @@ paths: summary: Update PublicSteps by id tags: - PublicSteps - /publicsteps/count: + /datagateway-api/publicsteps/count: get: description: Return the count of the PublicStep objects that would be retrieved given the filters provided @@ -8131,7 +8131,7 @@ paths: summary: Count PublicSteps tags: - PublicSteps - /publicsteps/findone: + /datagateway-api/publicsteps/findone: get: description: Retrieves the first PublicStep objects that satisfies the filters. parameters: @@ -8159,7 +8159,7 @@ paths: summary: Get single PublicStep tags: - PublicSteps - /publications: + /datagateway-api/publications: get: description: Retrieves a list of Publication objects parameters: @@ -8253,7 +8253,7 @@ paths: summary: Create new Publications tags: - Publications - /publications/{id_}: + /datagateway-api/publications/{id_}: delete: description: Updates Publication with the specified ID with details provided in the request body @@ -8340,7 +8340,7 @@ paths: summary: Update Publications by id tags: - Publications - /publications/count: + /datagateway-api/publications/count: get: description: Return the count of the Publication objects that would be retrieved given the filters provided @@ -8366,7 +8366,7 @@ paths: summary: Count Publications tags: - Publications - /publications/findone: + /datagateway-api/publications/findone: get: description: Retrieves the first Publication objects that satisfies the filters. parameters: @@ -8394,7 +8394,7 @@ paths: summary: Get single Publication tags: - Publications - /relateddatafiles: + /datagateway-api/relateddatafiles: get: description: Retrieves a list of RelatedDatafile objects parameters: @@ -8488,7 +8488,7 @@ paths: summary: Create new RelatedDatafiles tags: - RelatedDatafiles - /relateddatafiles/{id_}: + /datagateway-api/relateddatafiles/{id_}: delete: description: Updates RelatedDatafile with the specified ID with details provided in the request body @@ -8575,7 +8575,7 @@ paths: summary: Update RelatedDatafiles by id tags: - RelatedDatafiles - /relateddatafiles/count: + /datagateway-api/relateddatafiles/count: get: description: Return the count of the RelatedDatafile objects that would be retrieved given the filters provided @@ -8601,7 +8601,7 @@ paths: summary: Count RelatedDatafiles tags: - RelatedDatafiles - /relateddatafiles/findone: + /datagateway-api/relateddatafiles/findone: get: description: Retrieves the first RelatedDatafile objects that satisfies the filters. @@ -8630,7 +8630,7 @@ paths: summary: Get single RelatedDatafile tags: - RelatedDatafiles - /rules: + /datagateway-api/rules: get: description: Retrieves a list of Rule objects parameters: @@ -8723,7 +8723,7 @@ paths: summary: Create new Rules tags: - Rules - /rules/{id_}: + /datagateway-api/rules/{id_}: delete: description: Updates Rule with the specified ID with details provided in the request body @@ -8810,7 +8810,7 @@ paths: summary: Update Rules by id tags: - Rules - /rules/count: + /datagateway-api/rules/count: get: description: Return the count of the Rule objects that would be retrieved given the filters provided @@ -8836,7 +8836,7 @@ paths: summary: Count Rules tags: - Rules - /rules/findone: + /datagateway-api/rules/findone: get: description: Retrieves the first Rule objects that satisfies the filters. parameters: @@ -8864,7 +8864,7 @@ paths: summary: Get single Rule tags: - Rules - /sampleparameters: + /datagateway-api/sampleparameters: get: description: Retrieves a list of SampleParameter objects parameters: @@ -8958,7 +8958,7 @@ paths: summary: Create new SampleParameters tags: - SampleParameters - /sampleparameters/{id_}: + /datagateway-api/sampleparameters/{id_}: delete: description: Updates SampleParameter with the specified ID with details provided in the request body @@ -9045,7 +9045,7 @@ paths: summary: Update SampleParameters by id tags: - SampleParameters - /sampleparameters/count: + /datagateway-api/sampleparameters/count: get: description: Return the count of the SampleParameter objects that would be retrieved given the filters provided @@ -9071,7 +9071,7 @@ paths: summary: Count SampleParameters tags: - SampleParameters - /sampleparameters/findone: + /datagateway-api/sampleparameters/findone: get: description: Retrieves the first SampleParameter objects that satisfies the filters. @@ -9100,7 +9100,7 @@ paths: summary: Get single SampleParameter tags: - SampleParameters - /sampletypes: + /datagateway-api/sampletypes: get: description: Retrieves a list of SampleType objects parameters: @@ -9194,7 +9194,7 @@ paths: summary: Create new SampleTypes tags: - SampleTypes - /sampletypes/{id_}: + /datagateway-api/sampletypes/{id_}: delete: description: Updates SampleType with the specified ID with details provided in the request body @@ -9281,7 +9281,7 @@ paths: summary: Update SampleTypes by id tags: - SampleTypes - /sampletypes/count: + /datagateway-api/sampletypes/count: get: description: Return the count of the SampleType objects that would be retrieved given the filters provided @@ -9307,7 +9307,7 @@ paths: summary: Count SampleTypes tags: - SampleTypes - /sampletypes/findone: + /datagateway-api/sampletypes/findone: get: description: Retrieves the first SampleType objects that satisfies the filters. parameters: @@ -9335,7 +9335,7 @@ paths: summary: Get single SampleType tags: - SampleTypes - /samples: + /datagateway-api/samples: get: description: Retrieves a list of Sample objects parameters: @@ -9428,7 +9428,7 @@ paths: summary: Create new Samples tags: - Samples - /samples/{id_}: + /datagateway-api/samples/{id_}: delete: description: Updates Sample with the specified ID with details provided in the request body @@ -9515,7 +9515,7 @@ paths: summary: Update Samples by id tags: - Samples - /samples/count: + /datagateway-api/samples/count: get: description: Return the count of the Sample objects that would be retrieved given the filters provided @@ -9541,7 +9541,7 @@ paths: summary: Count Samples tags: - Samples - /samples/findone: + /datagateway-api/samples/findone: get: description: Retrieves the first Sample objects that satisfies the filters. parameters: @@ -9569,7 +9569,7 @@ paths: summary: Get single Sample tags: - Samples - /shifts: + /datagateway-api/shifts: get: description: Retrieves a list of Shift objects parameters: @@ -9662,7 +9662,7 @@ paths: summary: Create new Shifts tags: - Shifts - /shifts/{id_}: + /datagateway-api/shifts/{id_}: delete: description: Updates Shift with the specified ID with details provided in the request body @@ -9749,7 +9749,7 @@ paths: summary: Update Shifts by id tags: - Shifts - /shifts/count: + /datagateway-api/shifts/count: get: description: Return the count of the Shift objects that would be retrieved given the filters provided @@ -9775,7 +9775,7 @@ paths: summary: Count Shifts tags: - Shifts - /shifts/findone: + /datagateway-api/shifts/findone: get: description: Retrieves the first Shift objects that satisfies the filters. parameters: @@ -9803,7 +9803,7 @@ paths: summary: Get single Shift tags: - Shifts - /studies: + /datagateway-api/studies: get: description: Retrieves a list of Study objects parameters: @@ -9896,7 +9896,7 @@ paths: summary: Create new Studies tags: - Studies - /studies/{id_}: + /datagateway-api/studies/{id_}: delete: description: Updates Study with the specified ID with details provided in the request body @@ -9983,7 +9983,7 @@ paths: summary: Update Studies by id tags: - Studies - /studies/count: + /datagateway-api/studies/count: get: description: Return the count of the Study objects that would be retrieved given the filters provided @@ -10009,7 +10009,7 @@ paths: summary: Count Studies tags: - Studies - /studies/findone: + /datagateway-api/studies/findone: get: description: Retrieves the first Study objects that satisfies the filters. parameters: @@ -10037,7 +10037,7 @@ paths: summary: Get single Study tags: - Studies - /studyinvestigations: + /datagateway-api/studyinvestigations: get: description: Retrieves a list of StudyInvestigation objects parameters: @@ -10131,7 +10131,7 @@ paths: summary: Create new StudyInvestigations tags: - StudyInvestigations - /studyinvestigations/{id_}: + /datagateway-api/studyinvestigations/{id_}: delete: description: Updates StudyInvestigation with the specified ID with details provided in the request body @@ -10218,7 +10218,7 @@ paths: summary: Update StudyInvestigations by id tags: - StudyInvestigations - /studyinvestigations/count: + /datagateway-api/studyinvestigations/count: get: description: Return the count of the StudyInvestigation objects that would be retrieved given the filters provided @@ -10244,7 +10244,7 @@ paths: summary: Count StudyInvestigations tags: - StudyInvestigations - /studyinvestigations/findone: + /datagateway-api/studyinvestigations/findone: get: description: Retrieves the first StudyInvestigation objects that satisfies the filters. @@ -10273,7 +10273,7 @@ paths: summary: Get single StudyInvestigation tags: - StudyInvestigations - /usergroups: + /datagateway-api/usergroups: get: description: Retrieves a list of UserGroup objects parameters: @@ -10367,7 +10367,7 @@ paths: summary: Create new UserGroups tags: - UserGroups - /usergroups/{id_}: + /datagateway-api/usergroups/{id_}: delete: description: Updates UserGroup with the specified ID with details provided in the request body @@ -10454,7 +10454,7 @@ paths: summary: Update UserGroups by id tags: - UserGroups - /usergroups/count: + /datagateway-api/usergroups/count: get: description: Return the count of the UserGroup objects that would be retrieved given the filters provided @@ -10480,7 +10480,7 @@ paths: summary: Count UserGroups tags: - UserGroups - /usergroups/findone: + /datagateway-api/usergroups/findone: get: description: Retrieves the first UserGroup objects that satisfies the filters. parameters: @@ -10508,7 +10508,7 @@ paths: summary: Get single UserGroup tags: - UserGroups - /users: + /datagateway-api/users: get: description: Retrieves a list of User objects parameters: @@ -10601,7 +10601,7 @@ paths: summary: Create new Users tags: - Users - /users/{id_}: + /datagateway-api/users/{id_}: delete: description: Updates User with the specified ID with details provided in the request body @@ -10688,7 +10688,7 @@ paths: summary: Update Users by id tags: - Users - /users/count: + /datagateway-api/users/count: get: description: Return the count of the User objects that would be retrieved given the filters provided @@ -10714,7 +10714,7 @@ paths: summary: Count Users tags: - Users - /users/findone: + /datagateway-api/users/findone: get: description: Retrieves the first User objects that satisfies the filters. parameters: @@ -10742,7 +10742,7 @@ paths: summary: Get single User tags: - Users - /sessions: + /datagateway-api/sessions: delete: description: Deletes a users sessionID when they logout responses: @@ -10842,7 +10842,7 @@ paths: summary: Refresh session tags: - Sessions - /instruments/{id_}/facilitycycles: + /datagateway-api/instruments/{id_}/facilitycycles: get: description: Given an Instrument id get facility cycles where the instrument has investigations that occur within that cycle, subject to the given filters @@ -10880,7 +10880,7 @@ paths: summary: Get an Instrument's FacilityCycles tags: - FacilityCycles - /instruments/{id_}/facilitycycles/count: + /datagateway-api/instruments/{id_}/facilitycycles/count: get: description: Return the count of the Facility Cycles that have investigations that occur within that cycle on the specified instrument that would be retrieved @@ -10913,7 +10913,7 @@ paths: summary: Count an Instrument's FacilityCycles tags: - FacilityCycles - /instruments/{instrument_id}/facilitycycles/{cycle_id}/investigations: + /datagateway-api/instruments/{instrument_id}/facilitycycles/{cycle_id}/investigations: get: description: Given an Instrument id and Facility Cycle id, get the investigations that occur within that cycle on that instrument, subject to the given filters @@ -10957,7 +10957,7 @@ paths: summary: Get the investigations for a given Facility Cycle & Instrument tags: - Investigations - /instruments/{instrument_id}/facilitycycles/{cycle_id}/investigations/count: + /datagateway-api/instruments/{instrument_id}/facilitycycles/{cycle_id}/investigations/count: get: description: Given an Instrument id and Facility Cycle id, get the number of investigations that occur within that cycle on that instrument, subject to @@ -10996,7 +10996,7 @@ paths: summary: Count investigations for a given Facility Cycle & Instrument tags: - Investigations - /ping: + /datagateway-api/ping: get: description: Pings the API's connection method to check responsiveness responses: @@ -11013,19 +11013,19 @@ paths: summary: Ping API connection method tags: - Ping - /search_api/datasets: + /search-api/datasets: get: {} - /search_api/datasets/{pid}: {} - /search_api/datasets/count: {} - /search_api/documents: + /search-api/datasets/{pid}: {} + /search-api/datasets/count: {} + /search-api/documents: get: {} - /search_api/documents/{pid}: {} - /search_api/documents/count: {} - /search_api/instruments: + /search-api/documents/{pid}: {} + /search-api/documents/count: {} + /search-api/instruments: get: {} - /search_api/instruments/{pid}: {} - /search_api/instruments/count: {} - /search_api/datasets/{pid}/files: {} - /search_api/datasets/{pid}/files/count: {} + /search-api/instruments/{pid}: {} + /search-api/instruments/count: {} + /search-api/datasets/{pid}/files: {} + /search-api/datasets/{pid}/files/count: {} security: - session_id: []