diff --git a/README.md b/README.md index ec1f9cb9..200d3cdc 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ ICAT API to interface with the Data Gateway - [Main](#main) - [Endpoints](#endpoints) - [Mapped classes](#mapped-classes) + - [Database Generator](#database-generator) + - [Class Diagrams](#class-diagrams-for-this-module) - [Querying and filtering](#querying-and-filtering) - [Swagger Generation](#generating-the-swagger-spec-openapiyaml) - [Authentication](#authentication) @@ -238,10 +240,12 @@ Ideally, the API would be run with: However it can be run with the flask run command as shown below: -**Warning: the host, port and debug config options will not be respected when the API is run this way** +**Warning: the host, port and debug config options will not be respected when the API is +run this way** -To use `flask run`, the enviroment variable `FLASK_APP` should be set to `src/main.py`. Once this is -set the API can be run with `flask run` while inside the root directory of the project. The `flask run` command gets installed with flask. +To use `flask run`, the enviroment variable `FLASK_APP` should be set to `src/main.py`. +Once this is set the API can be run with `flask run` while inside the root directory of +the project. The `flask run` command gets installed with flask. Examples shown: Unix @@ -265,10 +269,10 @@ More information can be found [here](http://flask.pocoo.org/docs/1.0/cli/). By default the api will run on `http://localhost:5000` and all requests are made here e.g. `http://localhost:5000/sessions` - ## Project structure -The project consists of 3 main packages: common, src and test. common contains modules shared across test and src such as the database mapping classes. -src contains the api resources and their http method definitions, and test contains tests for each endpoint. +The project consists of 3 main packages: common, src and test. common contains modules +shared across test and src such as the database mapping classes. src contains the api +resources and their http method definitions, and test contains tests for each endpoint. This is illustrated below. @@ -314,67 +318,76 @@ This is illustrated below. └── config.json ````` #### Main -`main.py` is where the flask_restful api is set up. This is where each endpoint resource class is generated and mapped -to an endpoint. +`main.py` is where the flask_restful api is set up. This is where each endpoint resource +class is generated and mapped to an endpoint. Example: - `api.add_resource(get_endpoint(entity_name, endpoints[entity_name]), f"/{entity_name.lower()}")` +```python +api.add_resource(get_endpoint(entity_name, endpoints[entity_name]), f"/{entity_name.lower()}") +``` #### Endpoints -The logic for each endpoint are within `/src/resources`. They are split into entities, non_entities and -table_endpoints. The entities package contains `entities_map` which maps entity names to their sqlalchemy -model. The `entity_endpoint` module contains the function that is used to generate endpoints at start up. -`table_endpoints` contains the endpoint classes that are table specific. Finally, non_entities contains the -session endpoint. +The logic for each endpoint are within `/src/resources`. They are split into entities, +non_entities and table_endpoints. The entities package contains `entities_map` which +maps entity names to their sqlalchemy model. The `entity_endpoint` module contains the +function that is used to generate endpoints at start up. `table_endpoints` contains the +endpoint classes that are table specific. Finally, non_entities contains the session +endpoint. #### Mapped classes -The classes mapped from the database are stored in `/common/database/models.py`. Each model was -automatically generated using sqlacodegen. A class `EntityHelper` is defined so that each model may -inherit two methods `to_dict()` and `update_from_dict(dictionary)`, both used for returning entities -and updating them, in a form easily converted to JSON. +The classes mapped from the database are stored in `/common/database/models.py`. Each +model was automatically generated using sqlacodegen. A class `EntityHelper` is defined +so that each model may inherit two methods `to_dict()` and +`update_from_dict(dictionary)`, both used for returning entities and updating them, in a +form easily converted to JSON. ## Database Generator -There is a tool to generate mock data into the database. It is located in `util/icat_db_generator.py` -By default it will generate 20 years worth of data (approx 70,000 entities). The script makes use of -`random` and `Faker` and is seeded with a seed of 1. The seed and number of years of data generated can -be changed by using the arg flags `-s` or `--seed` for the seed, and `-y` or `--years` for the number of years. -For example: -`python -m util.icat_db_generator -s 4 -y 10` Would set the seed to 4 and generate 10 years of data. +There is a tool to generate mock data into the database. It is located in +`util/icat_db_generator.py`. By default it will generate 20 years worth of data (approx +70,000 entities). The script makes use of `random` and `Faker` and is seeded with a seed +of 1. The seed and number of years of data generated can be changed by using the arg +flags `-s` or `--seed` for the seed, and `-y` or `--years` for the number of years. For +example: `python -m util.icat_db_generator -s 4 -y 10` Would set the seed to 4 and +generate 10 years of data. #### Querying and filtering: -The querying and filtering logic is located in `/common/database_helpers.py`. In this module the abstract `Query` and -`QueryFilter` classes are defined as well as their implementations. The functions that are used by various endpoints to -query the database are also in this module. -Class diagrams for this module: +The querying and filtering logic is located in `/common/database_helpers.py`. In this +module the abstract `Query` and `QueryFilter` classes are defined as well as their +implementations. The functions that are used by various endpoints to query the database +are also in this module. + + +#### Class diagrams for this module: ![image](https://user-images.githubusercontent.com/44777678/67954353-ba69ef80-fbe8-11e9-81e3-0668cea3fa35.png) ![image](https://user-images.githubusercontent.com/44777678/67954834-7fb48700-fbe9-11e9-96f3-ffefc7277ebd.png) #### Authentication -Each request requires a valid session ID to be provided in the Authorization header. This header should take the form of `{"Authorization":"Bearer "}` A session ID can be obtained by -sending a post request to `/sessions/` -All endpoint methods that require a session id are decorated with `@requires_session_id` - +Each request requires a valid session ID to be provided in the Authorization header. +This header should take the form of `{"Authorization":"Bearer "}` A session +ID can be obtained by sending a post request to `/sessions/`. All endpoint methods that +require a session id are decorated with `@requires_session_id` #### Generating the swagger spec: `openapi.yaml` -The swagger generation script is located in `/src/swagger/swagger_generator.py`. The script will only run when -the config option `generate_swagger` is set to true in `config.json`. The generator decorates the first endpoint -resource class in it's module to get the name of the entity. It then creates the correct paths using the name of the -entity and outputs the swagger spec to `openapi.yaml` - -Example of the decorator: -```python -@swagger_gen.resource_wrapper() -class DataCollectionDatasets(Resource): - @requires_session_id - @queries_records - def get(self): - return get_rows_by_filter(DATACOLLECTIONDATASET, get_filters_from_query_string()), 200 -``` +When the config option `generate_swagger` is set to true in `config.json`, a YAML +file defining the API using OpenAPI standards will be created at +`src/swagger/openapi.yaml`. [apispec](https://apispec.readthedocs.io/en/latest/) is used +to help with this, with an `APISpec()` object created in `src/main.py` which is added to +(using `APISpec.path()`) when the endpoints are created for Flask. These paths are +iterated over and ordered alphabetically, to ensure `openapi.yaml` only changes if there +have been changes to the Swagger docs of the API; without that code, Git will detect +changes on that file everytime startup occurs (preventing a clean development repo). The +contents of the `APISpec` object are written to a YAML file and is used when the user +goes to the configured (root) page in their browser. + +The endpoint related files in `src/resources/` contain `__doc__` which have the Swagger +docs for each type of endpoint. `src/resources/swagger/` contain code to aid Swagger doc +generation, with a plugin (`RestfulPlugin`) created for `apispec` to extract Swagger +documentation from `flask-restful` functions. ## Running Tests diff --git a/datagateway_api/common/database/filters.py b/datagateway_api/common/database/filters.py index ffc1d40f..485163db 100644 --- a/datagateway_api/common/database/filters.py +++ b/datagateway_api/common/database/filters.py @@ -73,6 +73,8 @@ def apply_filter(self, query): if self.operation == "eq": query.base_query = query.base_query.filter(field == self.value) + elif self.operation == "ne": + query.base_query = query.base_query.filter(field != self.value) elif self.operation == "like": query.base_query = query.base_query.filter(field.like(f"%{self.value}%")) elif self.operation == "lt": diff --git a/datagateway_api/src/main.py b/datagateway_api/src/main.py index ff922206..d7d2950b 100644 --- a/datagateway_api/src/main.py +++ b/datagateway_api/src/main.py @@ -37,18 +37,21 @@ security=[{"session_id": []}], ) -app = Flask(__name__) -cors = CORS(app) -app.url_map.strict_slashes = False -api = Api(app) - -def handle_error(e): - return str(e), e.status_code +class CustomErrorHandledApi(Api): + """ + This class overrides `handle_error` function from the API class from `flask_restful` + to correctly return response codes and exception messages from uncaught exceptions + """ + def handle_error(self, e): + return str(e), e.status_code -app.register_error_handler(ApiError, handle_error) +app = Flask(__name__) +cors = CORS(app) +app.url_map.strict_slashes = False +api = CustomErrorHandledApi(app) swaggerui_blueprint = get_swaggerui_blueprint( "", "/openapi.json", config={"app_name": "DataGateway API OpenAPI Spec"}, diff --git a/datagateway_api/src/resources/entities/entity_endpoint.py b/datagateway_api/src/resources/entities/entity_endpoint.py index 1cdf2af7..2058b345 100644 --- a/datagateway_api/src/resources/entities/entity_endpoint.py +++ b/datagateway_api/src/resources/entities/entity_endpoint.py @@ -187,7 +187,7 @@ def get(self, id_): parameters: - in: path required: true - name: id + name: id_ description: The id of the entity to retrieve schema: type: integer @@ -222,7 +222,7 @@ def delete(self, id_): parameters: - in: path required: true - name: id + name: id_ description: The id of the entity to delete schema: type: integer @@ -254,7 +254,7 @@ def patch(self, id_): parameters: - in: path required: true - name: id + name: id_ description: The id of the entity to update schema: type: integer diff --git a/datagateway_api/src/resources/table_endpoints/table_endpoints.py b/datagateway_api/src/resources/table_endpoints/table_endpoints.py index 3f246ef5..b8e4744f 100644 --- a/datagateway_api/src/resources/table_endpoints/table_endpoints.py +++ b/datagateway_api/src/resources/table_endpoints/table_endpoints.py @@ -19,7 +19,7 @@ def get(self, id_): parameters: - in: path required: true - name: id + name: id_ description: The id of the instrument to retrieve the facility cycles of schema: type: integer @@ -69,7 +69,7 @@ def get(self, id_): parameters: - in: path required: true - name: id + name: id_ description: The id of the instrument to count the facility cycles of schema: type: integer diff --git a/datagateway_api/src/swagger/initialise_spec.py b/datagateway_api/src/swagger/initialise_spec.py index 95b021b4..5ad18d80 100644 --- a/datagateway_api/src/swagger/initialise_spec.py +++ b/datagateway_api/src/swagger/initialise_spec.py @@ -26,7 +26,9 @@ def initialise_spec(spec): "in": "query", "name": "where", "description": "Apply where filters to the query. The possible operators" - " are like, gte, lte, in and eq", + " are: ne, like, lt, lte, gt, gte, in and eq. Please modify the examples" + " before executing a request if you are having issues with the example" + " values.", "schema": { "type": "array", "items": { @@ -54,9 +56,28 @@ def initialise_spec(spec): }, { "type": "object", - "title": "Greater than or equal", + "title": "Inequality", "properties": { - "gte": { + "ne": { + "oneOf": [ + {"type": "string"}, + {"type": "number"}, + {"type": "integer"}, + {"type": "boolean"}, + ] + } + }, + }, + { + "type": "object", + "title": "Substring equality", + "properties": {"like": {"type": "string"}}, + }, + { + "type": "object", + "title": "Less than", + "properties": { + "lt": { "oneOf": [ {"type": "number"}, {"type": "integer"}, @@ -78,8 +99,27 @@ def initialise_spec(spec): }, { "type": "object", - "title": "Substring equality", - "properties": {"like": {"type": "string"}}, + "title": "Greater than", + "properties": { + "gt": { + "oneOf": [ + {"type": "number"}, + {"type": "integer"}, + ] + } + }, + }, + { + "type": "object", + "title": "Greater than or equal", + "properties": { + "gte": { + "oneOf": [ + {"type": "number"}, + {"type": "integer"}, + ] + } + }, }, { "type": "object", @@ -102,11 +142,14 @@ def initialise_spec(spec): }, }, "examples": { - "eq": {"value": [{"ID": {"eq": 1}}]}, - "like": {"value": [{"NAME": {"like": "dog"}}]}, - "gte": {"value": [{"ID": {"gte": 50}}]}, - "lte": {"value": [{"ID": {"lte": 50}}]}, - "in": {"value": [{"ID": {"in": [1, 2, 3]}}]}, + "eq": {"value": [{"id": {"eq": 1}}]}, + "ne": {"value": [{"id": {"ne": 1}}]}, + "like": {"value": [{"name": {"like": "dog"}}]}, + "lt": {"value": [{"id": {"lt": 10}}]}, + "lte": {"value": [{"id": {"lte": 50}}]}, + "gt": {"value": [{"id": {"gt": 10}}]}, + "gte": {"value": [{"id": {"gte": 50}}]}, + "in": {"value": [{"id": {"in": [1, 2, 3]}}]}, }, }, ) @@ -120,7 +163,7 @@ def initialise_spec(spec): "description": "Apply order filters to the query. Given a field and" " direction, order the returned entities.", "schema": {"type": "array", "items": {"type": "string"}}, - "examples": {"asc": {"value": ["ID asc"]}, "desc": {"value": ["ID desc"]}}, + "examples": {"asc": {"value": ["id asc"]}, "desc": {"value": ["id desc"]}}, }, ) diff --git a/datagateway_api/src/swagger/openapi.yaml b/datagateway_api/src/swagger/openapi.yaml index 6bde92cb..f52c1b93 100644 --- a/datagateway_api/src/swagger/openapi.yaml +++ b/datagateway_api/src/swagger/openapi.yaml @@ -69,10 +69,10 @@ components: examples: asc: value: - - ID asc + - id asc desc: value: - - ID desc + - id desc in: query name: order schema: @@ -88,31 +88,44 @@ components: type: integer WHERE_FILTER: description: Apply where filters to the query. The possible operators are like, - gte, lte, in and eq + gte, lte, in and eq. Please modify the examples before executing a request + if you are having issues with the example values. examples: eq: value: - - ID: + - id: eq: 1 + gt: + value: + - id: + gt: 10 gte: value: - - ID: + - id: gte: 50 in: value: - - ID: + - id: in: - 1 - 2 - 3 like: value: - - NAME: + - name: like: dog + lt: + value: + - id: + lt: 10 lte: value: - - ID: + - id: lte: 50 + ne: + value: + - id: + ne: 1 in: query name: where schema: @@ -132,11 +145,25 @@ components: title: Equality type: object - properties: - gte: + ne: oneOf: + - type: string - type: number - type: integer - title: Greater than or equal + - type: boolean + title: Inequality + type: object + - properties: + like: + type: string + title: Substring equality + type: object + - properties: + lt: + oneOf: + - type: number + - type: integer + title: Less than type: object - properties: lte: @@ -146,9 +173,18 @@ components: title: Less than or equal type: object - properties: - like: - type: string - title: Substring equality + gt: + oneOf: + - type: number + - type: integer + title: Greater than + type: object + - properties: + gte: + oneOf: + - type: number + - type: integer + title: Greater than or equal type: object - properties: in: @@ -1860,7 +1896,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -1883,7 +1919,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -1911,7 +1947,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -2095,7 +2131,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -2118,7 +2154,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -2146,7 +2182,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -2332,7 +2368,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -2355,7 +2391,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -2383,7 +2419,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -2570,7 +2606,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -2593,7 +2629,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -2621,7 +2657,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -2807,7 +2843,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -2830,7 +2866,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -2858,7 +2894,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -3042,7 +3078,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -3065,7 +3101,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -3093,7 +3129,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -3277,7 +3313,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -3300,7 +3336,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -3328,7 +3364,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -3513,7 +3549,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -3536,7 +3572,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -3564,7 +3600,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -3748,7 +3784,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -3771,7 +3807,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -3799,7 +3835,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -3984,7 +4020,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -4007,7 +4043,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -4035,7 +4071,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -4219,7 +4255,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -4242,7 +4278,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -4270,7 +4306,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -4454,7 +4490,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -4477,7 +4513,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -4505,7 +4541,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -4689,7 +4725,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -4712,7 +4748,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -4740,7 +4776,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -4924,7 +4960,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -4947,7 +4983,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -4975,7 +5011,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -5159,7 +5195,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -5182,7 +5218,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -5210,7 +5246,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -5395,7 +5431,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -5418,7 +5454,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -5446,7 +5482,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -5630,7 +5666,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -5653,7 +5689,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -5681,7 +5717,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -5867,7 +5903,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -5890,7 +5926,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -5918,7 +5954,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -6104,7 +6140,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -6127,7 +6163,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -6155,7 +6191,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -6341,7 +6377,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -6364,7 +6400,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -6392,7 +6428,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -6577,7 +6613,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -6600,7 +6636,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -6628,7 +6664,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -6813,7 +6849,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -6836,7 +6872,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -6864,7 +6900,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -7047,7 +7083,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -7070,7 +7106,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -7098,7 +7134,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -7282,7 +7318,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -7305,7 +7341,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -7333,7 +7369,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -7517,7 +7553,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -7540,7 +7576,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -7568,7 +7604,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -7752,7 +7788,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -7775,7 +7811,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -7803,7 +7839,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -7989,7 +8025,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -8012,7 +8048,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -8040,7 +8076,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -8224,7 +8260,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -8247,7 +8283,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -8275,7 +8311,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -8459,7 +8495,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -8482,7 +8518,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -8510,7 +8546,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -8694,7 +8730,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -8717,7 +8753,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -8745,7 +8781,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -8929,7 +8965,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -8952,7 +8988,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -8980,7 +9016,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -9165,7 +9201,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -9188,7 +9224,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -9216,7 +9252,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -9399,7 +9435,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -9422,7 +9458,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -9450,7 +9486,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -9633,7 +9669,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -9656,7 +9692,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -9684,7 +9720,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -9867,7 +9903,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -9890,7 +9926,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -9918,7 +9954,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -10102,7 +10138,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -10125,7 +10161,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -10153,7 +10189,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -10338,7 +10374,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -10361,7 +10397,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -10389,7 +10425,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -10572,7 +10608,7 @@ paths: parameters: - description: The id of the entity to delete in: path - name: id + name: id_ required: true schema: type: integer @@ -10595,7 +10631,7 @@ paths: parameters: - description: The id of the entity to retrieve in: path - name: id + name: id_ required: true schema: type: integer @@ -10623,7 +10659,7 @@ paths: parameters: - description: The id of the entity to update in: path - name: id + name: id_ required: true schema: type: integer @@ -10813,7 +10849,7 @@ paths: parameters: - description: The id of the instrument to retrieve the facility cycles of in: path - name: id + name: id_ required: true schema: type: integer @@ -10852,7 +10888,7 @@ paths: parameters: - description: The id of the instrument to count the facility cycles of in: path - name: id + name: id_ required: true schema: type: integer