diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 7b278a67..a58010c5 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,10 @@ The required python libraries: - [flask-restful](https://github.com/flask-restful/flask-restful/) - [mypysql](https://pymysql.readthedocs.io/en/latest/) - [requests](https://2.python-requests.org/en/master/) + - [pyyaml](https://pyyaml.org/wiki/PyYAMLDocumentation) (For the swagger generation) ## Setup and running the API -The database connection needs to be set up first. This is set in config.json +The database connection needs to be set up first. This is set in config.json, an example config file called `config.json.example` is provided. To run the API from the command line, the enviroment variable `FLASK_APP` should be set to `src/main.py`. Once this is diff --git a/common/database_helpers.py b/common/database_helpers.py index b1ab390c..821dbff2 100644 --- a/common/database_helpers.py +++ b/common/database_helpers.py @@ -20,6 +20,13 @@ def __init__(self, table): self.table = table self.base_query = self.session.query(table) + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + log.info("Closing DB session") + self.session.close() + @abstractmethod def execute_query(self): pass @@ -30,8 +37,6 @@ def commit_changes(self): """ log.info(f" Commiting changes to {self.table}") self.session.commit() - log.info(f" Closing DB session") - self.session.close() class CountQuery(Query): @@ -59,7 +64,6 @@ def __init__(self, table): def commit_changes(self): log.info("Closing DB session") - self.session.close() def execute_query(self): self.commit_changes() @@ -287,8 +291,8 @@ def insert_row_into_table(table, row): :param table: The table to be inserted to :param row: The row to be inserted """ - create_query = CreateQuery(table, row) - create_query.execute_query() + with CreateQuery(table, row) as create_query: + create_query.execute_query() def create_row_from_json(table, json): @@ -298,8 +302,8 @@ def create_row_from_json(table, json): :param json: the dictionary containing the values :return: nothing atm """ - create_query = CreateQuery(table, json) - create_query.execute_query() + with CreateQuery(table, json) as create_query: + create_query.execute_query() def get_row_by_id(table, id): @@ -309,14 +313,11 @@ def get_row_by_id(table, id): :param id: the id of the record to find :return: the record retrieved """ - read_query = ReadQuery(table) - try: + with ReadQuery(table) as read_query: log.info(f" Querying {table.__tablename__} for record with ID: {id}") where_filter = WhereFilter("ID", id, "eq") where_filter.apply_filter(read_query) return read_query.get_single_result() - finally: - read_query.session.close() def delete_row_by_id(table, id): @@ -327,8 +328,8 @@ def delete_row_by_id(table, id): """ log.info(f" Deleting row from {table.__tablename__} with ID: {id}") row = get_row_by_id(table, id) - delete_query = DeleteQuery(table, row) - delete_query.execute_query() + with DeleteQuery(table, row) as delete_query: + delete_query.execute_query() def update_row_from_id(table, id, new_values): @@ -339,8 +340,8 @@ def update_row_from_id(table, id, new_values): :param new_values: A JSON string containing what columns are to be updated """ row = get_row_by_id(table, id) - update_query = UpdateQuery(table, row, new_values) - update_query.execute_query() + with UpdateQuery(table, row, new_values) as update_query: + update_query.execute_query() def get_filtered_read_query_results(filter_handler, filters, query): @@ -351,18 +352,14 @@ def get_filtered_read_query_results(filter_handler, filters, query): :param query: The query for the filters to be applied to :return: The results of the query as a list of dictionaries """ - try: - filter_handler.add_filters(filters) - filter_handler.apply_filters(query) - results = query.get_all_results() - if query.is_distinct_fields_query: - return _get_distinct_fields_as_dicts(results) - if query.include_related_entities: - return _get_results_with_include(filters, results) - return list(map(lambda x: x.to_dict(), results)) - - finally: - query.session.close() + filter_handler.add_filters(filters) + filter_handler.apply_filters(query) + results = query.get_all_results() + if query.is_distinct_fields_query: + return _get_distinct_fields_as_dicts(results) + if query.include_related_entities: + return _get_results_with_include(filters, results) + return list(map(lambda x: x.to_dict(), results)) def _get_results_with_include(filters, results): @@ -399,9 +396,9 @@ def get_rows_by_filter(table, filters): :param filters: The list of filters to be applied :return: A list of the rows returned in dictionary form """ - query = ReadQuery(table) - filter_handler = FilterOrderHandler() - return get_filtered_read_query_results(filter_handler, filters, query) + with ReadQuery(table) as query: + filter_handler = FilterOrderHandler() + return get_filtered_read_query_results(filter_handler, filters, query) def get_first_filtered_row(table, filters): @@ -424,11 +421,11 @@ def get_filtered_row_count(table, filters): """ log.info(f" getting count for {table.__tablename__}") - count_query = CountQuery(table) - filter_handler = FilterOrderHandler() - filter_handler.add_filters(filters) - filter_handler.apply_filters(count_query) - return count_query.get_count() + with CountQuery(table) as count_query: + filter_handler = FilterOrderHandler() + filter_handler.add_filters(filters) + filter_handler.apply_filters(count_query) + return count_query.get_count() def patch_entities(table, json_list): @@ -476,9 +473,9 @@ def get_investigations_for_user(user_id, filters): :param filters: The list of filters :return: A list of dictionary representations of the investigation entities """ - query = UserInvestigationsQuery(user_id) - filter_handler = FilterOrderHandler() - return get_filtered_read_query_results(filter_handler, filters, query) + with UserInvestigationsQuery(user_id) as query: + filter_handler = FilterOrderHandler() + return get_filtered_read_query_results(filter_handler, filters, query) class UserInvestigationsCountQuery(CountQuery): @@ -498,11 +495,11 @@ def get_investigations_for_user_count(user_id, filters): :param filters: The list of filters :return: The count """ - count_query = UserInvestigationsCountQuery(user_id) - filter_handler = FilterOrderHandler() - filter_handler.add_filters(filters) - filter_handler.apply_filters(count_query) - return count_query.get_count() + with UserInvestigationsCountQuery(user_id) as count_query: + filter_handler = FilterOrderHandler() + filter_handler.add_filters(filters) + filter_handler.apply_filters(count_query) + return count_query.get_count() class InstrumentFacilityCyclesQuery(ReadQuery): @@ -528,9 +525,9 @@ def get_facility_cycles_for_instrument(instrument_id, filters): :param instrument_id: The id of the instrument :return: A list of facility cycle entities """ - query = InstrumentFacilityCyclesQuery(instrument_id) - filter_handler = FilterOrderHandler() - return get_filtered_read_query_results(filter_handler, filters, query) + with InstrumentFacilityCyclesQuery(instrument_id) as query: + filter_handler = FilterOrderHandler() + return get_filtered_read_query_results(filter_handler, filters, query) def get_facility_cycles_for_instrument_count(instrument_id, filters): @@ -570,8 +567,8 @@ def get_investigations_for_instrument_in_facility_cycle(instrument_id, facility_ :return: The investigations """ filter_handler = FilterOrderHandler() - query = InstrumentFacilityCycleInvestigationsQuery(instrument_id, facility_cycle_id) - return get_filtered_read_query_results(filter_handler, filters, query) + with InstrumentFacilityCycleInvestigationsQuery(instrument_id, facility_cycle_id) as query: + return get_filtered_read_query_results(filter_handler, filters, query) def get_investigations_for_instrument_in_facility_cycle_count(instrument_id, facility_cycle_id, filters): diff --git a/src/swagger/openapi.yaml b/src/swagger/openapi.yaml index c89bf8c1..7acead22 100644 --- a/src/swagger/openapi.yaml +++ b/src/swagger/openapi.yaml @@ -1,5633 +1,6335 @@ -openapi: "3.0.0" info: + description: ICAT API to interface with the DataGateway title: DataGateway API - description: ICAT API to interface with the Data Gateway - version: "0" -servers: - - url: http://localhost:5000 - + version: '0' +openapi: 3.0.0 paths: - /datasettypes: - get: - summary: Get dataset types - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the dataset types - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of dataset types returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of dataset types returned - required: false - schema: - type: object - - name: order - in: query - description: order the dataset types by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The dataset types found. - '404': - description: When no result is found - post: - summary: Create one of more dataset types - tags: - - Entities - responses: - '200': - description: The created dataset types - patch: - summary: Update one or multiple dataset types - tags: - - Entities - responses: - 200: - description: The updated dataset types - /datasettypes/count: - get: - summary: Return the count of the dataset types - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the dataset types - required: false - schema: - type: object - responses: - 200: - description: The count of dataset types - /datasettypes/findOne: - get: - summary: Return the first dataset types matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the dataset types - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of dataset types returned - required: false - schema: - type: object - - name: order - in: query - description: order the dataset types by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first dataset types matching - /datasettypes/{id}: + /applications: get: - summary: Find the dataset types matching the given ID - tags: - - Entities parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the dataset types + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '200': - description: The matching dataset types + '200': + description: The applications found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no dataset types matches the given ID - delete: - summary: Delete the dataset types matching the given ID + description: When no results are found + summary: Get applications based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the dataset types - responses: - '203': - description: Blank responses, when the dataset types is deleted - '404': - description: When the dataset types can't be found + - entities patch: - summary: Update the dataset types matching the given ID - tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the dataset types + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple applications + required: true responses: '200': - description: The updated dataset types - '404': - description: When the dataset types can't be found - /applications: - get: - summary: Get applications - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the applications - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of applications returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of applications returned - required: false - schema: - type: object - - name: order - in: query - description: order the applications by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The applications found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more applications + description: When the entity to update could not be found + summary: Update applications tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple applications + required: true responses: - '200': + '200': description: The created applications - patch: - summary: Update one or multiple applications + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new applications tags: - - Entities - responses: - 200: - description: The updated applications + - entities /applications/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the applications + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the applications tags: - - Entities + - entities + /applications/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the applications - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of applications - /applications/findOne: - get: - summary: Return the first applications matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the applications - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of applications returned - required: false - schema: - type: object - - name: order - in: query - description: order the applications by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first applications matching - /applications/{id}: - get: - summary: Find the applications matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the applications matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the applications + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching applications + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no applications matches the given ID - delete: - summary: Delete the applications matching the given ID + description: When no result is found + summary: Find the applications matching the ID tags: - - Entities + - entities + /datacollectiondatafiles: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the applications + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the applications is deleted + '200': + description: The data collection datafiles found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the applications can't be found - patch: - summary: Update the applications matching the given ID + description: When no results are found + summary: Get data collection datafiles based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the applications + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple data collection datafiles + required: true responses: '200': - description: The updated applications - '404': - description: When the applications can't be found - /datacollectiondatafiles: - get: - summary: Get data collection datafiles - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the data collection datafiles - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of data collection datafiles returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of data collection datafiles returned - required: false - schema: - type: object - - name: order - in: query - description: order the data collection datafiles by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The data collection datafiles found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more data collection datafiles + description: When the entity to update could not be found + summary: Update data collection datafiles tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple data collection datafiles + required: true responses: - '200': + '200': description: The created data collection datafiles - patch: - summary: Update one or multiple data collection datafiles + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new data collection datafiles tags: - - Entities - responses: - 200: - description: The updated data collection datafiles + - entities /datacollectiondatafiles/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the data collection datafiles + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the data collection datafiles tags: - - Entities + - entities + /datacollectiondatafiles/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the data collection datafiles - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of data collection datafiles - /datacollectiondatafiles/findOne: - get: - summary: Return the first data collection datafiles matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the data collection datafiles - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of data collection datafiles returned - required: false - schema: - type: object - - name: order - in: query - description: order the data collection datafiles by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first data collection datafiles matching - /datacollectiondatafiles/{id}: - get: - summary: Find the data collection datafiles matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the data collection datafiles matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the data collection datafiles + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching data collection datafiles + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no data collection datafiles matches the given ID - delete: - summary: Delete the data collection datafiles matching the given ID + description: When no result is found + summary: Find the data collection datafiles matching the ID tags: - - Entities + - entities + /datacollectiondatasets: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the data collection datafiles + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the data collection datafiles is deleted + '200': + description: The data collection datasets found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the data collection datafiles can't be found - patch: - summary: Update the data collection datafiles matching the given ID + description: When no results are found + summary: Get data collection datasets based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the data collection datafiles + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple data collection datasets + required: true responses: '200': - description: The updated data collection datafiles - '404': - description: When the data collection datafiles can't be found - /datacollectiondatasets: - get: - summary: Get data collection datasets - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the data collection datasets - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of data collection datasets returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of data collection datasets returned - required: false - schema: - type: object - - name: order - in: query - description: order the data collection datasets by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The data collection datasets found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more data collection datasets + description: When the entity to update could not be found + summary: Update data collection datasets tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple data collection datasets + required: true responses: - '200': + '200': description: The created data collection datasets - patch: - summary: Update one or multiple data collection datasets + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new data collection datasets tags: - - Entities - responses: - 200: - description: The updated data collection datasets + - entities /datacollectiondatasets/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the data collection datasets + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the data collection datasets tags: - - Entities + - entities + /datacollectiondatasets/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the data collection datasets - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of data collection datasets - /datacollectiondatasets/findOne: - get: - summary: Return the first data collection datasets matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the data collection datasets - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of data collection datasets returned - required: false - schema: - type: object - - name: order - in: query - description: order the data collection datasets by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first data collection datasets matching - /datacollectiondatasets/{id}: - get: - summary: Find the data collection datasets matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the data collection datasets matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the data collection datasets + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching data collection datasets + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no data collection datasets matches the given ID - delete: - summary: Delete the data collection datasets matching the given ID + description: When no result is found + summary: Find the data collection datasets matching the ID tags: - - Entities + - entities + /datacollectionparameters: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the data collection datasets + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the data collection datasets is deleted + '200': + description: The data collection parameters found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the data collection datasets can't be found - patch: - summary: Update the data collection datasets matching the given ID + description: When no results are found + summary: Get data collection parameters based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the data collection datasets + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple data collection parameters + required: true responses: '200': - description: The updated data collection datasets - '404': - description: When the data collection datasets can't be found - /datacollectionparameters: - get: - summary: Get data collection parameters - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the data collection parameters - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of data collection parameters returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of data collection parameters returned - required: false - schema: - type: object - - name: order - in: query - description: order the data collection parameters by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The data collection parameters found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more data collection parameters + description: When the entity to update could not be found + summary: Update data collection parameters tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple data collection parameters + required: true responses: - '200': + '200': description: The created data collection parameters - patch: - summary: Update one or multiple data collection parameters + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new data collection parameters tags: - - Entities - responses: - 200: - description: The updated data collection parameters + - entities /datacollectionparameters/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the data collection parameters + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the data collection parameters tags: - - Entities + - entities + /datacollectionparameters/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the data collection parameters - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of data collection parameters - /datacollectionparameters/findOne: - get: - summary: Return the first data collection parameters matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the data collection parameters - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of data collection parameters returned - required: false - schema: - type: object - - name: order - in: query - description: order the data collection parameters by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first data collection parameters matching - /datacollectionparameters/{id}: - get: - summary: Find the data collection parameters matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the data collection parameters matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the data collection parameters + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching data collection parameters + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no data collection parameters matches the given ID - delete: - summary: Delete the data collection parameters matching the given ID + description: When no result is found + summary: Find the data collection parameters matching the ID tags: - - Entities + - entities + /datacollections: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the data collection parameters + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the data collection parameters is deleted + '200': + description: The data collections found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the data collection parameters can't be found - patch: - summary: Update the data collection parameters matching the given ID + description: When no results are found + summary: Get data collections based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the data collection parameters + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple data collections + required: true responses: '200': - description: The updated data collection parameters - '404': - description: When the data collection parameters can't be found - /datacollections: - get: - summary: Get data collections - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the data collections - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of data collections returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of data collections returned - required: false - schema: - type: object - - name: order - in: query - description: order the data collections by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The data collections found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more data collections + description: When the entity to update could not be found + summary: Update data collections tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple data collections + required: true responses: - '200': + '200': description: The created data collections - patch: - summary: Update one or multiple data collections + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new data collections tags: - - Entities - responses: - 200: - description: The updated data collections + - entities /datacollections/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the data collections + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the data collections tags: - - Entities + - entities + /datacollections/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the data collections - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of data collections - /datacollections/findOne: - get: - summary: Return the first data collections matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the data collections - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of data collections returned - required: false - schema: - type: object - - name: order - in: query - description: order the data collections by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first data collections matching - /datacollections/{id}: - get: - summary: Find the data collections matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the data collections matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the data collections + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching data collections + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no data collections matches the given ID - delete: - summary: Delete the data collections matching the given ID + description: When no result is found + summary: Find the data collections matching the ID tags: - - Entities + - entities + /datafileformats: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the data collections + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the data collections is deleted + '200': + description: The datafile formats found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the data collections can't be found - patch: - summary: Update the data collections matching the given ID + description: When no results are found + summary: Get datafile formats based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the data collections + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple datafile formats + required: true responses: '200': - description: The updated data collections - '404': - description: When the data collections can't be found - /datafileformats: - get: - summary: Get datafile formats - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the datafile formats - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of datafile formats returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of datafile formats returned - required: false - schema: - type: object - - name: order - in: query - description: order the datafile formats by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The datafile formats found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more datafile formats + description: When the entity to update could not be found + summary: Update datafile formats tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple datafile formats + required: true responses: - '200': + '200': description: The created datafile formats - patch: - summary: Update one or multiple datafile formats + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new datafile formats tags: - - Entities - responses: - 200: - description: The updated datafile formats + - entities /datafileformats/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the datafile formats + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the datafile formats tags: - - Entities + - entities + /datafileformats/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the datafile formats - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of datafile formats - /datafileformats/findOne: - get: - summary: Return the first datafile formats matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the datafile formats - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of datafile formats returned - required: false - schema: - type: object - - name: order - in: query - description: order the datafile formats by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first datafile formats matching - /datafileformats/{id}: - get: - summary: Find the datafile formats matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the datafile formats matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the datafile formats + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching datafile formats + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no datafile formats matches the given ID - delete: - summary: Delete the datafile formats matching the given ID + description: When no result is found + summary: Find the datafile formats matching the ID tags: - - Entities + - entities + /datafileparameters: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the datafile formats + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the datafile formats is deleted + '200': + description: The datafile parameters found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the datafile formats can't be found - patch: - summary: Update the datafile formats matching the given ID + description: When no results are found + summary: Get datafile parameters based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the datafile formats + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple datafile parameters + required: true responses: '200': - description: The updated datafile formats - '404': - description: When the datafile formats can't be found - /datafileparameters: - get: - summary: Get datafile parameters - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the datafile parameters - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of datafile parameters returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of datafile parameters returned - required: false - schema: - type: object - - name: order - in: query - description: order the datafile parameters by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The datafile parameters found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more datafile parameters + description: When the entity to update could not be found + summary: Update datafile parameters tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple datafile parameters + required: true responses: - '200': + '200': description: The created datafile parameters - patch: - summary: Update one or multiple datafile parameters + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new datafile parameters tags: - - Entities - responses: - 200: - description: The updated datafile parameters + - entities /datafileparameters/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the datafile parameters + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the datafile parameters tags: - - Entities + - entities + /datafileparameters/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the datafile parameters - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of datafile parameters - /datafileparameters/findOne: - get: - summary: Return the first datafile parameters matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the datafile parameters - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of datafile parameters returned - required: false - schema: - type: object - - name: order - in: query - description: order the datafile parameters by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first datafile parameters matching - /datafileparameters/{id}: - get: - summary: Find the datafile parameters matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the datafile parameters matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the datafile parameters + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching datafile parameters + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no datafile parameters matches the given ID - delete: - summary: Delete the datafile parameters matching the given ID + description: When no result is found + summary: Find the datafile parameters matching the ID tags: - - Entities + - entities + /datafiles: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the datafile parameters + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the datafile parameters is deleted + '200': + description: The datafiles found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the datafile parameters can't be found - patch: - summary: Update the datafile parameters matching the given ID + description: When no results are found + summary: Get datafiles based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the datafile parameters + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple datafiles + required: true responses: '200': - description: The updated datafile parameters - '404': - description: When the datafile parameters can't be found - /datafiles: - get: - summary: Get datafiles - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the datafiles - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of datafiles returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of datafiles returned - required: false - schema: - type: object - - name: order - in: query - description: order the datafiles by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The datafiles found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more datafiles + description: When the entity to update could not be found + summary: Update datafiles tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple datafiles + required: true responses: - '200': + '200': description: The created datafiles - patch: - summary: Update one or multiple datafiles + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new datafiles tags: - - Entities - responses: - 200: - description: The updated datafiles + - entities /datafiles/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the datafiles + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the datafiles tags: - - Entities + - entities + /datafiles/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the datafiles - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of datafiles - /datafiles/findOne: - get: - summary: Return the first datafiles matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the datafiles - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of datafiles returned - required: false - schema: - type: object - - name: order - in: query - description: order the datafiles by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first datafiles matching - /datafiles/{id}: - get: - summary: Find the datafiles matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the datafiles matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the datafiles + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching datafiles + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no datafiles matches the given ID - delete: - summary: Delete the datafiles matching the given ID + description: When no result is found + summary: Find the datafiles matching the ID tags: - - Entities + - entities + /datasets: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the datafiles + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the datafiles is deleted + '200': + description: The datasets found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the datafiles can't be found - patch: - summary: Update the datafiles matching the given ID + description: When no results are found + summary: Get datasets based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the datafiles + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple datasets + required: true responses: '200': - description: The updated datafiles - '404': - description: When the datafiles can't be found - /datasets: - get: - summary: Get datasets - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the datasets - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of datasets returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of datasets returned - required: false - schema: - type: object - - name: order - in: query - description: order the datasets by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The datasets found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more datasets + description: When the entity to update could not be found + summary: Update datasets tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple datasets + required: true responses: - '200': + '200': description: The created datasets - patch: - summary: Update one or multiple datasets + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new datasets tags: - - Entities - responses: - 200: - description: The updated datasets + - entities /datasets/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the datasets + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the datasets tags: - - Entities + - entities + /datasets/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the datasets - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of datasets - /datasets/findOne: - get: - summary: Return the first datasets matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the datasets - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of datasets returned - required: false - schema: - type: object - - name: order - in: query - description: order the datasets by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first datasets matching - /datasets/{id}: - get: - summary: Find the datasets matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the datasets matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the datasets + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching datasets + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no datasets matches the given ID - delete: - summary: Delete the datasets matching the given ID + description: When no result is found + summary: Find the datasets matching the ID tags: - - Entities + - entities + /datasettypes: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the datasets + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the datasets is deleted + '200': + description: The dataset types found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the datasets can't be found + description: When no results are found + summary: Get dataset types based on filters + tags: + - entities patch: - summary: Update the datasets matching the given ID + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple dataset types + required: true + responses: + '200': + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity to update could not be found + summary: Update dataset types tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple dataset types + required: true + responses: + '200': + description: The created dataset types + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new dataset types + tags: + - entities + /datasettypes/count: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the datasets + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object responses: '200': - description: The updated datasets + description: The count of the dataset types + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given + summary: Return the count of the dataset types + tags: + - entities + /datasettypes/{id}: + delete: + parameters: + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer + responses: + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the datasets can't be found - /facilities: + description: When the entity can't be found + summary: Delete the dataset types matching the ID + tags: + - entities get: - summary: Get facilities - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the facilities - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of facilities returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of facilities returned - required: false - schema: - type: object - - name: order - in: query - description: order the facilities by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The facilities found. + parameters: + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer + responses: + '200': + description: The matching dataset types + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': description: When no result is found - post: - summary: Create one of more facilities + summary: Find the dataset types matching the ID tags: - - Entities + - entities + /facilities: + get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '200': - description: The created facilities + '200': + description: The facilities found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When no results are found + summary: Get facilities based on filters + tags: + - entities patch: - summary: Update one or multiple facilities + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple facilities + required: true + responses: + '200': + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity to update could not be found + summary: Update facilities tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple facilities + required: true responses: - 200: - description: The updated facilities + '200': + description: The created facilities + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new facilities + tags: + - entities /facilities/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the facilities + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the facilities tags: - - Entities + - entities + /facilities/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the facilities - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of facilities - /facilities/findOne: - get: - summary: Return the first facilities matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the facilities - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of facilities returned - required: false - schema: - type: object - - name: order - in: query - description: order the facilities by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first facilities matching - /facilities/{id}: - get: - summary: Find the facilities matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the facilities matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the facilities + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching facilities + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no facilities matches the given ID - delete: - summary: Delete the facilities matching the given ID + description: When no result is found + summary: Find the facilities matching the ID tags: - - Entities + - entities + /facilitycycles: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the facilities + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the facilities is deleted + '200': + description: The facility cycles found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the facilities can't be found - patch: - summary: Update the facilities matching the given ID + description: When no results are found + summary: Get facility cycles based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the facilities + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple facility cycles + required: true responses: '200': - description: The updated facilities - '404': - description: When the facilities can't be found - /facilitycycles: - get: - summary: Get facility cycles - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the facility cycles - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of facility cycles returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of facility cycles returned - required: false - schema: - type: object - - name: order - in: query - description: order the facility cycles by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The facility cycles found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more facility cycles + description: When the entity to update could not be found + summary: Update facility cycles tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple facility cycles + required: true responses: - '200': + '200': description: The created facility cycles - patch: - summary: Update one or multiple facility cycles + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new facility cycles tags: - - Entities - responses: - 200: - description: The updated facility cycles + - entities /facilitycycles/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the facility cycles + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the facility cycles tags: - - Entities + - entities + /facilitycycles/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the facility cycles - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of facility cycles - /facilitycycles/findOne: - get: - summary: Return the first facility cycles matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the facility cycles - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of facility cycles returned - required: false - schema: - type: object - - name: order - in: query - description: order the facility cycles by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first facility cycles matching - /facilitycycles/{id}: - get: - summary: Find the facility cycles matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the facility cycles matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the facility cycles + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching facility cycles + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no facility cycles matches the given ID - delete: - summary: Delete the facility cycles matching the given ID + description: When no result is found + summary: Find the facility cycles matching the ID tags: - - Entities + - entities + /groupings: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the facility cycles + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the facility cycles is deleted + '200': + description: The groupings found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the facility cycles can't be found - patch: - summary: Update the facility cycles matching the given ID + description: When no results are found + summary: Get groupings based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the facility cycles + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple groupings + required: true responses: '200': - description: The updated facility cycles + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the facility cycles can't be found - /groupings: - get: - summary: Get groupings - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the groupings - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of groupings returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of groupings returned - required: false - schema: - type: object - - name: order - in: query - description: order the groupings by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The groupings found. - '404': - description: When no result is found - post: - summary: Create one of more groupings + description: When the entity to update could not be found + summary: Update groupings tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple groupings + required: true responses: - '200': + '200': description: The created groupings - patch: - summary: Update one or multiple groupings + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new groupings tags: - - Entities - responses: - 200: - description: The updated groupings + - entities /groupings/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the groupings + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the groupings tags: - - Entities + - entities + /groupings/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the groupings - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of groupings - /groupings/findOne: - get: - summary: Return the first groupings matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the groupings - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of groupings returned - required: false - schema: - type: object - - name: order - in: query - description: order the groupings by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first groupings matching - /groupings/{id}: - get: - summary: Find the groupings matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the groupings matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the groupings + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching groupings + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no groupings matches the given ID - delete: - summary: Delete the groupings matching the given ID + description: When no result is found + summary: Find the groupings matching the ID tags: - - Entities + - entities + /instruments: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the groupings + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the groupings is deleted + '200': + description: The instruments found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the groupings can't be found - patch: - summary: Update the groupings matching the given ID + description: When no results are found + summary: Get instruments based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the groupings + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple instruments + required: true responses: '200': - description: The updated groupings + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the groupings can't be found - /instrumentscientists: - get: - summary: Get instrument scientists - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the instrument scientists - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of instrument scientists returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of instrument scientists returned - required: false - schema: - type: object - - name: order - in: query - description: order the instrument scientists by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The instrument scientists found. - '404': - description: When no result is found - post: - summary: Create one of more instrument scientists + description: When the entity to update could not be found + summary: Update instruments tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple instruments + required: true responses: - '200': - description: The created instrument scientists - patch: - summary: Update one or multiple instrument scientists + '200': + description: The created instruments + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new instruments tags: - - Entities - responses: - 200: - description: The updated instrument scientists - /instrumentscientists/count: + - entities + /instruments/count: get: - summary: Return the count of the instrument scientists - tags: - - Entities parameters: - - name: where - in: query - description: Apply a where filter to the instrument scientists - required: false - schema: - type: object + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object responses: - 200: - description: The count of instrument scientists - /instrumentscientists/findOne: - get: - summary: Return the first instrument scientists matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the instrument scientists - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of instrument scientists returned - required: false - schema: - type: object - - name: order - in: query - description: order the instrument scientists by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first instrument scientists matching - /instrumentscientists/{id}: - get: - summary: Find the instrument scientists matching the given ID + '200': + description: The count of the instruments + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given + summary: Return the count of the instruments tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the instrument scientists - responses: - '200': - description: The matching instrument scientists - '404': - description: When no instrument scientists matches the given ID + - entities + /instruments/{id}: delete: - summary: Delete the instrument scientists matching the given ID - tags: - - Entities parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the instrument scientists + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '203': - description: Blank responses, when the instrument scientists is deleted + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the instrument scientists can't be found - patch: - summary: Update the instrument scientists matching the given ID + description: When the entity can't be found + summary: Delete the instruments matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the instrument scientists + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '200': - description: The updated instrument scientists - '404': - description: When the instrument scientists can't be found - /instruments: - get: - summary: Get instruments - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the instruments - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of instruments returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of instruments returned - required: false - schema: - type: object - - name: order - in: query - description: order the instruments by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The instruments found. + description: The matching instruments + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': description: When no result is found - post: - summary: Create one of more instruments + summary: Find the instruments matching the ID tags: - - Entities + - entities + /instrumentscientists: + get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '200': - description: The created instruments - patch: - summary: Update one or multiple instruments + '200': + description: The instrument scientists found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When no results are found + summary: Get instrument scientists based on filters tags: - - Entities + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple instrument scientists + required: true responses: - 200: - description: The updated instruments - /instruments/count: - get: - summary: Return the count of the instruments + '200': + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity to update could not be found + summary: Update instrument scientists tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the instruments - required: false - schema: - type: object + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple instrument scientists + required: true responses: - 200: - description: The count of instruments - /instruments/findOne: - get: - summary: Return the first instruments matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the instruments - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of instruments returned - required: false - schema: - type: object - - name: order - in: query - description: order the instruments by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first instruments matching - /instruments/{id}: - get: - summary: Find the instruments matching the given ID + '200': + description: The created instrument scientists + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new instrument scientists tags: - - Entities + - entities + /instrumentscientists/count: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the instruments + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object responses: - '200': - description: The matching instruments - '404': - description: When no instruments matches the given ID - delete: - summary: Delete the instruments matching the given ID + '200': + description: The count of the instrument scientists + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given + summary: Return the count of the instrument scientists tags: - - Entities + - entities + /instrumentscientists/{id}: + delete: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the instruments + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '203': - description: Blank responses, when the instruments is deleted + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the instruments can't be found - patch: - summary: Update the instruments matching the given ID + description: When the entity can't be found + summary: Delete the instrument scientists matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the instruments + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '200': - description: The updated instruments + description: The matching instrument scientists + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the instruments can't be found + description: When no result is found + summary: Find the instrument scientists matching the ID + tags: + - entities /investigationgroups: get: - summary: Get investigation groups - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigation groups - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of investigation groups returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of investigation groups returned - required: false - schema: - type: object - - name: order - in: query - description: order the investigation groups by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The investigation groups found. + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number + responses: + '200': + description: The investigation groups found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more investigation groups + description: When no results are found + summary: Get investigation groups based on filters tags: - - Entities - responses: - '200': - description: The created investigation groups + - entities patch: - summary: Update one or multiple investigation groups + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple investigation groups + required: true + responses: + '200': + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity to update could not be found + summary: Update investigation groups tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple investigation groups + required: true responses: - 200: - description: The updated investigation groups + '200': + description: The created investigation groups + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new investigation groups + tags: + - entities /investigationgroups/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the investigation groups + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the investigation groups tags: - - Entities + - entities + /investigationgroups/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the investigation groups - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of investigation groups - /investigationgroups/findOne: - get: - summary: Return the first investigation groups matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigation groups - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of investigation groups returned - required: false - schema: - type: object - - name: order - in: query - description: order the investigation groups by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first investigation groups matching - /investigationgroups/{id}: - get: - summary: Find the investigation groups matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the investigation groups matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation groups + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching investigation groups + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no investigation groups matches the given ID - delete: - summary: Delete the investigation groups matching the given ID + description: When no result is found + summary: Find the investigation groups matching the ID tags: - - Entities + - entities + /investigationinstruments: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation groups + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the investigation groups is deleted + '200': + description: The investigation instruments found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the investigation groups can't be found - patch: - summary: Update the investigation groups matching the given ID + description: When no results are found + summary: Get investigation instruments based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation groups + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple investigation instruments + required: true responses: '200': - description: The updated investigation groups + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the investigation groups can't be found - /investigationinstruments: - get: - summary: Get investigation instruments - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigation instruments - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of investigation instruments returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of investigation instruments returned - required: false - schema: - type: object - - name: order - in: query - description: order the investigation instruments by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The investigation instruments found. - '404': - description: When no result is found - post: - summary: Create one of more investigation instruments + description: When the entity to update could not be found + summary: Update investigation instruments tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple investigation instruments + required: true responses: - '200': + '200': description: The created investigation instruments - patch: - summary: Update one or multiple investigation instruments + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new investigation instruments tags: - - Entities - responses: - 200: - description: The updated investigation instruments + - entities /investigationinstruments/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the investigation instruments + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the investigation instruments tags: - - Entities + - entities + /investigationinstruments/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the investigation instruments - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of investigation instruments - /investigationinstruments/findOne: - get: - summary: Return the first investigation instruments matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigation instruments - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of investigation instruments returned - required: false - schema: - type: object - - name: order - in: query - description: order the investigation instruments by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first investigation instruments matching - /investigationinstruments/{id}: - get: - summary: Find the investigation instruments matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the investigation instruments matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation instruments + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching investigation instruments + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no investigation instruments matches the given ID - delete: - summary: Delete the investigation instruments matching the given ID + description: When no result is found + summary: Find the investigation instruments matching the ID tags: - - Entities + - entities + /investigationparameters: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation instruments + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the investigation instruments is deleted + '200': + description: The investigation parameters found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the investigation instruments can't be found - patch: - summary: Update the investigation instruments matching the given ID + description: When no results are found + summary: Get investigation parameters based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation instruments + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple investigation parameters + required: true responses: '200': - description: The updated investigation instruments + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the investigation instruments can't be found - /investigationparameters: - get: - summary: Get investigation parameters - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigation parameters - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of investigation parameters returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of investigation parameters returned - required: false - schema: - type: object - - name: order - in: query - description: order the investigation parameters by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The investigation parameters found. - '404': - description: When no result is found - post: - summary: Create one of more investigation parameters + description: When the entity to update could not be found + summary: Update investigation parameters tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple investigation parameters + required: true responses: - '200': + '200': description: The created investigation parameters - patch: - summary: Update one or multiple investigation parameters + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new investigation parameters tags: - - Entities - responses: - 200: - description: The updated investigation parameters + - entities /investigationparameters/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the investigation parameters + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the investigation parameters tags: - - Entities + - entities + /investigationparameters/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the investigation parameters - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of investigation parameters - /investigationparameters/findOne: - get: - summary: Return the first investigation parameters matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigation parameters - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of investigation parameters returned - required: false - schema: - type: object - - name: order - in: query - description: order the investigation parameters by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first investigation parameters matching - /investigationparameters/{id}: - get: - summary: Find the investigation parameters matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the investigation parameters matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation parameters + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching investigation parameters + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no investigation parameters matches the given ID - delete: - summary: Delete the investigation parameters matching the given ID + description: When no result is found + summary: Find the investigation parameters matching the ID tags: - - Entities + - entities + /investigations: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation parameters + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the investigation parameters is deleted + '200': + description: The investigations found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the investigation parameters can't be found - patch: - summary: Update the investigation parameters matching the given ID + description: When no results are found + summary: Get investigations based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation parameters + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple investigations + required: true responses: '200': - description: The updated investigation parameters + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the investigation parameters can't be found - /investigationtypes: - get: - summary: Get investigation types - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigation types - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of investigation types returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of investigation types returned - required: false - schema: - type: object - - name: order - in: query - description: order the investigation types by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The investigation types found. - '404': - description: When no result is found - post: - summary: Create one of more investigation types + description: When the entity to update could not be found + summary: Update investigations tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple investigations + required: true responses: - '200': - description: The created investigation types - patch: - summary: Update one or multiple investigation types + '200': + description: The created investigations + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new investigations tags: - - Entities - responses: - 200: - description: The updated investigation types - /investigationtypes/count: + - entities + /investigations/count: get: - summary: Return the count of the investigation types - tags: - - Entities parameters: - - name: where - in: query - description: Apply a where filter to the investigation types - required: false - schema: - type: object + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object responses: - 200: - description: The count of investigation types - /investigationtypes/findOne: - get: - summary: Return the first investigation types matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigation types - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of investigation types returned - required: false - schema: - type: object - - name: order - in: query - description: order the investigation types by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first investigation types matching - /investigationtypes/{id}: - get: - summary: Find the investigation types matching the given ID + '200': + description: The count of the investigations + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given + summary: Return the count of the investigations tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation types - responses: - '200': - description: The matching investigation types - '404': - description: When no investigation types matches the given ID + - entities + /investigations/{id}: delete: - summary: Delete the investigation types matching the given ID - tags: - - Entities parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation types + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '203': - description: Blank responses, when the investigation types is deleted + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the investigation types can't be found - patch: - summary: Update the investigation types matching the given ID + description: When the entity can't be found + summary: Delete the investigations matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation types + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '200': - description: The updated investigation types - '404': - description: When the investigation types can't be found - /investigationusers: - get: - summary: Get investigation users - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigation users - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of investigation users returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of investigation users returned - required: false - schema: - type: object - - name: order - in: query - description: order the investigation users by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The investigation users found. + description: The matching investigations + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': description: When no result is found - post: - summary: Create one of more investigation users + summary: Find the investigations matching the ID tags: - - Entities + - entities + /investigationtypes: + get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '200': - description: The created investigation users - patch: - summary: Update one or multiple investigation users + '200': + description: The investigation types found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When no results are found + summary: Get investigation types based on filters tags: - - Entities + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple investigation types + required: true responses: - 200: - description: The updated investigation users - /investigationusers/count: - get: - summary: Return the count of the investigation users + '200': + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity to update could not be found + summary: Update investigation types tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigation users - required: false - schema: - type: object + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple investigation types + required: true responses: - 200: - description: The count of investigation users - /investigationusers/findOne: - get: - summary: Return the first investigation users matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigation users - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of investigation users returned - required: false - schema: - type: object - - name: order - in: query - description: order the investigation users by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first investigation users matching - /investigationusers/{id}: - get: - summary: Find the investigation users matching the given ID + '200': + description: The created investigation types + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new investigation types tags: - - Entities + - entities + /investigationtypes/count: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation users + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object responses: - '200': - description: The matching investigation users - '404': - description: When no investigation users matches the given ID - delete: - summary: Delete the investigation users matching the given ID + '200': + description: The count of the investigation types + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given + summary: Return the count of the investigation types tags: - - Entities + - entities + /investigationtypes/{id}: + delete: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation users + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '203': - description: Blank responses, when the investigation users is deleted + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the investigation users can't be found - patch: - summary: Update the investigation users matching the given ID + description: When the entity can't be found + summary: Delete the investigation types matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigation users + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '200': - description: The updated investigation users - '404': - description: When the investigation users can't be found - /investigations: - get: - summary: Get investigations - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigations - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of investigations returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of investigations returned - required: false - schema: - type: object - - name: order - in: query - description: order the investigations by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The investigations found. + description: The matching investigation types + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': description: When no result is found - post: - summary: Create one of more investigations + summary: Find the investigation types matching the ID tags: - - Entities + - entities + /investigationusers: + get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '200': - description: The created investigations - patch: - summary: Update one or multiple investigations + '200': + description: The investigation users found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When no results are found + summary: Get investigation users based on filters tags: - - Entities + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple investigation users + required: true responses: - 200: - description: The updated investigations - /investigations/count: - get: - summary: Return the count of the investigations + '200': + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity to update could not be found + summary: Update investigation users tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigations - required: false - schema: - type: object + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple investigation users + required: true responses: - 200: - description: The count of investigations - /investigations/findOne: - get: - summary: Return the first investigations matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the investigations - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of investigations returned - required: false - schema: - type: object - - name: order - in: query - description: order the investigations by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first investigations matching - /investigations/{id}: - get: - summary: Find the investigations matching the given ID + '200': + description: The created investigation users + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new investigation users tags: - - Entities + - entities + /investigationusers/count: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigations + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object responses: - '200': - description: The matching investigations - '404': - description: When no investigations matches the given ID - delete: - summary: Delete the investigations matching the given ID + '200': + description: The count of the investigation users + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given + summary: Return the count of the investigation users tags: - - Entities + - entities + /investigationusers/{id}: + delete: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigations + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '203': - description: Blank responses, when the investigations is deleted + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the investigations can't be found - patch: - summary: Update the investigations matching the given ID + description: When the entity can't be found + summary: Delete the investigation users matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the investigations + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '200': - description: The updated investigations + description: The matching investigation users + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the investigations can't be found + description: When no result is found + summary: Find the investigation users matching the ID + tags: + - entities /jobs: get: - summary: Get jobs - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the jobs - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of jobs returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of jobs returned - required: false - schema: - type: object - - name: order - in: query - description: order the jobs by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The jobs found. + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number + responses: + '200': + description: The jobs found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more jobs + description: When no results are found + summary: Get jobs based on filters tags: - - Entities - responses: - '200': - description: The created jobs + - entities patch: - summary: Update one or multiple jobs + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple jobs + required: true + responses: + '200': + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity to update could not be found + summary: Update jobs tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple jobs + required: true responses: - 200: - description: The updated jobs + '200': + description: The created jobs + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new jobs + tags: + - entities /jobs/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the jobs + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the jobs tags: - - Entities + - entities + /jobs/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the jobs - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of jobs - /jobs/findOne: - get: - summary: Return the first jobs matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the jobs - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of jobs returned - required: false - schema: - type: object - - name: order - in: query - description: order the jobs by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first jobs matching - /jobs/{id}: - get: - summary: Find the jobs matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the jobs matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the jobs + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching jobs + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no jobs matches the given ID - delete: - summary: Delete the jobs matching the given ID + description: When no result is found + summary: Find the jobs matching the ID tags: - - Entities + - entities + /keywords: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the jobs + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the jobs is deleted + '200': + description: The keywords found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the jobs can't be found - patch: - summary: Update the jobs matching the given ID + description: When no results are found + summary: Get keywords based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the jobs + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple keywords + required: true responses: '200': - description: The updated jobs + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the jobs can't be found - /keywords: - get: - summary: Get keywords - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the keywords - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of keywords returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of keywords returned - required: false - schema: - type: object - - name: order - in: query - description: order the keywords by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The keywords found. - '404': - description: When no result is found - post: - summary: Create one of more keywords + description: When the entity to update could not be found + summary: Update keywords tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple keywords + required: true responses: - '200': + '200': description: The created keywords - patch: - summary: Update one or multiple keywords + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new keywords tags: - - Entities - responses: - 200: - description: The updated keywords + - entities /keywords/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the keywords + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the keywords tags: - - Entities + - entities + /keywords/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the keywords - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of keywords - /keywords/findOne: - get: - summary: Return the first keywords matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the keywords - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of keywords returned - required: false - schema: - type: object - - name: order - in: query - description: order the keywords by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first keywords matching - /keywords/{id}: - get: - summary: Find the keywords matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the keywords matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the keywords + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching keywords + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no keywords matches the given ID - delete: - summary: Delete the keywords matching the given ID + description: When no result is found + summary: Find the keywords matching the ID tags: - - Entities + - entities + /parametertypes: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the keywords + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the keywords is deleted + '200': + description: The parameter types found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the keywords can't be found - patch: - summary: Update the keywords matching the given ID + description: When no results are found + summary: Get parameter types based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the keywords + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple parameter types + required: true responses: '200': - description: The updated keywords - '404': - description: When the keywords can't be found - /parametertypes: - get: - summary: Get parameter types - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the parameter types - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of parameter types returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of parameter types returned - required: false - schema: - type: object - - name: order - in: query - description: order the parameter types by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The parameter types found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more parameter types + description: When the entity to update could not be found + summary: Update parameter types tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple parameter types + required: true responses: - '200': + '200': description: The created parameter types - patch: - summary: Update one or multiple parameter types + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new parameter types tags: - - Entities - responses: - 200: - description: The updated parameter types + - entities /parametertypes/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the parameter types + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the parameter types tags: - - Entities + - entities + /parametertypes/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the parameter types - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of parameter types - /parametertypes/findOne: - get: - summary: Return the first parameter types matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the parameter types - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of parameter types returned - required: false - schema: - type: object - - name: order - in: query - description: order the parameter types by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first parameter types matching - /parametertypes/{id}: - get: - summary: Find the parameter types matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the parameter types matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the parameter types + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching parameter types + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no parameter types matches the given ID - delete: - summary: Delete the parameter types matching the given ID + description: When no result is found + summary: Find the parameter types matching the ID tags: - - Entities + - entities + /permissiblestringvalues: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the parameter types + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the parameter types is deleted + '200': + description: The permissible string values found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the parameter types can't be found - patch: - summary: Update the parameter types matching the given ID + description: When no results are found + summary: Get permissible string values based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the parameter types + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple permissible string values + required: true responses: '200': - description: The updated parameter types + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the parameter types can't be found - /permissiblestringvalues: - get: - summary: Get permissible string values - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the permissible string values - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of permissible string values returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of permissible string values returned - required: false - schema: - type: object - - name: order - in: query - description: order the permissible string values by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The permissible string values found. - '404': - description: When no result is found - post: - summary: Create one of more permissible string values + description: When the entity to update could not be found + summary: Update permissible string values tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple permissible string values + required: true responses: - '200': + '200': description: The created permissible string values - patch: - summary: Update one or multiple permissible string values + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new permissible string values tags: - - Entities - responses: - 200: - description: The updated permissible string values + - entities /permissiblestringvalues/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the permissible string values + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the permissible string values tags: - - Entities + - entities + /permissiblestringvalues/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the permissible string values - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of permissible string values - /permissiblestringvalues/findOne: - get: - summary: Return the first permissible string values matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the permissible string values - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of permissible string values returned - required: false - schema: - type: object - - name: order - in: query - description: order the permissible string values by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first permissible string values matching - /permissiblestringvalues/{id}: - get: - summary: Find the permissible string values matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the permissible string values matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the permissible string values + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching permissible string values + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no permissible string values matches the given ID - delete: - summary: Delete the permissible string values matching the given ID + description: When no result is found + summary: Find the permissible string values matching the ID tags: - - Entities + - entities + /publications: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the permissible string values + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the permissible string values is deleted + '200': + description: The publications found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the permissible string values can't be found - patch: - summary: Update the permissible string values matching the given ID + description: When no results are found + summary: Get publications based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the permissible string values + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple publications + required: true responses: '200': - description: The updated permissible string values - '404': - description: When the permissible string values can't be found - /publicsteps: - get: - summary: Get public steps - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the public steps - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of public steps returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of public steps returned - required: false - schema: - type: object - - name: order - in: query - description: order the public steps by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The public steps found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more public steps + description: When the entity to update could not be found + summary: Update publications tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple publications + required: true responses: - '200': - description: The created public steps - patch: - summary: Update one or multiple public steps + '200': + description: The created publications + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new publications tags: - - Entities - responses: - 200: - description: The updated public steps - /publicsteps/count: + - entities + /publications/count: get: - summary: Return the count of the public steps - tags: - - Entities parameters: - - name: where - in: query - description: Apply a where filter to the public steps - required: false - schema: - type: object + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object responses: - 200: - description: The count of public steps - /publicsteps/findOne: - get: - summary: Return the first public steps matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the public steps - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of public steps returned - required: false - schema: - type: object - - name: order - in: query - description: order the public steps by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first public steps matching - /publicsteps/{id}: - get: - summary: Find the public steps matching the given ID + '200': + description: The count of the publications + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given + summary: Return the count of the publications tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the public steps - responses: - '200': - description: The matching public steps - '404': - description: When no public steps matches the given ID + - entities + /publications/{id}: delete: - summary: Delete the public steps matching the given ID - tags: - - Entities parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the public steps + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '203': - description: Blank responses, when the public steps is deleted + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the public steps can't be found - patch: - summary: Update the public steps matching the given ID + description: When the entity can't be found + summary: Delete the publications matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the public steps + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '200': - description: The updated public steps - '404': - description: When the public steps can't be found - /publications: - get: - summary: Get publications - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the publications - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of publications returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of publications returned - required: false - schema: - type: object - - name: order - in: query - description: order the publications by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The publications found. + description: The matching publications + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': description: When no result is found - post: - summary: Create one of more publications + summary: Find the publications matching the ID tags: - - Entities + - entities + /publicsteps: + get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '200': - description: The created publications - patch: - summary: Update one or multiple publications + '200': + description: The public steps found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When no results are found + summary: Get public steps based on filters tags: - - Entities + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple public steps + required: true responses: - 200: - description: The updated publications - /publications/count: - get: - summary: Return the count of the publications + '200': + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity to update could not be found + summary: Update public steps tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the publications - required: false - schema: - type: object + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple public steps + required: true responses: - 200: - description: The count of publications - /publications/findOne: - get: - summary: Return the first publications matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the publications - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of publications returned - required: false - schema: - type: object - - name: order - in: query - description: order the publications by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first publications matching - /publications/{id}: - get: - summary: Find the publications matching the given ID + '200': + description: The created public steps + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new public steps tags: - - Entities + - entities + /publicsteps/count: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the publications + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object responses: - '200': - description: The matching publications - '404': - description: When no publications matches the given ID - delete: - summary: Delete the publications matching the given ID + '200': + description: The count of the public steps + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given + summary: Return the count of the public steps tags: - - Entities + - entities + /publicsteps/{id}: + delete: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the publications + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '203': - description: Blank responses, when the publications is deleted + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the publications can't be found - patch: - summary: Update the publications matching the given ID + description: When the entity can't be found + summary: Delete the public steps matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the publications + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '200': - description: The updated publications + description: The matching public steps + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the publications can't be found + description: When no result is found + summary: Find the public steps matching the ID + tags: + - entities /relateddatafiles: get: - summary: Get related datafiles - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the related datafiles - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of related datafiles returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of related datafiles returned - required: false - schema: - type: object - - name: order - in: query - description: order the related datafiles by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The related datafiles found. + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number + responses: + '200': + description: The related datafiles found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more related datafiles + description: When no results are found + summary: Get related datafiles based on filters tags: - - Entities - responses: - '200': - description: The created related datafiles + - entities patch: - summary: Update one or multiple related datafiles + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple related datafiles + required: true + responses: + '200': + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity to update could not be found + summary: Update related datafiles tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple related datafiles + required: true responses: - 200: - description: The updated related datafiles + '200': + description: The created related datafiles + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new related datafiles + tags: + - entities /relateddatafiles/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the related datafiles + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the related datafiles tags: - - Entities + - entities + /relateddatafiles/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the related datafiles - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of related datafiles - /relateddatafiles/findOne: - get: - summary: Return the first related datafiles matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the related datafiles - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of related datafiles returned - required: false - schema: - type: object - - name: order - in: query - description: order the related datafiles by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first related datafiles matching - /relateddatafiles/{id}: - get: - summary: Find the related datafiles matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the related datafiles matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the related datafiles + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching related datafiles + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no related datafiles matches the given ID - delete: - summary: Delete the related datafiles matching the given ID + description: When no result is found + summary: Find the related datafiles matching the ID tags: - - Entities + - entities + /rules: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the related datafiles + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the related datafiles is deleted + '200': + description: The rules found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the related datafiles can't be found - patch: - summary: Update the related datafiles matching the given ID + description: When no results are found + summary: Get rules based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the related datafiles + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple rules + required: true responses: '200': - description: The updated related datafiles + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the related datafiles can't be found - /rules: - get: - summary: Get rules - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the rules - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of rules returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of rules returned - required: false - schema: - type: object - - name: order - in: query - description: order the rules by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The rules found. - '404': - description: When no result is found - post: - summary: Create one of more rules + description: When the entity to update could not be found + summary: Update rules tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple rules + required: true responses: - '200': + '200': description: The created rules - patch: - summary: Update one or multiple rules + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new rules tags: - - Entities - responses: - 200: - description: The updated rules + - entities /rules/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the rules + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the rules tags: - - Entities + - entities + /rules/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the rules - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of rules - /rules/findOne: - get: - summary: Return the first rules matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the rules - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of rules returned - required: false - schema: - type: object - - name: order - in: query - description: order the rules by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first rules matching - /rules/{id}: - get: - summary: Find the rules matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the rules matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the rules + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching rules + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no rules matches the given ID - delete: - summary: Delete the rules matching the given ID + description: When no result is found + summary: Find the rules matching the ID tags: - - Entities + - entities + /sampleparameters: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the rules + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the rules is deleted + '200': + description: The sample parameters found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the rules can't be found - patch: - summary: Update the rules matching the given ID + description: When no results are found + summary: Get sample parameters based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the rules + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple sample parameters + required: true responses: '200': - description: The updated rules - '404': - description: When the rules can't be found - /sampleparameters: - get: - summary: Get sample parameters - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the sample parameters - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of sample parameters returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of sample parameters returned - required: false - schema: - type: object - - name: order - in: query - description: order the sample parameters by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The sample parameters found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more sample parameters + description: When the entity to update could not be found + summary: Update sample parameters tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple sample parameters + required: true responses: - '200': + '200': description: The created sample parameters - patch: - summary: Update one or multiple sample parameters + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new sample parameters tags: - - Entities - responses: - 200: - description: The updated sample parameters + - entities /sampleparameters/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the sample parameters + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the sample parameters tags: - - Entities + - entities + /sampleparameters/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the sample parameters - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of sample parameters - /sampleparameters/findOne: - get: - summary: Return the first sample parameters matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the sample parameters - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of sample parameters returned - required: false - schema: - type: object - - name: order - in: query - description: order the sample parameters by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first sample parameters matching - /sampleparameters/{id}: - get: - summary: Find the sample parameters matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the sample parameters matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the sample parameters + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching sample parameters + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no sample parameters matches the given ID - delete: - summary: Delete the sample parameters matching the given ID + description: When no result is found + summary: Find the sample parameters matching the ID tags: - - Entities + - entities + /samples: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the sample parameters + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the sample parameters is deleted + '200': + description: The samples found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the sample parameters can't be found - patch: - summary: Update the sample parameters matching the given ID + description: When no results are found + summary: Get samples based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the sample parameters + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple samples + required: true responses: '200': - description: The updated sample parameters + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the sample parameters can't be found - /sampletypes: - get: - summary: Get sample types - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the sample types - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of sample types returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of sample types returned - required: false - schema: - type: object - - name: order - in: query - description: order the sample types by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The sample types found. - '404': - description: When no result is found - post: - summary: Create one of more sample types + description: When the entity to update could not be found + summary: Update samples tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple samples + required: true responses: - '200': - description: The created sample types - patch: - summary: Update one or multiple sample types + '200': + description: The created samples + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new samples tags: - - Entities - responses: - 200: - description: The updated sample types - /sampletypes/count: + - entities + /samples/count: get: - summary: Return the count of the sample types - tags: - - Entities parameters: - - name: where - in: query - description: Apply a where filter to the sample types - required: false - schema: - type: object + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object responses: - 200: - description: The count of sample types - /sampletypes/findOne: - get: - summary: Return the first sample types matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the sample types - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of sample types returned - required: false - schema: - type: object - - name: order - in: query - description: order the sample types by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first sample types matching - /sampletypes/{id}: - get: - summary: Find the sample types matching the given ID + '200': + description: The count of the samples + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given + summary: Return the count of the samples tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the sample types - responses: - '200': - description: The matching sample types - '404': - description: When no sample types matches the given ID + - entities + /samples/{id}: delete: - summary: Delete the sample types matching the given ID - tags: - - Entities parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the sample types + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '203': - description: Blank responses, when the sample types is deleted + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the sample types can't be found - patch: - summary: Update the sample types matching the given ID + description: When the entity can't be found + summary: Delete the samples matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the sample types + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '200': - description: The updated sample types - '404': - description: When the sample types can't be found - /samples: - get: - summary: Get samples - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the samples - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of samples returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of samples returned - required: false - schema: - type: object - - name: order - in: query - description: order the samples by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The samples found. + description: The matching samples + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': description: When no result is found - post: - summary: Create one of more samples + summary: Find the samples matching the ID tags: - - Entities + - entities + /sampletypes: + get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '200': - description: The created samples - patch: - summary: Update one or multiple samples + '200': + description: The sample types found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When no results are found + summary: Get sample types based on filters tags: - - Entities + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple sample types + required: true responses: - 200: - description: The updated samples - /samples/count: - get: - summary: Return the count of the samples + '200': + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity to update could not be found + summary: Update sample types tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the samples - required: false - schema: - type: object + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple sample types + required: true responses: - 200: - description: The count of samples - /samples/findOne: - get: - summary: Return the first samples matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the samples - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of samples returned - required: false - schema: - type: object - - name: order - in: query - description: order the samples by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first samples matching - /samples/{id}: - get: - summary: Find the samples matching the given ID + '200': + description: The created sample types + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new sample types tags: - - Entities + - entities + /sampletypes/count: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the samples + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object responses: - '200': - description: The matching samples - '404': - description: When no samples matches the given ID - delete: - summary: Delete the samples matching the given ID + '200': + description: The count of the sample types + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given + summary: Return the count of the sample types tags: - - Entities + - entities + /sampletypes/{id}: + delete: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the samples + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '203': - description: Blank responses, when the samples is deleted + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the samples can't be found - patch: - summary: Update the samples matching the given ID + description: When the entity can't be found + summary: Delete the sample types matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the samples + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '200': - description: The updated samples + description: The matching sample types + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the samples can't be found + description: When no result is found + summary: Find the sample types matching the ID + tags: + - entities /shifts: get: - summary: Get shifts - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the shifts - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of shifts returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of shifts returned - required: false - schema: - type: object - - name: order - in: query - description: order the shifts by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The shifts found. + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number + responses: + '200': + description: The shifts found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more shifts + description: When no results are found + summary: Get shifts based on filters tags: - - Entities - responses: - '200': - description: The created shifts + - entities patch: - summary: Update one or multiple shifts + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple shifts + required: true + responses: + '200': + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity to update could not be found + summary: Update shifts tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple shifts + required: true responses: - 200: - description: The updated shifts + '200': + description: The created shifts + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new shifts + tags: + - entities /shifts/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the shifts + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the shifts tags: - - Entities + - entities + /shifts/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the shifts - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of shifts - /shifts/findOne: - get: - summary: Return the first shifts matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the shifts - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of shifts returned - required: false - schema: - type: object - - name: order - in: query - description: order the shifts by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first shifts matching - /shifts/{id}: - get: - summary: Find the shifts matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the shifts matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the shifts + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching shifts + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no shifts matches the given ID - delete: - summary: Delete the shifts matching the given ID + description: When no result is found + summary: Find the shifts matching the ID tags: - - Entities + - entities + /studies: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the shifts + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the shifts is deleted + '200': + description: The studies found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the shifts can't be found - patch: - summary: Update the shifts matching the given ID + description: When no results are found + summary: Get studies based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the shifts + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple studies + required: true responses: '200': - description: The updated shifts - '404': - description: When the shifts can't be found - /studies: - get: - summary: Get studies - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the studies - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of studies returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of studies returned - required: false - schema: - type: object - - name: order - in: query - description: order the studies by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The studies found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more studies + description: When the entity to update could not be found + summary: Update studies tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple studies + required: true responses: - '200': + '200': description: The created studies - patch: - summary: Update one or multiple studies + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new studies tags: - - Entities - responses: - 200: - description: The updated studies + - entities /studies/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the studies + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the studies tags: - - Entities + - entities + /studies/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the studies - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of studies - /studies/findOne: - get: - summary: Return the first studies matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the studies - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of studies returned - required: false - schema: - type: object - - name: order - in: query - description: order the studies by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first studies matching - /studies/{id}: - get: - summary: Find the studies matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the studies matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the studies + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching studies + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no studies matches the given ID - delete: - summary: Delete the studies matching the given ID + description: When no result is found + summary: Find the studies matching the ID tags: - - Entities + - entities + /studyinvestigations: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the studies + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the studies is deleted + '200': + description: The study investigations found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the studies can't be found - patch: - summary: Update the studies matching the given ID + description: When no results are found + summary: Get study investigations based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the studies + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple study investigations + required: true responses: '200': - description: The updated studies + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the studies can't be found - /studyinvestigations: - get: - summary: Get study investigations - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the study investigations - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of study investigations returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of study investigations returned - required: false - schema: - type: object - - name: order - in: query - description: order the study investigations by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The study investigations found. - '404': - description: When no result is found - post: - summary: Create one of more study investigations + description: When the entity to update could not be found + summary: Update study investigations tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple study investigations + required: true responses: - '200': + '200': description: The created study investigations - patch: - summary: Update one or multiple study investigations + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new study investigations tags: - - Entities - responses: - 200: - description: The updated study investigations + - entities /studyinvestigations/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the study investigations + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the study investigations tags: - - Entities + - entities + /studyinvestigations/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the study investigations - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of study investigations - /studyinvestigations/findOne: - get: - summary: Return the first study investigations matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the study investigations - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of study investigations returned - required: false - schema: - type: object - - name: order - in: query - description: order the study investigations by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first study investigations matching - /studyinvestigations/{id}: - get: - summary: Find the study investigations matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the study investigations matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the study investigations + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching study investigations + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no study investigations matches the given ID - delete: - summary: Delete the study investigations matching the given ID + description: When no result is found + summary: Find the study investigations matching the ID tags: - - Entities + - entities + /usergroups: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the study investigations + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the study investigations is deleted + '200': + description: The user groups found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the study investigations can't be found - patch: - summary: Update the study investigations matching the given ID + description: When no results are found + summary: Get user groups based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the study investigations + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple user groups + required: true responses: '200': - description: The updated study investigations - '404': - description: When the study investigations can't be found - /usergroups: - get: - summary: Get user groups - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the user groups - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of user groups returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of user groups returned - required: false - schema: - type: object - - name: order - in: query - description: order the user groups by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The user groups found. + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no result is found - post: - summary: Create one of more user groups + description: When the entity to update could not be found + summary: Update user groups tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple user groups + required: true responses: - '200': + '200': description: The created user groups - patch: - summary: Update one or multiple user groups + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new user groups tags: - - Entities - responses: - 200: - description: The updated user groups + - entities /usergroups/count: get: + parameters: + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + responses: + '200': + description: The count of the user groups + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given summary: Return the count of the user groups tags: - - Entities + - entities + /usergroups/{id}: + delete: parameters: - - name: where - in: query - description: Apply a where filter to the user groups - required: false - schema: - type: object + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - 200: - description: The count of user groups - /usergroups/findOne: - get: - summary: Return the first user groups matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the user groups - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of user groups returned - required: false - schema: - type: object - - name: order - in: query - description: order the user groups by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first user groups matching - /usergroups/{id}: - get: - summary: Find the user groups matching the given ID + '203': + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + '404': + description: When the entity can't be found + summary: Delete the user groups matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the user groups + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: - '200': + '200': description: The matching user groups + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When no user groups matches the given ID - delete: - summary: Delete the user groups matching the given ID + description: When no result is found + summary: Find the user groups matching the ID tags: - - Entities + - entities + /users: + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the user groups + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object + - description: Return unique values for the fields requested + in: query + name: distinct + required: false + schema: + example: + - FIELD 1 + - FIELD 2 + type: object + - description: Given the names of related entities, include them in the results + in: query + name: include + required: false + schema: + example: + Relation 1: + - Relation A + - Relation B + type: object + - description: Limit the number of entities returned + in: query + name: limit + required: false + schema: + example: 4 + type: number + - description: Given a field and direction, order the returned entities + in: query + name: order + required: false + schema: + example: ID DESC + type: string + - description: Offset the returned entities by a given number + in: query + name: skip + required: false + schema: + example: 5 + type: number responses: - '203': - description: Blank responses, when the user groups is deleted + '200': + description: The users found + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the user groups can't be found - patch: - summary: Update the user groups matching the given ID + description: When no results are found + summary: Get users based on filters tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the user groups + - entities + patch: + requestBody: + content: + application/json: + schema: + type: object + description: Update one or multiple users + required: true responses: '200': - description: The updated user groups + description: The updated entity + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the user groups can't be found - /users: - get: - summary: Get users - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the users - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of users returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of users returned - required: false - schema: - type: object - - name: order - in: query - description: order the users by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The users found. - '404': - description: When no result is found - post: - summary: Create one of more users + description: When the entity to update could not be found + summary: Update users tags: - - Entities + - entities + post: + requestBody: + content: + application/json: + schema: + type: object + description: Create one or multiple users + required: true responses: - '200': + '200': description: The created users - patch: - summary: Update one or multiple users + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided + summary: Add new users tags: - - Entities - responses: - 200: - description: The updated users + - entities /users/count: get: - summary: Return the count of the users - tags: - - Entities parameters: - - name: where - in: query - description: Apply a where filter to the users - required: false - schema: - type: object + - description: Apply a where filter to all entities. The filter can take the + form of {"field":{:"value"}, where the possible operators are + like, gte, lte and eq + in: query + name: where + required: false + schema: + example: + ID: + eq: 1 + type: object responses: - 200: - description: The count of users - /users/findOne: - get: - summary: Return the first users matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the users - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of users returned - required: false - schema: - type: object - - name: order - in: query - description: order the users by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first users matching - /users/{id}: - get: - summary: Find the users matching the given ID + '200': + description: The count of the users + '401': + description: When no credentials are provided + '403': + description: When bad credentials are given + summary: Return the count of the users tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the users - responses: - '200': - description: The matching users - '404': - description: When no users matches the given ID + - entities + /users/{id}: delete: - summary: Delete the users matching the given ID - tags: - - Entities parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the users + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '203': - description: Blank responses, when the users is deleted + description: Blank response when the entity is deleted + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the users can't be found - patch: - summary: Update the users matching the given ID + description: When the entity can't be found + summary: Delete the users matching the ID tags: - - Entities + - entities + get: parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the users + - description: The id of an entity + in: path + name: id + required: true + schema: + example: 4 + type: integer responses: '200': - description: The updated users + description: The matching users + '401': + description: When no credentials are provided + '403': + description: When bad credentials are provided '404': - description: When the users can't be found \ No newline at end of file + description: When no result is found + summary: Find the users matching the ID + tags: + - entities +servers: +- url: http://localhost:5000 diff --git a/src/swagger/swagger_generator.py b/src/swagger/swagger_generator.py index dd83befc..e04bd824 100644 --- a/src/swagger/swagger_generator.py +++ b/src/swagger/swagger_generator.py @@ -1,10 +1,225 @@ -import os import re from pathlib import Path +import yaml + from common.config import config +class Parameter(object): + def __init__(self, description, name, param_type, example, location, is_required): + self.parameter_as_dict = { + "description": description, + "in": location, + "required": is_required, + "name": name, + "schema": { + "type": param_type, + "example": example + } + } + + +class Entity(object): + WHERE_PARAMETER = Parameter( + "Apply a where filter to all entities. The filter can take the form of {\"field\":{:\"value\"}, " + "where the possible operators are like, gte, lte and eq", + "where", "object", {"ID": {"eq": 1}}, "query", False).parameter_as_dict + LIMIT_PARAMETER = Parameter("Limit the number of entities returned", "limit", "number", 4, + "query", False).parameter_as_dict + SKIP_PARAMETER = Parameter("Offset the returned entities by a given number", "skip", "number", 5, + "query", False).parameter_as_dict + ORDER_PARAMETER = Parameter("Given a field and direction, order the returned entities", "order", "string", + "ID DESC", "query", False).parameter_as_dict + INCLUDE_PARAMETER = Parameter("Given the names of related entities, include them in the results", "include", + "object", {"Relation 1": ["Relation A", "Relation B"]}, "query", False).parameter_as_dict + DISTINCT_PARAMETER = Parameter("Return unique values for the fields requested", "distinct", "object", + ["FIELD 1", "FIELD 2"], "query", False).parameter_as_dict + PATH_PARAMETER = Parameter("The id of an entity", "id", "integer", 4, "path", True).parameter_as_dict + + def __init__(self, entity_name): + self.entity_no_id_endpoint = { + f"/{entity_name.lower()}": { + "get": { + "summary": f"Get {SwaggerGenerator.pascal_to_normal(entity_name).lower()} based on filters", + "tags": ["entities"], + "parameters": [self.WHERE_PARAMETER, + self.DISTINCT_PARAMETER, + self.INCLUDE_PARAMETER, + self.LIMIT_PARAMETER, + self.ORDER_PARAMETER, + self.SKIP_PARAMETER], + "responses": { + "200": { + "description": f"The {SwaggerGenerator.pascal_to_normal(entity_name).lower()} found" + }, + "404": { + "description": "When no results are found" + }, + "401": { + "description": "When no credentials are provided" + }, + "403": { + "description": "When bad credentials are provided" + } + } + }, + "post": { + "summary": f"Add new {SwaggerGenerator.pascal_to_normal(entity_name).lower()}", + "tags": ["entities"], + "requestBody": { + "description": f"Create one or multiple {SwaggerGenerator.pascal_to_normal(entity_name).lower()}", + "required": True, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + + }, + "responses": { + "200": { + "description": f"The created {SwaggerGenerator.pascal_to_normal(entity_name)}" + }, + "401": { + "description": "When no credentials are provided" + }, + "403": { + "description": "When bad credentials are provided" + } + } + }, + "patch": { + "summary": f"Update {SwaggerGenerator.pascal_to_normal(entity_name).lower()}", + "tags": ["entities"], + "requestBody": { + "description": f"Update one or multiple {SwaggerGenerator.pascal_to_normal(entity_name).lower()}", + "required": True, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + + }, + "responses": { + "200": { + "description": "The updated entity" + }, + "404": { + "description": "When the entity to update could not be found" + }, + "401": { + "description": "When no credentials are provided" + }, + "403": { + "description": "When bad credentials are provided" + } + } + } + } + + } + self.entity_count_endpoint = { + f"/{entity_name.lower()}/count": { + "get": { + "summary": f"Return the count of the {SwaggerGenerator.pascal_to_normal(entity_name).lower()}", + "tags": ["entities"], + "parameters": [self.WHERE_PARAMETER], + "responses": { + "200": { + "description": f"The count of the {SwaggerGenerator.pascal_to_normal(entity_name).lower()}" + }, + "401": { + "description": f"When no credentials are provided" + }, + "403": { + "description": "When bad credentials are given" + } + } + + } + + } + } + self.entity_id_endpoint = { + f"/{entity_name.lower()}/{{id}}": { + "get": { + "summary": f"Find the {SwaggerGenerator.pascal_to_normal(entity_name).lower()} matching the ID", + "tags": ["entities"], + "parameters": [self.PATH_PARAMETER], + "responses": { + "200": { + "description": f"The matching {SwaggerGenerator.pascal_to_normal(entity_name).lower()}" + }, + "404": { + "description": "When no result is found" + }, + "401": { + "description": "When no credentials are provided" + }, + "403": { + "description": "When bad credentials are provided" + } + } + }, + "delete": { + "summary": f"Delete the {SwaggerGenerator.pascal_to_normal(entity_name).lower()} matching the ID", + "tags": ["entities"], + "parameters": [self.PATH_PARAMETER], + "responses": { + "203": { + "description": "Blank response when the entity is deleted" + }, + "404": { + "description": "When the entity can't be found" + }, + "401": { + "description": "When no credentials are provided" + }, + "403": { + "description": "When bad credentials are provided" + } + } + } + } + } + + +class SwaggerSpecification(object): + def __init__(self): + self.paths = [] + self.top_part = { + 'openapi': "3.0.0", + "info": { + "title": "DataGateway API", + "description": "ICAT API to interface with the DataGateway", + "version": "0" + }, + "servers": [ + { + "url": "http://localhost:5000" + } + ], + "paths": {} + } + + def add_path(self, path): + self.paths.append(path) + + def get_spec_as_dict(self): + spec = {} + for path in self.paths: + self.top_part["paths"].update(path) + spec.update(self.top_part) + + return spec + + class SwaggerGenerator(object): FILE_PATH = Path.cwd() / "swagger" / "openapi.yaml" @@ -26,10 +241,12 @@ def resource_wrapper(self): """ Wrapper for Resource classes that appends the class name to the endpoints list """ + def decorate(cls): if config.is_generate_swagger(): self.endpoints.append(cls.__name__) return cls + return decorate def write_swagger_spec(self): @@ -38,190 +255,17 @@ def write_swagger_spec(self): """ if config.is_generate_swagger(): + swagger_spec = SwaggerSpecification() + for endpoint in self.endpoints: + entity = Entity(endpoint) + swagger_spec.add_path(entity.entity_count_endpoint) + swagger_spec.add_path(entity.entity_id_endpoint) + swagger_spec.add_path(entity.entity_no_id_endpoint) + swagger_dict = swagger_spec.get_spec_as_dict() + yaml.Dumper.ignore_aliases = lambda *args : True with open(SwaggerGenerator.FILE_PATH, "w+") as target: - target.write(self.get_yaml_top()) - target.write(self.get_yaml_paths()) + target.write(yaml.dump(swagger_dict)) target.close() - @staticmethod - def get_yaml_top(): - """ - Gets the top part of the openapi spec without the paths - - :return: String containing the top part of the openapi spec - """ - return (f'''openapi: "3.0.0" -info: - title: DataGateway API - description: ICAT API to interface with the Data Gateway - version: "0" -servers: - - url: http://localhost:5000 - -paths:''') - - def get_yaml_paths(self): - """ - Gets the paths for the openapi spec - - :return: String containing the paths and their methods of the openapi spec - """ - base = "" - for endpoint in self.endpoints: - base += f''' - /{endpoint.lower()}: - get: - summary: Get {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - required: false - schema: - type: object - - name: limit - in: query - description: Limit the number of {SwaggerGenerator.pascal_to_normal(endpoint).lower()} returned - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of {SwaggerGenerator.pascal_to_normal(endpoint).lower()} returned - required: false - schema: - type: object - - name: order - in: query - description: order the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - '200': - description: The {SwaggerGenerator.pascal_to_normal(endpoint).lower()} found. - '404': - description: When no result is found - post: - summary: Create one of more {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - tags: - - Entities - responses: - '200': - description: The created {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - patch: - summary: Update one or multiple {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - tags: - - Entities - responses: - 200: - description: The updated {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - /{endpoint.lower()}/count: - get: - summary: Return the count of the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - required: false - schema: - type: object - responses: - 200: - description: The count of {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - /{endpoint.lower()}/findOne: - get: - summary: Return the first {SwaggerGenerator.pascal_to_normal(endpoint).lower()} matching a given filter - tags: - - Entities - parameters: - - name: where - in: query - description: Apply a where filter to the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - required: false - schema: - type: object - - name: skip - in: query - description: Skip the number of {SwaggerGenerator.pascal_to_normal(endpoint).lower()} returned - required: false - schema: - type: object - - name: order - in: query - description: order the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} by the given field - required: false - schema: - type: object - - name: include - in: query - description: include the related entities given - required: false - schema: - type: object - responses: - 200: - description: The first {SwaggerGenerator.pascal_to_normal(endpoint).lower()} matching - /{endpoint.lower()}/{{id}}: - get: - summary: Find the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} matching the given ID - tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - responses: - '200': - description: The matching {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - '404': - description: When no {SwaggerGenerator.pascal_to_normal(endpoint).lower()} matches the given ID - delete: - summary: Delete the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} matching the given ID - tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - responses: - '203': - description: Blank responses, when the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} is deleted - '404': - description: When the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} can't be found - patch: - summary: Update the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} matching the given ID - tags: - - Entities - parameters: - - in: path - name: id - required: true - schema: - type: integer - description: The id matching the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - responses: - '200': - description: The updated {SwaggerGenerator.pascal_to_normal(endpoint).lower()} - '404': - description: When the {SwaggerGenerator.pascal_to_normal(endpoint).lower()} can't be found''' - return base - swagger_gen = SwaggerGenerator()