From 6f298c5dd9816abc48ee0baffd7b35b81f648196 Mon Sep 17 00:00:00 2001 From: Martin Weise <martin.weise@tuwien.ac.at> Date: Tue, 1 Nov 2022 02:18:58 +0100 Subject: [PATCH] Moved dist --- .gitignore | 14 +- {swagger/dist => dist}/favicon-16x16.png | Bin {swagger/dist => dist}/favicon-32x32.png | Bin {swagger/dist => dist}/index.css | 0 {swagger/dist => dist}/index.html | 0 {swagger/dist => dist}/oauth2-redirect.html | 0 {swagger/dist => dist}/swagger-initializer.js | 0 {swagger/dist => dist}/swagger-ui-bundle.js | 0 .../dist => dist}/swagger-ui-bundle.js.map | 0 .../swagger-ui-es-bundle-core.js | 0 .../swagger-ui-es-bundle-core.js.map | 0 .../dist => dist}/swagger-ui-es-bundle.js | 0 .../dist => dist}/swagger-ui-es-bundle.js.map | 0 .../swagger-ui-standalone-preset.js | 0 .../swagger-ui-standalone-preset.js.map | 0 {swagger/dist => dist}/swagger-ui.css | 0 {swagger/dist => dist}/swagger-ui.css.map | 0 {swagger/dist => dist}/swagger-ui.js | 0 {swagger/dist => dist}/swagger-ui.js.map | 0 swagger/analyse/.gitkeep | 0 swagger/analyse/api.yaml | 1 + swagger/authentication/.gitkeep | 0 swagger/authentication/api.yaml | 2470 +++++++++++++++ swagger/container/.gitkeep | 0 swagger/container/api.yaml | 1466 +++++++++ swagger/database/.gitkeep | 0 swagger/database/api.yaml | 1379 ++++++++ swagger/generate.sh | 2 +- swagger/identifier/.gitkeep | 0 swagger/identifier/api.yaml | 1554 +++++++++ swagger/metadata/.gitkeep | 0 swagger/metadata/api.yaml | 159 + swagger/query/.gitkeep | 0 swagger/query/api.yaml | 2818 +++++++++++++++++ swagger/table/.gitkeep | 0 swagger/table/api.yaml | 677 ++++ swagger/units/.gitkeep | 0 swagger/units/api.yaml | 1 + 38 files changed, 10531 insertions(+), 10 deletions(-) rename {swagger/dist => dist}/favicon-16x16.png (100%) rename {swagger/dist => dist}/favicon-32x32.png (100%) rename {swagger/dist => dist}/index.css (100%) rename {swagger/dist => dist}/index.html (100%) rename {swagger/dist => dist}/oauth2-redirect.html (100%) rename {swagger/dist => dist}/swagger-initializer.js (100%) rename {swagger/dist => dist}/swagger-ui-bundle.js (100%) rename {swagger/dist => dist}/swagger-ui-bundle.js.map (100%) rename {swagger/dist => dist}/swagger-ui-es-bundle-core.js (100%) rename {swagger/dist => dist}/swagger-ui-es-bundle-core.js.map (100%) rename {swagger/dist => dist}/swagger-ui-es-bundle.js (100%) rename {swagger/dist => dist}/swagger-ui-es-bundle.js.map (100%) rename {swagger/dist => dist}/swagger-ui-standalone-preset.js (100%) rename {swagger/dist => dist}/swagger-ui-standalone-preset.js.map (100%) rename {swagger/dist => dist}/swagger-ui.css (100%) rename {swagger/dist => dist}/swagger-ui.css.map (100%) rename {swagger/dist => dist}/swagger-ui.js (100%) rename {swagger/dist => dist}/swagger-ui.js.map (100%) create mode 100644 swagger/analyse/.gitkeep create mode 100644 swagger/analyse/api.yaml create mode 100644 swagger/authentication/.gitkeep create mode 100644 swagger/authentication/api.yaml create mode 100644 swagger/container/.gitkeep create mode 100644 swagger/container/api.yaml create mode 100644 swagger/database/.gitkeep create mode 100644 swagger/database/api.yaml create mode 100644 swagger/identifier/.gitkeep create mode 100644 swagger/identifier/api.yaml create mode 100644 swagger/metadata/.gitkeep create mode 100644 swagger/metadata/api.yaml create mode 100644 swagger/query/.gitkeep create mode 100644 swagger/query/api.yaml create mode 100644 swagger/table/.gitkeep create mode 100644 swagger/table/api.yaml create mode 100644 swagger/units/.gitkeep create mode 100644 swagger/units/api.yaml diff --git a/.gitignore b/.gitignore index b26bc88..b67b84c 100644 --- a/.gitignore +++ b/.gitignore @@ -19,15 +19,11 @@ swagger/api-metadata/ swagger/api-query/ swagger/api-table/ swagger/api-units/ -swagger/analyse/* -swagger/authentication/* -swagger/container/* -swagger/database/* -swagger/identifier/* -swagger/metadata/* -swagger/query/* -swagger/table/* -swagger/units/* +swagger/**/*.png +swagger/**/*.css +swagger/**/*.html +swagger/**/*.js +swagger/**/*.map ## Keys id_rsa diff --git a/swagger/dist/favicon-16x16.png b/dist/favicon-16x16.png similarity index 100% rename from swagger/dist/favicon-16x16.png rename to dist/favicon-16x16.png diff --git a/swagger/dist/favicon-32x32.png b/dist/favicon-32x32.png similarity index 100% rename from swagger/dist/favicon-32x32.png rename to dist/favicon-32x32.png diff --git a/swagger/dist/index.css b/dist/index.css similarity index 100% rename from swagger/dist/index.css rename to dist/index.css diff --git a/swagger/dist/index.html b/dist/index.html similarity index 100% rename from swagger/dist/index.html rename to dist/index.html diff --git a/swagger/dist/oauth2-redirect.html b/dist/oauth2-redirect.html similarity index 100% rename from swagger/dist/oauth2-redirect.html rename to dist/oauth2-redirect.html diff --git a/swagger/dist/swagger-initializer.js b/dist/swagger-initializer.js similarity index 100% rename from swagger/dist/swagger-initializer.js rename to dist/swagger-initializer.js diff --git a/swagger/dist/swagger-ui-bundle.js b/dist/swagger-ui-bundle.js similarity index 100% rename from swagger/dist/swagger-ui-bundle.js rename to dist/swagger-ui-bundle.js diff --git a/swagger/dist/swagger-ui-bundle.js.map b/dist/swagger-ui-bundle.js.map similarity index 100% rename from swagger/dist/swagger-ui-bundle.js.map rename to dist/swagger-ui-bundle.js.map diff --git a/swagger/dist/swagger-ui-es-bundle-core.js b/dist/swagger-ui-es-bundle-core.js similarity index 100% rename from swagger/dist/swagger-ui-es-bundle-core.js rename to dist/swagger-ui-es-bundle-core.js diff --git a/swagger/dist/swagger-ui-es-bundle-core.js.map b/dist/swagger-ui-es-bundle-core.js.map similarity index 100% rename from swagger/dist/swagger-ui-es-bundle-core.js.map rename to dist/swagger-ui-es-bundle-core.js.map diff --git a/swagger/dist/swagger-ui-es-bundle.js b/dist/swagger-ui-es-bundle.js similarity index 100% rename from swagger/dist/swagger-ui-es-bundle.js rename to dist/swagger-ui-es-bundle.js diff --git a/swagger/dist/swagger-ui-es-bundle.js.map b/dist/swagger-ui-es-bundle.js.map similarity index 100% rename from swagger/dist/swagger-ui-es-bundle.js.map rename to dist/swagger-ui-es-bundle.js.map diff --git a/swagger/dist/swagger-ui-standalone-preset.js b/dist/swagger-ui-standalone-preset.js similarity index 100% rename from swagger/dist/swagger-ui-standalone-preset.js rename to dist/swagger-ui-standalone-preset.js diff --git a/swagger/dist/swagger-ui-standalone-preset.js.map b/dist/swagger-ui-standalone-preset.js.map similarity index 100% rename from swagger/dist/swagger-ui-standalone-preset.js.map rename to dist/swagger-ui-standalone-preset.js.map diff --git a/swagger/dist/swagger-ui.css b/dist/swagger-ui.css similarity index 100% rename from swagger/dist/swagger-ui.css rename to dist/swagger-ui.css diff --git a/swagger/dist/swagger-ui.css.map b/dist/swagger-ui.css.map similarity index 100% rename from swagger/dist/swagger-ui.css.map rename to dist/swagger-ui.css.map diff --git a/swagger/dist/swagger-ui.js b/dist/swagger-ui.js similarity index 100% rename from swagger/dist/swagger-ui.js rename to dist/swagger-ui.js diff --git a/swagger/dist/swagger-ui.js.map b/dist/swagger-ui.js.map similarity index 100% rename from swagger/dist/swagger-ui.js.map rename to dist/swagger-ui.js.map diff --git a/swagger/analyse/.gitkeep b/swagger/analyse/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/swagger/analyse/api.yaml b/swagger/analyse/api.yaml new file mode 100644 index 0000000..71725b3 --- /dev/null +++ b/swagger/analyse/api.yaml @@ -0,0 +1 @@ +{"definitions":{},"info":{"contact":{"email":"andreas.rauber@tuwien.ac.at","name":"Prof. Andreas Rauber"},"description":"Service that analyses data structures","license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0"},"title":"Database Repository Analyse Service API","version":"1.1.0-alpha"},"openapi":"3.0.0","paths":{"/api/analyse/determinedt":{"post":{"consumes":["application/json"],"description":"This is a simple API which returns the datatypes of a (path) csv file","parameters":[{"description":"to-do description","in":"body","name":"body","required":true,"schema":{"properties":{"enum":{"example":true,"type":"boolean"},"enum_tol":{"example":0.1},"filepath":{"example":"/data/testdt08.csv","type":"string"},"separator":{"example":",","type":"string"}},"type":"object"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Determine datatypes"}},"/api/analyse/determinepk":{"post":{"consumes":["application/json"],"description":"This is a simple API which returns the primary keys + ranking of a (path) csv file","parameters":[{"description":"to-do description","in":"body","name":"body","required":true,"schema":{"properties":{"filepath":{"example":"/data/testdt08.csv","type":"string"},"seperator":{"example":",","type":"string"}},"type":"object"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Determine primary keys"}}},"servers":[{"description":"Generated server url","url":"http://localhost:5000"}]} diff --git a/swagger/authentication/.gitkeep b/swagger/authentication/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/swagger/authentication/api.yaml b/swagger/authentication/api.yaml new file mode 100644 index 0000000..85eeb5d --- /dev/null +++ b/swagger/authentication/api.yaml @@ -0,0 +1,2470 @@ +openapi: 3.0.1 +info: + title: Database Repository Authentication Service API + description: Service that manages the authentication + contact: + name: Prof. Andreas Rauber + email: andreas.rauber@tuwien.ac.at + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + version: 1.1.0-alpha +externalDocs: + description: Wiki Documentation + url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/wikis +servers: +- url: http://localhost:9097 + description: Generated server url +paths: + /api/user: + get: + tags: + - user-endpoint + summary: List users + operationId: list + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/UserBriefDto' + put: + tags: + - user-endpoint + summary: Forgot user information + operationId: forgot + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserForgotDto' + required: true + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/UserDto' + post: + tags: + - user-endpoint + summary: Create user + operationId: register + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SignupRequestDto' + required: true + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/UserDto' + /api/user/{id}: + get: + tags: + - user-endpoint + summary: Find some user + operationId: find + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/UserDto' + security: + - bearerAuth: [] + put: + tags: + - user-endpoint + summary: Update user + operationId: update + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserUpdateDto' + required: true + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/UserDto' + security: + - bearerAuth: [] + /api/user/{id}/theme: + put: + tags: + - user-endpoint + summary: Update user theme + operationId: updateTheme + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserThemeSetDto' + required: true + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + security: + - bearerAuth: [] + /api/user/{id}/roles: + put: + tags: + - user-endpoint + summary: Update user roles + operationId: updateRoles + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserRolesDto' + required: true + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/UserDto' + security: + - bearerAuth: [] + /api/user/{id}/password: + put: + tags: + - user-endpoint + summary: Update user password + operationId: updatePassword + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserPasswordDto' + required: true + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/UserDto' + security: + - bearerAuth: [] + /api/user/{id}/email: + put: + tags: + - user-endpoint + summary: Update user email + operationId: updateEmail + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserEmailDto' + required: true + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/UserDto' + security: + - bearerAuth: [] + /api/user/reset: + put: + tags: + - user-endpoint + summary: Reset user information + operationId: reset + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserResetDto' + required: true + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + /api/auth: + put: + tags: + - authentication-endpoint + summary: Validate authentication token + operationId: authenticateUser + parameters: + - name: Authorization + in: header + required: true + schema: + type: string + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/UserDto' + security: + - bearerAuth: [] + post: + tags: + - authentication-endpoint + summary: Create authentication token + operationId: authenticateUser_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LoginRequestDto' + required: true + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/JwtResponseDto' + /api/user/token: + get: + tags: + - token-endpoint + summary: Lists developer tokens for user + operationId: listAll + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/TokenBriefDto' + security: + - bearerAuth: [] + post: + tags: + - token-endpoint + summary: Create developer token + operationId: create + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/TokenDto' + security: + - bearerAuth: [] + /api/user/secret/resend: + post: + tags: + - time-secret-endpoint + summary: resend user token + operationId: resend + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UserForgotDto' + required: true + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: object + /api/auth/renew: + post: + tags: + - authentication-endpoint + summary: Renew authentication token + operationId: reAuthenticateUser + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/JwtResponseDto' + security: + - bearerAuth: [] + /api/user/secret: + get: + tags: + - time-secret-endpoint + summary: verify user email + operationId: verifyEmail + parameters: + - name: token + in: query + required: true + schema: + type: string + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + /api/user/token/{hash}: + delete: + tags: + - token-endpoint + summary: Delete developer token + operationId: delete + parameters: + - name: hash + in: path + required: true + schema: + type: string + responses: + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "424": + description: Failed Dependency + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "401": + description: Unauthorized + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "418": + description: I'm a teapot + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "428": + description: Precondition Required + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + security: + - bearerAuth: [] +components: + schemas: + ApiErrorDto: + required: + - code + - message + - status + type: object + properties: + status: + type: string + example: NOT_FOUND + enum: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Could not find container + code: + type: string + example: error.container.notfound + UserForgotDto: + type: object + properties: + username: + type: string + example: jcarberry + email: + type: string + example: jcarberry@brown.edu + ContainerDto: + required: + - created + - hash + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + hash: + type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 + name: + type: string + example: Air Quality + state: + type: string + example: running + enum: + - created + - restarting + - running + - paused + - exited + - dead + databases: + type: array + items: + $ref: '#/components/schemas/DatabaseDto' + image: + $ref: '#/components/schemas/ImageBriefDto' + port: + type: integer + format: int32 + created: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + internal_name: + type: string + example: air-quality + ip_address: + type: string + CreatorDto: + required: + - created + - id + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: "Carberry, Josiah" + affiliation: + type: string + example: Wesleyan University + orcid: + type: string + example: 0000-0002-1825-0097 + created: + type: string + format: date-time + last_modified: + type: string + format: date-time + DatabaseDto: + required: + - creator + - exchange + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + exchange: + type: string + example: air_quality + creator: + $ref: '#/components/schemas/UserBriefDto' + identifier: + $ref: '#/components/schemas/IdentifierDto' + description: + type: string + example: Weather Australia 2009-2021 + tables: + type: array + items: + $ref: '#/components/schemas/TableBriefDto' + image: + $ref: '#/components/schemas/ImageDto' + container: + $ref: '#/components/schemas/ContainerDto' + created: + type: string + format: date-time + deleted: + type: string + format: date-time + internal_name: + type: string + example: weather_australia + is_public: + type: boolean + example: true + GrantedAuthorityDto: + type: object + properties: + authority: + type: string + example: ROLE_RESEARCHER + IdentifierDto: + required: + - container id + - creator + - creators + - database id + - execution + - publication_year + - query + - query_hash + - query_normalized + - result_hash + - result_number + - title + - type + - visibility + type: object + properties: + id: + type: integer + format: int64 + type: + type: string + enum: + - database + - subset + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + description: + type: string + example: "Air quality reports at Stephansplatz, Vienna" + query: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + execution: + type: string + format: date-time + visibility: + type: string + example: everyone + enum: + - everyone + - trusted + - self + doi: + type: string + example: 10.1038/nphys1170 + publisher: + type: string + example: TU Wien + creator: + $ref: '#/components/schemas/UserDto' + language: + type: string + enum: + - ab + - aa + - af + - ak + - sq + - am + - ar + - an + - hy + - as + - av + - ae + - ay + - az + - bm + - ba + - eu + - be + - bn + - bh + - bi + - bs + - br + - bg + - my + - ca + - km + - ch + - ce + - ny + - zh + - cu + - cv + - kw + - co + - cr + - hr + - cs + - da + - dv + - nl + - dz + - en + - eo + - et + - ee + - fo + - fj + - fi + - fr + - ff + - gd + - gl + - lg + - ka + - de + - ki + - el + - kl + - gn + - gu + - ht + - ha + - he + - hz + - hi + - ho + - hu + - is + - io + - ig + - id + - ia + - ie + - iu + - ik + - ga + - it + - ja + - jv + - kn + - kr + - ks + - kk + - rw + - kv + - kg + - ko + - kj + - ku + - ky + - lo + - la + - lv + - lb + - li + - ln + - lt + - lu + - mk + - mg + - ms + - ml + - mt + - gv + - mi + - mr + - mh + - ro + - mn + - na + - nv + - nd + - ng + - ne + - se + - "no" + - nb + - nn + - ii + - oc + - oj + - or + - om + - os + - pi + - pa + - ps + - fa + - pl + - pt + - qu + - rm + - rn + - ru + - sm + - sg + - sa + - sc + - sr + - sn + - sd + - si + - sk + - sl + - so + - st + - nr + - es + - su + - sw + - ss + - sv + - tl + - ty + - tg + - ta + - tt + - te + - th + - bo + - ti + - to + - ts + - tn + - tr + - tk + - tw + - ug + - uk + - ur + - uz + - ve + - vi + - vo + - wa + - cy + - fy + - wo + - xh + - yi + - yo + - za + - zu + license: + $ref: '#/components/schemas/LicenseDto' + creators: + type: array + items: + $ref: '#/components/schemas/CreatorDto' + created: + type: string + format: date-time + container id: + type: integer + format: int64 + example: 1 + database id: + type: integer + format: int64 + example: 1 + query id: + type: integer + format: int64 + example: 1 + query_normalized: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + related: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifierDto' + query_hash: + type: string + description: query hash in sha512 + result_hash: + type: string + result_number: + type: integer + format: int64 + example: 1 + publication_day: + type: integer + format: int32 + example: 15 + publication_month: + type: integer + format: int32 + example: 12 + publication_year: + type: integer + format: int32 + example: 2022 + last_modified: + type: string + format: date-time + ImageBriefDto: + required: + - id + - repository + - tag + type: object + properties: + id: + type: integer + format: int64 + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + ImageDateDto: + required: + - database_format + - example + - has_time + - id + - unix_format + type: object + properties: + id: + type: integer + format: int64 + example: + type: string + example: 30.01.2022 + database_format: + type: string + example: '%d.%c.%Y' + unix_format: + type: string + example: dd.MM.YYYY + has_time: + type: boolean + example: false + created_at: + type: string + format: date-time + ImageDto: + required: + - default_port + - dialect + - driver_class + - environment + - id + - jdbc_method + - repository + - tag + type: object + properties: + id: + type: integer + format: int64 + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + dialect: + type: string + example: org.hibernate.dialect.MariaDBDialect + hash: + type: string + example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e + compiled: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + size: + type: integer + example: 314295447 + environment: + type: array + items: + $ref: '#/components/schemas/ImageEnvItemDto' + driver_class: + type: string + example: org.mariadb.jdbc.Driver + date_formats: + type: array + items: + $ref: '#/components/schemas/ImageDateDto' + jdbc_method: + type: string + example: mariadb + default_port: + type: integer + format: int32 + example: 3306 + ImageEnvItemDto: + required: + - iid + - key + - type + - value + type: object + properties: + iid: + type: integer + format: int64 + key: + type: string + example: MARIADB_ROOT_PASSWORD + value: + type: string + example: mariadb + type: + type: string + example: PRIVILEGED_PASSWORD + enum: + - username + - password + - privileged_username + - privileged_password + LicenseDto: + required: + - identifier + - uri + type: object + properties: + identifier: + type: string + example: MIT + uri: + type: string + example: https://opensource.org/licenses/MIT + RelatedIdentifierDto: + required: + - created + - id + - value + type: object + properties: + id: + type: integer + format: int64 + value: + type: string + example: 10.70124/dc4zh-9ce78 + type: + type: string + example: DOI + enum: + - DOI + - URL + - URN + - ARK + - arXiv + - bibcode + - EAN13 + - EISSN + - Handle + - IGSN + - ISBN + - ISTC + - LISSN + - LSID + - PMID + - PURL + - UPC + - w3id + relation: + type: string + example: Cites + enum: + - IsCitedBy + - Cites + - IsSupplementTo + - IsSupplementedBy + - IsContinuedBy + - Continues + - IsDescribedBy + - Describes + - HasMetadata + - IsMetadataFor + - HasVersion + - IsVersionOf + - IsNewVersionOf + - IsPreviousVersionOf + - IsPartOf + - HasPart + - IsPublishedIn + - IsReferencedBy + - References + - IsDocumentedBy + - Documents + - IsCompiledBy + - Compiles + - IsVariantFormOf + - IsOriginalFormOf + - IsIdenticalTo + - IsReviewedBy + - Reviews + - IsDerivedFrom + - IsSourceOf + - IsRequiredBy + - Requires + - IsObsoletedBy + - Obsoletes + created: + type: string + format: date-time + deleted: + type: string + format: date-time + last_modified: + type: string + format: date-time + TableBriefDto: + required: + - creator + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + creator: + $ref: '#/components/schemas/UserBriefDto' + internal_name: + type: string + example: air_quality + UserBriefDto: + required: + - email_verified + - id + - theme_dark + - username + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + description: Only contains lowercase characters + example: user + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + titles_before: + type: string + example: Prof. + titles_after: + type: string + theme_dark: + type: boolean + example: true + email_verified: + type: boolean + example: true + UserDto: + required: + - email + - email_verified + - id + - theme_dark + - username + type: object + properties: + id: + type: integer + format: int64 + authorities: + type: array + items: + $ref: '#/components/schemas/GrantedAuthorityDto' + username: + type: string + description: Only contains lowercase characters + example: jcarberry + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + containers: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + databases: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + identifiers: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + email: + type: string + example: jcarberry@brown.edu + titles_before: + type: string + example: Prof. + titles_after: + type: string + theme_dark: + type: boolean + example: true + email_verified: + type: boolean + example: true + UserUpdateDto: + type: object + properties: + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + titles_before: + type: string + example: Prof. + titles_after: + type: string + UserThemeSetDto: + required: + - theme_dark + type: object + properties: + theme_dark: + type: boolean + example: true + UserRolesDto: + required: + - roles + type: object + properties: + roles: + type: array + items: + type: string + UserPasswordDto: + required: + - password + type: object + properties: + password: + type: string + UserEmailDto: + required: + - email + type: object + properties: + email: + type: string + example: jcarberry@brown.edu + UserResetDto: + required: + - password + - token + type: object + properties: + password: + type: string + token: + type: string + SignupRequestDto: + required: + - email + - password + - username + type: object + properties: + username: + pattern: "^[a-z0-9]{3,}$" + type: string + example: user + email: + type: string + example: user@example.com + password: + type: string + TokenDto: + required: + - created + - expires + - id + - token + - token_hash + type: object + properties: + id: + type: integer + format: int64 + created: + type: string + format: date-time + expires: + type: string + format: date-time + deleted: + type: string + format: date-time + token: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + token_hash: + type: string + example: 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03 + last_used: + type: string + format: date-time + LoginRequestDto: + required: + - password + - username + type: object + properties: + username: + type: string + example: user + password: + type: string + JwtResponseDto: + required: + - token + type: object + properties: + token: + type: string + type: + type: string + id: + type: integer + format: int64 + username: + type: string + example: user + email: + type: string + example: user@example.com + roles: + type: array + items: + type: string + TokenBriefDto: + required: + - created + - expires + - id + - token_hash + type: object + properties: + id: + type: integer + format: int64 + created: + type: string + format: date-time + expires: + type: string + format: date-time + deleted: + type: string + format: date-time + token_hash: + type: string + example: 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03 + last_used: + type: string + format: date-time + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT diff --git a/swagger/container/.gitkeep b/swagger/container/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/swagger/container/api.yaml b/swagger/container/api.yaml new file mode 100644 index 0000000..6ab5dce --- /dev/null +++ b/swagger/container/api.yaml @@ -0,0 +1,1466 @@ +openapi: 3.0.1 +info: + title: Database Repository Container Service API + description: Service that manages the containers + contact: + name: Prof. Andreas Rauber + email: andreas.rauber@tuwien.ac.at + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + version: 1.1.0-alpha +externalDocs: + description: Wiki Documentation + url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/wikis +servers: +- url: http://localhost:9091 + description: Generated server url +paths: + /api/image/{id}: + get: + tags: + - image-endpoint + summary: Find some image + operationId: findById + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "404": + description: Image not found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: Found some image + content: + '*/*': + schema: + $ref: '#/components/schemas/ImageDto' + put: + tags: + - image-endpoint + summary: Update some image + operationId: update + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImageChangeDto' + required: true + responses: + "404": + description: Image not found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "202": + description: Updated image + content: + '*/*': + schema: + $ref: '#/components/schemas/ImageDto' + security: + - bearerAuth: [] + delete: + tags: + - image-endpoint + summary: Delete some image + operationId: delete + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "404": + description: Image not found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Unable to delete image + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: Deleted image + content: + '*/*': + schema: + type: object + security: + - bearerAuth: [] + /api/container/{id}: + get: + tags: + - container-endpoint + summary: Find some container + operationId: findById_1 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ContainerDto' + put: + tags: + - container-endpoint + summary: Modify some container + operationId: modify + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ContainerChangeDto' + required: true + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ContainerBriefDto' + security: + - bearerAuth: [] + delete: + tags: + - container-endpoint + summary: Delete some container + operationId: delete_1 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: object + security: + - bearerAuth: [] + /api/image: + get: + tags: + - image-endpoint + summary: Find all images + operationId: findAll + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: Found images + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/ImageBriefDto' + post: + tags: + - image-endpoint + summary: Create image + operationId: create + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImageCreateDto' + required: true + responses: + "404": + description: Image not found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "201": + description: Created image + content: + '*/*': + schema: + $ref: '#/components/schemas/ImageDto' + security: + - bearerAuth: [] + /api/container: + get: + tags: + - container-endpoint + summary: Find all containers + operationId: findAll_1 + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/ContainerBriefDto' + post: + tags: + - container-endpoint + summary: Create container + operationId: create_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ContainerCreateRequestDto' + required: true + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "403": + description: Forbidden + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ContainerBriefDto' + security: + - bearerAuth: [] +components: + schemas: + ApiErrorDto: + required: + - code + - message + - status + type: object + properties: + status: + type: string + example: NOT_FOUND + enum: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Could not find container + code: + type: string + example: error.container.notfound + ImageChangeDto: + required: + - dialect + - driver_class + - jdbc_method + type: object + properties: + defaultPort: + maximum: 65535 + minimum: 1024 + type: integer + format: int32 + example: 5432 + environment: + type: array + items: + $ref: '#/components/schemas/ImageEnvItemDto' + dialect: + type: string + example: Postgres + driver_class: + type: string + example: org.postgresql.Driver + jdbc_method: + type: string + example: postgresql + ImageEnvItemDto: + required: + - iid + - key + - type + - value + type: object + properties: + iid: + type: integer + format: int64 + key: + type: string + example: MARIADB_ROOT_PASSWORD + value: + type: string + example: mariadb + type: + type: string + example: PRIVILEGED_PASSWORD + enum: + - username + - password + - privileged_username + - privileged_password + ImageDateDto: + required: + - database_format + - example + - has_time + - id + - unix_format + type: object + properties: + id: + type: integer + format: int64 + example: + type: string + example: 30.01.2022 + database_format: + type: string + example: '%d.%c.%Y' + unix_format: + type: string + example: dd.MM.YYYY + has_time: + type: boolean + example: false + created_at: + type: string + format: date-time + ImageDto: + required: + - default_port + - dialect + - driver_class + - environment + - id + - jdbc_method + - repository + - tag + type: object + properties: + id: + type: integer + format: int64 + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + dialect: + type: string + example: org.hibernate.dialect.MariaDBDialect + hash: + type: string + example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e + compiled: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + size: + type: integer + example: 314295447 + environment: + type: array + items: + $ref: '#/components/schemas/ImageEnvItemDto' + driver_class: + type: string + example: org.mariadb.jdbc.Driver + date_formats: + type: array + items: + $ref: '#/components/schemas/ImageDateDto' + jdbc_method: + type: string + example: mariadb + default_port: + type: integer + format: int32 + example: 3306 + ContainerChangeDto: + required: + - action + type: object + properties: + action: + type: string + enum: + - start + - stop + ContainerBriefDto: + required: + - hash + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + hash: + type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 + name: + type: string + example: Air Quality + creator: + $ref: '#/components/schemas/UserBriefDto' + created: + type: string + format: date-time + internal_name: + type: string + example: air-quality + UserBriefDto: + required: + - email_verified + - id + - theme_dark + - username + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + description: Only contains lowercase characters + example: user + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + titles_before: + type: string + example: Prof. + titles_after: + type: string + theme_dark: + type: boolean + example: true + email_verified: + type: boolean + example: true + ImageCreateDto: + required: + - default_port + - dialect + - driver_class + - jdbc_method + - repository + - tag + type: object + properties: + repository: + type: string + example: mariadb + tag: + type: string + dialect: + type: string + environment: + type: array + items: + $ref: '#/components/schemas/ImageEnvItemDto' + driver_class: + type: string + jdbc_method: + type: string + default_port: + type: integer + format: int32 + ContainerCreateRequestDto: + required: + - name + - repository + - tag + type: object + properties: + name: + type: string + example: Air Quality + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + ImageBriefDto: + required: + - id + - repository + - tag + type: object + properties: + id: + type: integer + format: int64 + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + ContainerDto: + required: + - created + - hash + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + hash: + type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 + name: + type: string + example: Air Quality + state: + type: string + example: running + enum: + - created + - restarting + - running + - paused + - exited + - dead + databases: + type: array + items: + $ref: '#/components/schemas/DatabaseDto' + image: + $ref: '#/components/schemas/ImageBriefDto' + port: + type: integer + format: int32 + created: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + internal_name: + type: string + example: air-quality + ip_address: + type: string + CreatorDto: + required: + - created + - id + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: "Carberry, Josiah" + affiliation: + type: string + example: Wesleyan University + orcid: + type: string + example: 0000-0002-1825-0097 + created: + type: string + format: date-time + last_modified: + type: string + format: date-time + DatabaseDto: + required: + - creator + - exchange + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + exchange: + type: string + example: air_quality + creator: + $ref: '#/components/schemas/UserBriefDto' + identifier: + $ref: '#/components/schemas/IdentifierDto' + description: + type: string + example: Weather Australia 2009-2021 + tables: + type: array + items: + $ref: '#/components/schemas/TableBriefDto' + image: + $ref: '#/components/schemas/ImageDto' + container: + $ref: '#/components/schemas/ContainerDto' + created: + type: string + format: date-time + deleted: + type: string + format: date-time + internal_name: + type: string + example: weather_australia + is_public: + type: boolean + example: true + GrantedAuthorityDto: + type: object + properties: + authority: + type: string + example: ROLE_RESEARCHER + IdentifierDto: + required: + - container id + - creator + - creators + - database id + - execution + - publication_year + - query + - query_hash + - query_normalized + - result_hash + - result_number + - title + - type + - visibility + type: object + properties: + id: + type: integer + format: int64 + type: + type: string + enum: + - database + - subset + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + description: + type: string + example: "Air quality reports at Stephansplatz, Vienna" + query: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + execution: + type: string + format: date-time + visibility: + type: string + example: everyone + enum: + - everyone + - trusted + - self + doi: + type: string + example: 10.1038/nphys1170 + publisher: + type: string + example: TU Wien + creator: + $ref: '#/components/schemas/UserDto' + language: + type: string + enum: + - ab + - aa + - af + - ak + - sq + - am + - ar + - an + - hy + - as + - av + - ae + - ay + - az + - bm + - ba + - eu + - be + - bn + - bh + - bi + - bs + - br + - bg + - my + - ca + - km + - ch + - ce + - ny + - zh + - cu + - cv + - kw + - co + - cr + - hr + - cs + - da + - dv + - nl + - dz + - en + - eo + - et + - ee + - fo + - fj + - fi + - fr + - ff + - gd + - gl + - lg + - ka + - de + - ki + - el + - kl + - gn + - gu + - ht + - ha + - he + - hz + - hi + - ho + - hu + - is + - io + - ig + - id + - ia + - ie + - iu + - ik + - ga + - it + - ja + - jv + - kn + - kr + - ks + - kk + - rw + - kv + - kg + - ko + - kj + - ku + - ky + - lo + - la + - lv + - lb + - li + - ln + - lt + - lu + - mk + - mg + - ms + - ml + - mt + - gv + - mi + - mr + - mh + - ro + - mn + - na + - nv + - nd + - ng + - ne + - se + - "no" + - nb + - nn + - ii + - oc + - oj + - or + - om + - os + - pi + - pa + - ps + - fa + - pl + - pt + - qu + - rm + - rn + - ru + - sm + - sg + - sa + - sc + - sr + - sn + - sd + - si + - sk + - sl + - so + - st + - nr + - es + - su + - sw + - ss + - sv + - tl + - ty + - tg + - ta + - tt + - te + - th + - bo + - ti + - to + - ts + - tn + - tr + - tk + - tw + - ug + - uk + - ur + - uz + - ve + - vi + - vo + - wa + - cy + - fy + - wo + - xh + - yi + - yo + - za + - zu + license: + $ref: '#/components/schemas/LicenseDto' + creators: + type: array + items: + $ref: '#/components/schemas/CreatorDto' + created: + type: string + format: date-time + container id: + type: integer + format: int64 + example: 1 + database id: + type: integer + format: int64 + example: 1 + query id: + type: integer + format: int64 + example: 1 + query_normalized: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + related: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifierDto' + query_hash: + type: string + description: query hash in sha512 + result_hash: + type: string + result_number: + type: integer + format: int64 + example: 1 + publication_day: + type: integer + format: int32 + example: 15 + publication_month: + type: integer + format: int32 + example: 12 + publication_year: + type: integer + format: int32 + example: 2022 + last_modified: + type: string + format: date-time + LicenseDto: + required: + - identifier + - uri + type: object + properties: + identifier: + type: string + example: MIT + uri: + type: string + example: https://opensource.org/licenses/MIT + RelatedIdentifierDto: + required: + - created + - id + - value + type: object + properties: + id: + type: integer + format: int64 + value: + type: string + example: 10.70124/dc4zh-9ce78 + type: + type: string + example: DOI + enum: + - DOI + - URL + - URN + - ARK + - arXiv + - bibcode + - EAN13 + - EISSN + - Handle + - IGSN + - ISBN + - ISTC + - LISSN + - LSID + - PMID + - PURL + - UPC + - w3id + relation: + type: string + example: Cites + enum: + - IsCitedBy + - Cites + - IsSupplementTo + - IsSupplementedBy + - IsContinuedBy + - Continues + - IsDescribedBy + - Describes + - HasMetadata + - IsMetadataFor + - HasVersion + - IsVersionOf + - IsNewVersionOf + - IsPreviousVersionOf + - IsPartOf + - HasPart + - IsPublishedIn + - IsReferencedBy + - References + - IsDocumentedBy + - Documents + - IsCompiledBy + - Compiles + - IsVariantFormOf + - IsOriginalFormOf + - IsIdenticalTo + - IsReviewedBy + - Reviews + - IsDerivedFrom + - IsSourceOf + - IsRequiredBy + - Requires + - IsObsoletedBy + - Obsoletes + created: + type: string + format: date-time + deleted: + type: string + format: date-time + last_modified: + type: string + format: date-time + TableBriefDto: + required: + - creator + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + creator: + $ref: '#/components/schemas/UserBriefDto' + internal_name: + type: string + example: air_quality + UserDto: + required: + - email + - email_verified + - id + - theme_dark + - username + type: object + properties: + id: + type: integer + format: int64 + authorities: + type: array + items: + $ref: '#/components/schemas/GrantedAuthorityDto' + username: + type: string + description: Only contains lowercase characters + example: jcarberry + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + containers: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + databases: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + identifiers: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + email: + type: string + example: jcarberry@brown.edu + titles_before: + type: string + example: Prof. + titles_after: + type: string + theme_dark: + type: boolean + example: true + email_verified: + type: boolean + example: true + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT diff --git a/swagger/database/.gitkeep b/swagger/database/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/swagger/database/api.yaml b/swagger/database/api.yaml new file mode 100644 index 0000000..e22dc88 --- /dev/null +++ b/swagger/database/api.yaml @@ -0,0 +1,1379 @@ +openapi: 3.0.1 +info: + title: Database Repository Database Service API + description: Service that manages the databases + contact: + name: Prof. Andreas Rauber + email: andreas.rauber@tuwien.ac.at + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + version: 1.1.0-alpha +externalDocs: + description: Wiki Documentation + url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/wikis +servers: +- url: http://localhost:9092 + description: Generated server url +paths: + /api/container/{id}/database/{databaseId}/transfer: + put: + tags: + - database-endpoint + summary: Update database + operationId: transfer + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseTransferDto' + required: true + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "502": + description: Bad Gateway + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/DatabaseDto' + security: + - bearerAuth: [] + /api/container/{id}/database: + get: + tags: + - database-endpoint + summary: List databases + operationId: list + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "502": + description: Bad Gateway + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/DatabaseBriefDto' + post: + tags: + - database-endpoint + summary: Create database + operationId: create + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatabaseCreateDto' + required: true + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "502": + description: Bad Gateway + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/DatabaseBriefDto' + security: + - bearerAuth: [] + /api/container/{id}/database/{databaseId}: + get: + tags: + - database-endpoint + summary: Find some database + operationId: findById + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "502": + description: Bad Gateway + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/DatabaseDto' + security: + - bearerAuth: [] + delete: + tags: + - database-endpoint + summary: Delete some database + operationId: delete + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "502": + description: Bad Gateway + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: object + security: + - bearerAuth: [] + /api/container/{id}/database/license: + get: + tags: + - license-endpoint + summary: Get all licenses + operationId: list_1 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "502": + description: Bad Gateway + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/LicenseDto' +components: + schemas: + ApiErrorDto: + required: + - code + - message + - status + type: object + properties: + status: + type: string + example: NOT_FOUND + enum: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Could not find container + code: + type: string + example: error.container.notfound + DatabaseTransferDto: + required: + - is_public + type: object + properties: + is_public: + type: boolean + example: true + ContainerDto: + required: + - created + - hash + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + hash: + type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 + name: + type: string + example: Air Quality + state: + type: string + example: running + enum: + - created + - restarting + - running + - paused + - exited + - dead + databases: + type: array + items: + $ref: '#/components/schemas/DatabaseDto' + image: + $ref: '#/components/schemas/ImageBriefDto' + port: + type: integer + format: int32 + created: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + internal_name: + type: string + example: air-quality + ip_address: + type: string + CreatorDto: + required: + - created + - id + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: "Carberry, Josiah" + affiliation: + type: string + example: Wesleyan University + orcid: + type: string + example: 0000-0002-1825-0097 + created: + type: string + format: date-time + last_modified: + type: string + format: date-time + DatabaseDto: + required: + - creator + - exchange + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + exchange: + type: string + example: air_quality + creator: + $ref: '#/components/schemas/UserBriefDto' + identifier: + $ref: '#/components/schemas/IdentifierDto' + description: + type: string + example: Weather Australia 2009-2021 + tables: + type: array + items: + $ref: '#/components/schemas/TableBriefDto' + image: + $ref: '#/components/schemas/ImageDto' + container: + $ref: '#/components/schemas/ContainerDto' + created: + type: string + format: date-time + deleted: + type: string + format: date-time + internal_name: + type: string + example: weather_australia + is_public: + type: boolean + example: true + GrantedAuthorityDto: + type: object + properties: + authority: + type: string + example: ROLE_RESEARCHER + IdentifierDto: + required: + - container id + - creator + - creators + - database id + - execution + - publication_year + - query + - query_hash + - query_normalized + - result_hash + - result_number + - title + - type + - visibility + type: object + properties: + id: + type: integer + format: int64 + type: + type: string + enum: + - database + - subset + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + description: + type: string + example: "Air quality reports at Stephansplatz, Vienna" + query: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + execution: + type: string + format: date-time + visibility: + type: string + example: everyone + enum: + - everyone + - trusted + - self + doi: + type: string + example: 10.1038/nphys1170 + publisher: + type: string + example: TU Wien + creator: + $ref: '#/components/schemas/UserDto' + language: + type: string + enum: + - ab + - aa + - af + - ak + - sq + - am + - ar + - an + - hy + - as + - av + - ae + - ay + - az + - bm + - ba + - eu + - be + - bn + - bh + - bi + - bs + - br + - bg + - my + - ca + - km + - ch + - ce + - ny + - zh + - cu + - cv + - kw + - co + - cr + - hr + - cs + - da + - dv + - nl + - dz + - en + - eo + - et + - ee + - fo + - fj + - fi + - fr + - ff + - gd + - gl + - lg + - ka + - de + - ki + - el + - kl + - gn + - gu + - ht + - ha + - he + - hz + - hi + - ho + - hu + - is + - io + - ig + - id + - ia + - ie + - iu + - ik + - ga + - it + - ja + - jv + - kn + - kr + - ks + - kk + - rw + - kv + - kg + - ko + - kj + - ku + - ky + - lo + - la + - lv + - lb + - li + - ln + - lt + - lu + - mk + - mg + - ms + - ml + - mt + - gv + - mi + - mr + - mh + - ro + - mn + - na + - nv + - nd + - ng + - ne + - se + - "no" + - nb + - nn + - ii + - oc + - oj + - or + - om + - os + - pi + - pa + - ps + - fa + - pl + - pt + - qu + - rm + - rn + - ru + - sm + - sg + - sa + - sc + - sr + - sn + - sd + - si + - sk + - sl + - so + - st + - nr + - es + - su + - sw + - ss + - sv + - tl + - ty + - tg + - ta + - tt + - te + - th + - bo + - ti + - to + - ts + - tn + - tr + - tk + - tw + - ug + - uk + - ur + - uz + - ve + - vi + - vo + - wa + - cy + - fy + - wo + - xh + - yi + - yo + - za + - zu + license: + $ref: '#/components/schemas/LicenseDto' + creators: + type: array + items: + $ref: '#/components/schemas/CreatorDto' + created: + type: string + format: date-time + container id: + type: integer + format: int64 + example: 1 + database id: + type: integer + format: int64 + example: 1 + query id: + type: integer + format: int64 + example: 1 + query_normalized: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + related: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifierDto' + query_hash: + type: string + description: query hash in sha512 + result_hash: + type: string + result_number: + type: integer + format: int64 + example: 1 + publication_day: + type: integer + format: int32 + example: 15 + publication_month: + type: integer + format: int32 + example: 12 + publication_year: + type: integer + format: int32 + example: 2022 + last_modified: + type: string + format: date-time + ImageBriefDto: + required: + - id + - repository + - tag + type: object + properties: + id: + type: integer + format: int64 + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + ImageDateDto: + required: + - database_format + - example + - has_time + - id + - unix_format + type: object + properties: + id: + type: integer + format: int64 + example: + type: string + example: 30.01.2022 + database_format: + type: string + example: '%d.%c.%Y' + unix_format: + type: string + example: dd.MM.YYYY + has_time: + type: boolean + example: false + created_at: + type: string + format: date-time + ImageDto: + required: + - default_port + - dialect + - driver_class + - environment + - id + - jdbc_method + - repository + - tag + type: object + properties: + id: + type: integer + format: int64 + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + dialect: + type: string + example: org.hibernate.dialect.MariaDBDialect + hash: + type: string + example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e + compiled: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + size: + type: integer + example: 314295447 + environment: + type: array + items: + $ref: '#/components/schemas/ImageEnvItemDto' + driver_class: + type: string + example: org.mariadb.jdbc.Driver + date_formats: + type: array + items: + $ref: '#/components/schemas/ImageDateDto' + jdbc_method: + type: string + example: mariadb + default_port: + type: integer + format: int32 + example: 3306 + ImageEnvItemDto: + required: + - iid + - key + - type + - value + type: object + properties: + iid: + type: integer + format: int64 + key: + type: string + example: MARIADB_ROOT_PASSWORD + value: + type: string + example: mariadb + type: + type: string + example: PRIVILEGED_PASSWORD + enum: + - username + - password + - privileged_username + - privileged_password + LicenseDto: + required: + - identifier + - uri + type: object + properties: + identifier: + type: string + example: MIT + uri: + type: string + example: https://opensource.org/licenses/MIT + RelatedIdentifierDto: + required: + - created + - id + - value + type: object + properties: + id: + type: integer + format: int64 + value: + type: string + example: 10.70124/dc4zh-9ce78 + type: + type: string + example: DOI + enum: + - DOI + - URL + - URN + - ARK + - arXiv + - bibcode + - EAN13 + - EISSN + - Handle + - IGSN + - ISBN + - ISTC + - LISSN + - LSID + - PMID + - PURL + - UPC + - w3id + relation: + type: string + example: Cites + enum: + - IsCitedBy + - Cites + - IsSupplementTo + - IsSupplementedBy + - IsContinuedBy + - Continues + - IsDescribedBy + - Describes + - HasMetadata + - IsMetadataFor + - HasVersion + - IsVersionOf + - IsNewVersionOf + - IsPreviousVersionOf + - IsPartOf + - HasPart + - IsPublishedIn + - IsReferencedBy + - References + - IsDocumentedBy + - Documents + - IsCompiledBy + - Compiles + - IsVariantFormOf + - IsOriginalFormOf + - IsIdenticalTo + - IsReviewedBy + - Reviews + - IsDerivedFrom + - IsSourceOf + - IsRequiredBy + - Requires + - IsObsoletedBy + - Obsoletes + created: + type: string + format: date-time + deleted: + type: string + format: date-time + last_modified: + type: string + format: date-time + TableBriefDto: + required: + - creator + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + creator: + $ref: '#/components/schemas/UserBriefDto' + internal_name: + type: string + example: air_quality + UserBriefDto: + required: + - email_verified + - id + - theme_dark + - username + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + description: Only contains lowercase characters + example: user + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + titles_before: + type: string + example: Prof. + titles_after: + type: string + theme_dark: + type: boolean + example: true + email_verified: + type: boolean + example: true + UserDto: + required: + - email + - email_verified + - id + - theme_dark + - username + type: object + properties: + id: + type: integer + format: int64 + authorities: + type: array + items: + $ref: '#/components/schemas/GrantedAuthorityDto' + username: + type: string + description: Only contains lowercase characters + example: jcarberry + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + containers: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + databases: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + identifiers: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + email: + type: string + example: jcarberry@brown.edu + titles_before: + type: string + example: Prof. + titles_after: + type: string + theme_dark: + type: boolean + example: true + email_verified: + type: boolean + example: true + DatabaseCreateDto: + required: + - is_public + - name + type: object + properties: + name: + type: string + example: Air Quality + is_public: + type: boolean + example: true + ContainerBriefDto: + required: + - hash + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + hash: + type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 + name: + type: string + example: Air Quality + creator: + $ref: '#/components/schemas/UserBriefDto' + created: + type: string + format: date-time + internal_name: + type: string + example: air-quality + DatabaseBriefDto: + required: + - id + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + description: + type: string + example: Air Quality in Austria + identifier: + $ref: '#/components/schemas/IdentifierBriefDto' + engine: + type: string + example: mariadb:10.5 + container: + $ref: '#/components/schemas/ContainerBriefDto' + creator: + $ref: '#/components/schemas/UserBriefDto' + created: + type: string + format: date-time + is_public: + type: boolean + example: true + IdentifierBriefDto: + required: + - container id + - database id + - title + - type + type: object + properties: + id: + type: integer + format: int64 + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + type: + type: string + enum: + - database + - subset + created: + type: string + format: date-time + container id: + type: integer + format: int64 + example: 1 + database id: + type: integer + format: int64 + example: 1 + query id: + type: integer + format: int64 + example: 1 + last_modified: + type: string + format: date-time + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT diff --git a/swagger/generate.sh b/swagger/generate.sh index 2fed6bd..4d91679 100755 --- a/swagger/generate.sh +++ b/swagger/generate.sh @@ -38,7 +38,7 @@ function copy () { #cp -r "./api-$1/swagger_client" "${HOME}/Projects/fda-services/.demo/api_$1" cp -r "./api-$1/swagger_client" "./api/api_$1" cp "./api-$1.yaml" "./$1/api.yaml" - cp -r ./dist/* "./$1" + cp -r ../dist/* "./$1" } function replace () { diff --git a/swagger/identifier/.gitkeep b/swagger/identifier/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/swagger/identifier/api.yaml b/swagger/identifier/api.yaml new file mode 100644 index 0000000..120e774 --- /dev/null +++ b/swagger/identifier/api.yaml @@ -0,0 +1,1554 @@ +openapi: 3.0.1 +info: + title: Database Repository Identifier Service API + description: Service that manages the identifiers + contact: + name: Prof. Andreas Rauber + email: andreas.rauber@tuwien.ac.at + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + version: 1.1.0-alpha +externalDocs: + description: Wiki Documentation + url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/wikis +servers: +- url: http://localhost:9096 + description: Generated server url +paths: + /api/identifier/{id}: + get: + tags: + - identifier-endpoint + summary: Export some identifier metadata + operationId: export + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "204": + description: No Content + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "412": + description: Precondition Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: string + format: binary + put: + tags: + - identifier-endpoint + summary: Update some identifier + operationId: update + parameters: + - name: id + in: query + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IdentifierDto' + required: true + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "204": + description: No Content + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "412": + description: Precondition Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/IdentifierDto' + security: + - bearerAuth: [] + delete: + tags: + - identifier-endpoint + summary: Delete some identifer + operationId: delete + parameters: + - name: id + in: query + required: true + schema: + type: integer + format: int64 + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "204": + description: No Content + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "412": + description: Precondition Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: object + security: + - bearerAuth: [] + /api/identifier: + get: + tags: + - identifier-endpoint + summary: Find identifiers + operationId: list + parameters: + - name: dbid + in: query + required: false + schema: + type: integer + format: int64 + - name: qid + in: query + required: false + schema: + type: integer + format: int64 + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "204": + description: No Content + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "412": + description: Precondition Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/IdentifierDto' + post: + tags: + - identifier-endpoint + summary: Create identifier + operationId: create + parameters: + - name: Authorization + in: header + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IdentifierCreateDto' + required: true + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "204": + description: No Content + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "412": + description: Precondition Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/IdentifierDto' + security: + - bearerAuth: [] + /api/pid/{pid}: + get: + tags: + - persistence-endpoint + summary: Find some identifier + operationId: find + parameters: + - name: pid + in: path + required: true + schema: + type: integer + format: int64 + - name: Accept + in: header + required: true + schema: + type: string + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "204": + description: No Content + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "412": + description: Precondition Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: object +components: + schemas: + ApiErrorDto: + required: + - code + - message + - status + type: object + properties: + status: + type: string + example: NOT_FOUND + enum: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Could not find container + code: + type: string + example: error.container.notfound + ContainerDto: + required: + - created + - hash + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + hash: + type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 + name: + type: string + example: Air Quality + state: + type: string + example: running + enum: + - created + - restarting + - running + - paused + - exited + - dead + databases: + type: array + items: + $ref: '#/components/schemas/DatabaseDto' + image: + $ref: '#/components/schemas/ImageBriefDto' + port: + type: integer + format: int32 + created: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + internal_name: + type: string + example: air-quality + ip_address: + type: string + CreatorDto: + required: + - created + - id + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: "Carberry, Josiah" + affiliation: + type: string + example: Wesleyan University + orcid: + type: string + example: 0000-0002-1825-0097 + created: + type: string + format: date-time + last_modified: + type: string + format: date-time + DatabaseDto: + required: + - creator + - exchange + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + exchange: + type: string + example: air_quality + creator: + $ref: '#/components/schemas/UserBriefDto' + identifier: + $ref: '#/components/schemas/IdentifierDto' + description: + type: string + example: Weather Australia 2009-2021 + tables: + type: array + items: + $ref: '#/components/schemas/TableBriefDto' + image: + $ref: '#/components/schemas/ImageDto' + container: + $ref: '#/components/schemas/ContainerDto' + created: + type: string + format: date-time + deleted: + type: string + format: date-time + internal_name: + type: string + example: weather_australia + is_public: + type: boolean + example: true + GrantedAuthorityDto: + type: object + properties: + authority: + type: string + example: ROLE_RESEARCHER + IdentifierDto: + required: + - container id + - creator + - creators + - database id + - execution + - publication_year + - query + - query_hash + - query_normalized + - result_hash + - result_number + - title + - type + - visibility + type: object + properties: + id: + type: integer + format: int64 + type: + type: string + enum: + - database + - subset + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + description: + type: string + example: "Air quality reports at Stephansplatz, Vienna" + query: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + execution: + type: string + format: date-time + visibility: + type: string + example: everyone + enum: + - everyone + - trusted + - self + doi: + type: string + example: 10.1038/nphys1170 + publisher: + type: string + example: TU Wien + creator: + $ref: '#/components/schemas/UserDto' + language: + type: string + enum: + - ab + - aa + - af + - ak + - sq + - am + - ar + - an + - hy + - as + - av + - ae + - ay + - az + - bm + - ba + - eu + - be + - bn + - bh + - bi + - bs + - br + - bg + - my + - ca + - km + - ch + - ce + - ny + - zh + - cu + - cv + - kw + - co + - cr + - hr + - cs + - da + - dv + - nl + - dz + - en + - eo + - et + - ee + - fo + - fj + - fi + - fr + - ff + - gd + - gl + - lg + - ka + - de + - ki + - el + - kl + - gn + - gu + - ht + - ha + - he + - hz + - hi + - ho + - hu + - is + - io + - ig + - id + - ia + - ie + - iu + - ik + - ga + - it + - ja + - jv + - kn + - kr + - ks + - kk + - rw + - kv + - kg + - ko + - kj + - ku + - ky + - lo + - la + - lv + - lb + - li + - ln + - lt + - lu + - mk + - mg + - ms + - ml + - mt + - gv + - mi + - mr + - mh + - ro + - mn + - na + - nv + - nd + - ng + - ne + - se + - "no" + - nb + - nn + - ii + - oc + - oj + - or + - om + - os + - pi + - pa + - ps + - fa + - pl + - pt + - qu + - rm + - rn + - ru + - sm + - sg + - sa + - sc + - sr + - sn + - sd + - si + - sk + - sl + - so + - st + - nr + - es + - su + - sw + - ss + - sv + - tl + - ty + - tg + - ta + - tt + - te + - th + - bo + - ti + - to + - ts + - tn + - tr + - tk + - tw + - ug + - uk + - ur + - uz + - ve + - vi + - vo + - wa + - cy + - fy + - wo + - xh + - yi + - yo + - za + - zu + license: + $ref: '#/components/schemas/LicenseDto' + creators: + type: array + items: + $ref: '#/components/schemas/CreatorDto' + created: + type: string + format: date-time + container id: + type: integer + format: int64 + example: 1 + database id: + type: integer + format: int64 + example: 1 + query id: + type: integer + format: int64 + example: 1 + query_normalized: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + related: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifierDto' + query_hash: + type: string + description: query hash in sha512 + result_hash: + type: string + result_number: + type: integer + format: int64 + example: 1 + publication_day: + type: integer + format: int32 + example: 15 + publication_month: + type: integer + format: int32 + example: 12 + publication_year: + type: integer + format: int32 + example: 2022 + last_modified: + type: string + format: date-time + ImageBriefDto: + required: + - id + - repository + - tag + type: object + properties: + id: + type: integer + format: int64 + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + ImageDateDto: + required: + - database_format + - example + - has_time + - id + - unix_format + type: object + properties: + id: + type: integer + format: int64 + example: + type: string + example: 30.01.2022 + database_format: + type: string + example: '%d.%c.%Y' + unix_format: + type: string + example: dd.MM.YYYY + has_time: + type: boolean + example: false + created_at: + type: string + format: date-time + ImageDto: + required: + - default_port + - dialect + - driver_class + - environment + - id + - jdbc_method + - repository + - tag + type: object + properties: + id: + type: integer + format: int64 + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + dialect: + type: string + example: org.hibernate.dialect.MariaDBDialect + hash: + type: string + example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e + compiled: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + size: + type: integer + example: 314295447 + environment: + type: array + items: + $ref: '#/components/schemas/ImageEnvItemDto' + driver_class: + type: string + example: org.mariadb.jdbc.Driver + date_formats: + type: array + items: + $ref: '#/components/schemas/ImageDateDto' + jdbc_method: + type: string + example: mariadb + default_port: + type: integer + format: int32 + example: 3306 + ImageEnvItemDto: + required: + - iid + - key + - type + - value + type: object + properties: + iid: + type: integer + format: int64 + key: + type: string + example: MARIADB_ROOT_PASSWORD + value: + type: string + example: mariadb + type: + type: string + example: PRIVILEGED_PASSWORD + enum: + - username + - password + - privileged_username + - privileged_password + LicenseDto: + required: + - identifier + - uri + type: object + properties: + identifier: + type: string + example: MIT + uri: + type: string + example: https://opensource.org/licenses/MIT + RelatedIdentifierDto: + required: + - created + - id + - value + type: object + properties: + id: + type: integer + format: int64 + value: + type: string + example: 10.70124/dc4zh-9ce78 + type: + type: string + example: DOI + enum: + - DOI + - URL + - URN + - ARK + - arXiv + - bibcode + - EAN13 + - EISSN + - Handle + - IGSN + - ISBN + - ISTC + - LISSN + - LSID + - PMID + - PURL + - UPC + - w3id + relation: + type: string + example: Cites + enum: + - IsCitedBy + - Cites + - IsSupplementTo + - IsSupplementedBy + - IsContinuedBy + - Continues + - IsDescribedBy + - Describes + - HasMetadata + - IsMetadataFor + - HasVersion + - IsVersionOf + - IsNewVersionOf + - IsPreviousVersionOf + - IsPartOf + - HasPart + - IsPublishedIn + - IsReferencedBy + - References + - IsDocumentedBy + - Documents + - IsCompiledBy + - Compiles + - IsVariantFormOf + - IsOriginalFormOf + - IsIdenticalTo + - IsReviewedBy + - Reviews + - IsDerivedFrom + - IsSourceOf + - IsRequiredBy + - Requires + - IsObsoletedBy + - Obsoletes + created: + type: string + format: date-time + deleted: + type: string + format: date-time + last_modified: + type: string + format: date-time + TableBriefDto: + required: + - creator + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + creator: + $ref: '#/components/schemas/UserBriefDto' + internal_name: + type: string + example: air_quality + UserBriefDto: + required: + - email_verified + - id + - theme_dark + - username + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + description: Only contains lowercase characters + example: user + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + titles_before: + type: string + example: Prof. + titles_after: + type: string + theme_dark: + type: boolean + example: true + email_verified: + type: boolean + example: true + UserDto: + required: + - email + - email_verified + - id + - theme_dark + - username + type: object + properties: + id: + type: integer + format: int64 + authorities: + type: array + items: + $ref: '#/components/schemas/GrantedAuthorityDto' + username: + type: string + description: Only contains lowercase characters + example: jcarberry + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + containers: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + databases: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + identifiers: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + email: + type: string + example: jcarberry@brown.edu + titles_before: + type: string + example: Prof. + titles_after: + type: string + theme_dark: + type: boolean + example: true + email_verified: + type: boolean + example: true + CreatorCreateDto: + required: + - name + type: object + properties: + name: + type: string + example: "Carberry, Josiah" + affiliation: + type: string + example: Wesleyan University + orcid: + type: string + example: 0000-0002-1825-0097 + IdentifierCreateDto: + required: + - cid + - creators + - dbid + - publication_year + - title + - type + - visibility + type: object + properties: + cid: + type: integer + format: int64 + dbid: + type: integer + format: int64 + qid: + type: integer + format: int64 + type: + type: string + enum: + - database + - subset + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + description: + type: string + example: "Air quality reports at Stephansplatz, Vienna" + visibility: + type: string + example: everyone + enum: + - everyone + - trusted + - self + doi: + type: string + example: 10.1038/nphys1170 + publisher: + type: string + example: TU Wien + language: + type: string + enum: + - ab + - aa + - af + - ak + - sq + - am + - ar + - an + - hy + - as + - av + - ae + - ay + - az + - bm + - ba + - eu + - be + - bn + - bh + - bi + - bs + - br + - bg + - my + - ca + - km + - ch + - ce + - ny + - zh + - cu + - cv + - kw + - co + - cr + - hr + - cs + - da + - dv + - nl + - dz + - en + - eo + - et + - ee + - fo + - fj + - fi + - fr + - ff + - gd + - gl + - lg + - ka + - de + - ki + - el + - kl + - gn + - gu + - ht + - ha + - he + - hz + - hi + - ho + - hu + - is + - io + - ig + - id + - ia + - ie + - iu + - ik + - ga + - it + - ja + - jv + - kn + - kr + - ks + - kk + - rw + - kv + - kg + - ko + - kj + - ku + - ky + - lo + - la + - lv + - lb + - li + - ln + - lt + - lu + - mk + - mg + - ms + - ml + - mt + - gv + - mi + - mr + - mh + - ro + - mn + - na + - nv + - nd + - ng + - ne + - se + - "no" + - nb + - nn + - ii + - oc + - oj + - or + - om + - os + - pi + - pa + - ps + - fa + - pl + - pt + - qu + - rm + - rn + - ru + - sm + - sg + - sa + - sc + - sr + - sn + - sd + - si + - sk + - sl + - so + - st + - nr + - es + - su + - sw + - ss + - sv + - tl + - ty + - tg + - ta + - tt + - te + - th + - bo + - ti + - to + - ts + - tn + - tr + - tk + - tw + - ug + - uk + - ur + - uz + - ve + - vi + - vo + - wa + - cy + - fy + - wo + - xh + - yi + - yo + - za + - zu + license: + $ref: '#/components/schemas/LicenseDto' + creators: + type: array + items: + $ref: '#/components/schemas/CreatorCreateDto' + publication_day: + type: integer + format: int32 + example: 15 + publication_month: + type: integer + format: int32 + example: 12 + publication_year: + type: integer + format: int32 + example: 2022 + related_identifiers: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifierCreateDto' + RelatedIdentifierCreateDto: + required: + - value + type: object + properties: + value: + type: string + example: 10.70124/dc4zh-9ce78 + type: + type: string + example: DOI + enum: + - DOI + - URL + - URN + - ARK + - arXiv + - bibcode + - EAN13 + - EISSN + - Handle + - IGSN + - ISBN + - ISTC + - LISSN + - LSID + - PMID + - PURL + - UPC + - w3id + relation: + type: string + example: Cites + enum: + - IsCitedBy + - Cites + - IsSupplementTo + - IsSupplementedBy + - IsContinuedBy + - Continues + - IsDescribedBy + - Describes + - HasMetadata + - IsMetadataFor + - HasVersion + - IsVersionOf + - IsNewVersionOf + - IsPreviousVersionOf + - IsPartOf + - HasPart + - IsPublishedIn + - IsReferencedBy + - References + - IsDocumentedBy + - Documents + - IsCompiledBy + - Compiles + - IsVariantFormOf + - IsOriginalFormOf + - IsIdenticalTo + - IsReviewedBy + - Reviews + - IsDerivedFrom + - IsSourceOf + - IsRequiredBy + - Requires + - IsObsoletedBy + - Obsoletes + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT diff --git a/swagger/metadata/.gitkeep b/swagger/metadata/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/swagger/metadata/api.yaml b/swagger/metadata/api.yaml new file mode 100644 index 0000000..abdbf5b --- /dev/null +++ b/swagger/metadata/api.yaml @@ -0,0 +1,159 @@ +openapi: 3.0.1 +info: + title: Database Repository Metadata Service API + description: Service that manages the metadata + contact: + name: Prof. Andreas Rauber + email: andreas.rauber@tuwien.ac.at + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + version: 1.1.0-alpha +externalDocs: + description: Wiki Documentation + url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/wikis +servers: +- url: http://localhost:9099 + description: Generated server url +paths: + /api/oai: + get: + tags: + - metadata-endpoint + summary: Get the record + operationId: identify_1_1_1_1 + parameters: + - name: verb + example: ListMetadataFormats + - name: parameters + in: query + required: true + schema: + $ref: '#/components/schemas/OaiListIdentifiersParameters' + responses: + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + text/xml;charset=UTF-8: + schema: + type: object +components: + schemas: + ApiErrorDto: + required: + - code + - message + - status + type: object + properties: + status: + type: string + example: NOT_FOUND + enum: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Could not find container + code: + type: string + example: error.container.notfound + OaiListIdentifiersParameters: + type: object + properties: + metadataPrefix: + type: string + from: + type: string + until: + type: string + set: + type: string + resumptionToken: + type: string + fromDate: + type: string + format: date-time + parametersString: + type: string + untilDate: + type: string + format: date-time diff --git a/swagger/query/.gitkeep b/swagger/query/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/swagger/query/api.yaml b/swagger/query/api.yaml new file mode 100644 index 0000000..7772e6e --- /dev/null +++ b/swagger/query/api.yaml @@ -0,0 +1,2818 @@ +openapi: 3.0.1 +info: + title: Database Repository Query Service API + description: Service that manages the queries + contact: + name: Prof. Andreas Rauber + email: andreas.rauber@tuwien.ac.at + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + version: 1.1.0-alpha +externalDocs: + description: Wiki Documentation + url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/wikis +servers: +- url: http://localhost:9093 + description: Generated server url +paths: + /api/container/{id}/database/{databaseId}/table/{tableId}/history: + get: + tags: + - table-history-endpoint + summary: Find all history + operationId: getAll + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/TableHistoryDto' + security: + - bearerAuth: [] + head: + tags: + - table-history-endpoint + summary: Find all history + operationId: getAll_1 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/TableHistoryDto' + security: + - bearerAuth: [] + /api/container/{id}/database/{databaseId}/table/{tableId}/data: + get: + tags: + - table-data-endpoint + summary: Find data + operationId: getAll_2 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + - name: timestamp + in: query + required: false + schema: + type: string + format: date-time + - name: page + in: query + required: false + schema: + type: integer + format: int64 + - name: size + in: query + required: false + schema: + type: integer + format: int64 + - name: sortDirection + in: query + required: false + schema: + type: string + enum: + - asc + - desc + - name: sortColumn + in: query + required: false + schema: + type: string + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/QueryResultDto' + security: + - bearerAuth: [] + put: + tags: + - table-data-endpoint + summary: Update data + operationId: update + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TableCsvUpdateDto' + required: true + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + security: + - bearerAuth: [] + post: + tags: + - table-data-endpoint + summary: Insert data + operationId: insert + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TableCsvDto' + required: true + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + security: + - bearerAuth: [] + delete: + tags: + - table-data-endpoint + summary: Delete data + operationId: delete_1 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TableCsvDeleteDto' + required: true + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + security: + - bearerAuth: [] + head: + tags: + - table-data-endpoint + summary: Find data + operationId: getAll_3 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + - name: timestamp + in: query + required: false + schema: + type: string + format: date-time + - name: page + in: query + required: false + schema: + type: integer + format: int64 + - name: size + in: query + required: false + schema: + type: integer + format: int64 + - name: sortDirection + in: query + required: false + schema: + type: string + enum: + - asc + - desc + - name: sortColumn + in: query + required: false + schema: + type: string + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/QueryResultDto' + security: + - bearerAuth: [] + /api/container/{id}/database/{databaseId}/query: + get: + tags: + - store-endpoint + summary: Find queries + operationId: findAll_2 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: persisted + in: query + required: false + schema: + type: boolean + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/QueryBriefDto' + security: + - bearerAuth: [] + put: + tags: + - query-endpoint + summary: Execute query + operationId: execute + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: page + in: query + required: false + schema: + type: integer + format: int64 + - name: size + in: query + required: false + schema: + type: integer + format: int64 + - name: sortDirection + in: query + required: false + schema: + type: string + enum: + - asc + - desc + - name: sortColumn + in: query + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ExecuteStatementDto' + required: true + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/QueryResultDto' + security: + - bearerAuth: [] + /api/container/{id}/database/{databaseId}/query/{queryId}: + get: + tags: + - store-endpoint + summary: Find some query + operationId: find + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: queryId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/QueryDto' + security: + - bearerAuth: [] + put: + tags: + - store-endpoint + summary: Persist some query + operationId: persist + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: queryId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/QueryDto' + security: + - bearerAuth: [] + /api/container/{id}/database/{databaseId}/view: + get: + tags: + - view-endpoint + summary: Find all views + operationId: findAll + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/ViewBriefDto' + security: + - bearerAuth: [] + post: + tags: + - view-endpoint + summary: Create a view + operationId: create + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ViewCreateDto' + required: true + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ViewBriefDto' + security: + - bearerAuth: [] + /api/container/{id}/database/{databaseId}/table/{tableId}/data/import: + post: + tags: + - table-data-endpoint + summary: Insert data from csv + operationId: importCsv + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ImportDto' + required: true + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + security: + - bearerAuth: [] + /api/container/{id}/database/{databaseId}/view/{viewId}: + get: + tags: + - view-endpoint + summary: Find one view + operationId: findAll_1 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: viewId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/ViewDto' + security: + - bearerAuth: [] + delete: + tags: + - view-endpoint + summary: Delete one view + operationId: delete + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: viewId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: object + security: + - bearerAuth: [] + /api/container/{id}/database/{databaseId}/view/{viewId}/data: + get: + tags: + - view-endpoint + summary: Find view data + operationId: data + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: viewId + in: path + required: true + schema: + type: integer + format: int64 + - name: page + in: query + required: false + schema: + type: integer + format: int64 + - name: size + in: query + required: false + schema: + type: integer + format: int64 + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/QueryResultDto' + security: + - bearerAuth: [] + /api/container/{id}/database/{databaseId}/table/{tableId}/export: + get: + tags: + - export-endpoint + summary: Export table + operationId: export + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + - name: timestamp + in: query + required: false + schema: + type: string + format: date-time + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: string + format: binary + security: + - bearerAuth: [] + /api/container/{id}/database/{databaseId}/query/{queryId}/export: + get: + tags: + - query-endpoint + summary: Exports some query + operationId: export_1 + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: queryId + in: path + required: true + schema: + type: integer + format: int64 + - name: download + in: query + required: false + schema: + type: string + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: object + security: + - bearerAuth: [] + /api/container/{id}/database/{databaseId}/query/{queryId}/data: + get: + tags: + - query-endpoint + summary: Re-execute some query + operationId: reExecute + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: queryId + in: path + required: true + schema: + type: integer + format: int64 + - name: page + in: query + required: false + schema: + type: integer + format: int64 + - name: size + in: query + required: false + schema: + type: integer + format: int64 + - name: sortDirection + in: query + required: false + schema: + type: string + enum: + - asc + - desc + - name: sortColumn + in: query + required: false + schema: + type: string + responses: + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "423": + description: Locked + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "417": + description: Expectation Failed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/QueryResultDto' + security: + - bearerAuth: [] +components: + schemas: + ApiErrorDto: + required: + - code + - message + - status + type: object + properties: + status: + type: string + example: NOT_FOUND + enum: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Could not find container + code: + type: string + example: error.container.notfound + TableHistoryDto: + required: + - event + - timestamp + - total + type: object + properties: + timestamp: + type: string + format: date-time + event: + type: string + total: + type: integer + format: int64 + example: 1 + QueryResultDto: + required: + - id + - result + type: object + properties: + result: + type: array + items: + type: object + additionalProperties: + type: object + id: + type: integer + format: int64 + resultNumber: + type: integer + format: int64 + example: 1 + TableCsvUpdateDto: + required: + - data + - keys + type: object + properties: + data: + type: object + additionalProperties: + type: object + keys: + type: object + additionalProperties: + type: object + ExecuteStatementDto: + required: + - statement + type: object + properties: + statement: + type: string + example: SELECT `id` FROM `air_quality` + ContainerDto: + required: + - created + - hash + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + hash: + type: string + example: f829dd8a884182d0da846f365dee1221fd16610a14c81b8f9f295ff162749e50 + name: + type: string + example: Air Quality + state: + type: string + example: running + enum: + - created + - restarting + - running + - paused + - exited + - dead + databases: + type: array + items: + $ref: '#/components/schemas/DatabaseDto' + image: + $ref: '#/components/schemas/ImageBriefDto' + port: + type: integer + format: int32 + created: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + internal_name: + type: string + example: air-quality + ip_address: + type: string + CreatorDto: + required: + - created + - id + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: "Carberry, Josiah" + affiliation: + type: string + example: Wesleyan University + orcid: + type: string + example: 0000-0002-1825-0097 + created: + type: string + format: date-time + last_modified: + type: string + format: date-time + DatabaseDto: + required: + - creator + - exchange + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + exchange: + type: string + example: air_quality + creator: + $ref: '#/components/schemas/UserBriefDto' + identifier: + $ref: '#/components/schemas/IdentifierDto' + description: + type: string + example: Weather Australia 2009-2021 + tables: + type: array + items: + $ref: '#/components/schemas/TableBriefDto' + image: + $ref: '#/components/schemas/ImageDto' + container: + $ref: '#/components/schemas/ContainerDto' + created: + type: string + format: date-time + deleted: + type: string + format: date-time + internal_name: + type: string + example: weather_australia + is_public: + type: boolean + example: true + GrantedAuthorityDto: + type: object + properties: + authority: + type: string + example: ROLE_RESEARCHER + IdentifierDto: + required: + - container id + - creator + - creators + - database id + - execution + - publication_year + - query + - query_hash + - query_normalized + - result_hash + - result_number + - title + - type + - visibility + type: object + properties: + id: + type: integer + format: int64 + type: + type: string + enum: + - database + - subset + title: + type: string + example: "Airquality Stephansplatz, Vienna, Austria" + description: + type: string + example: "Air quality reports at Stephansplatz, Vienna" + query: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + execution: + type: string + format: date-time + visibility: + type: string + example: everyone + enum: + - everyone + - trusted + - self + doi: + type: string + example: 10.1038/nphys1170 + publisher: + type: string + example: TU Wien + creator: + $ref: '#/components/schemas/UserDto' + language: + type: string + enum: + - ab + - aa + - af + - ak + - sq + - am + - ar + - an + - hy + - as + - av + - ae + - ay + - az + - bm + - ba + - eu + - be + - bn + - bh + - bi + - bs + - br + - bg + - my + - ca + - km + - ch + - ce + - ny + - zh + - cu + - cv + - kw + - co + - cr + - hr + - cs + - da + - dv + - nl + - dz + - en + - eo + - et + - ee + - fo + - fj + - fi + - fr + - ff + - gd + - gl + - lg + - ka + - de + - ki + - el + - kl + - gn + - gu + - ht + - ha + - he + - hz + - hi + - ho + - hu + - is + - io + - ig + - id + - ia + - ie + - iu + - ik + - ga + - it + - ja + - jv + - kn + - kr + - ks + - kk + - rw + - kv + - kg + - ko + - kj + - ku + - ky + - lo + - la + - lv + - lb + - li + - ln + - lt + - lu + - mk + - mg + - ms + - ml + - mt + - gv + - mi + - mr + - mh + - ro + - mn + - na + - nv + - nd + - ng + - ne + - se + - "no" + - nb + - nn + - ii + - oc + - oj + - or + - om + - os + - pi + - pa + - ps + - fa + - pl + - pt + - qu + - rm + - rn + - ru + - sm + - sg + - sa + - sc + - sr + - sn + - sd + - si + - sk + - sl + - so + - st + - nr + - es + - su + - sw + - ss + - sv + - tl + - ty + - tg + - ta + - tt + - te + - th + - bo + - ti + - to + - ts + - tn + - tr + - tk + - tw + - ug + - uk + - ur + - uz + - ve + - vi + - vo + - wa + - cy + - fy + - wo + - xh + - yi + - yo + - za + - zu + license: + $ref: '#/components/schemas/LicenseDto' + creators: + type: array + items: + $ref: '#/components/schemas/CreatorDto' + created: + type: string + format: date-time + container id: + type: integer + format: int64 + example: 1 + database id: + type: integer + format: int64 + example: 1 + query id: + type: integer + format: int64 + example: 1 + query_normalized: + type: string + example: "SELECT `id`, `value`, `location` FROM `air_quality` WHERE `location`\ + \ = \"09:STEF\"" + related: + type: array + items: + $ref: '#/components/schemas/RelatedIdentifierDto' + query_hash: + type: string + description: query hash in sha512 + result_hash: + type: string + result_number: + type: integer + format: int64 + example: 1 + publication_day: + type: integer + format: int32 + example: 15 + publication_month: + type: integer + format: int32 + example: 12 + publication_year: + type: integer + format: int32 + example: 2022 + last_modified: + type: string + format: date-time + ImageBriefDto: + required: + - id + - repository + - tag + type: object + properties: + id: + type: integer + format: int64 + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + ImageDateDto: + required: + - database_format + - example + - has_time + - id + - unix_format + type: object + properties: + id: + type: integer + format: int64 + example: + type: string + example: 30.01.2022 + database_format: + type: string + example: '%d.%c.%Y' + unix_format: + type: string + example: dd.MM.YYYY + has_time: + type: boolean + example: false + created_at: + type: string + format: date-time + ImageDto: + required: + - default_port + - dialect + - driver_class + - environment + - id + - jdbc_method + - repository + - tag + type: object + properties: + id: + type: integer + format: int64 + repository: + type: string + example: mariadb + tag: + type: string + example: "10.5" + dialect: + type: string + example: org.hibernate.dialect.MariaDBDialect + hash: + type: string + example: sha256:c5ec7353d87dfc35067e7bffeb25d6a0d52dad41e8b7357213e3b12d6e7ff78e + compiled: + type: string + format: date-time + example: 2021-03-12T15:26:21.678396092Z + size: + type: integer + example: 314295447 + environment: + type: array + items: + $ref: '#/components/schemas/ImageEnvItemDto' + driver_class: + type: string + example: org.mariadb.jdbc.Driver + date_formats: + type: array + items: + $ref: '#/components/schemas/ImageDateDto' + jdbc_method: + type: string + example: mariadb + default_port: + type: integer + format: int32 + example: 3306 + ImageEnvItemDto: + required: + - iid + - key + - type + - value + type: object + properties: + iid: + type: integer + format: int64 + key: + type: string + example: MARIADB_ROOT_PASSWORD + value: + type: string + example: mariadb + type: + type: string + example: PRIVILEGED_PASSWORD + enum: + - username + - password + - privileged_username + - privileged_password + LicenseDto: + required: + - identifier + - uri + type: object + properties: + identifier: + type: string + example: MIT + uri: + type: string + example: https://opensource.org/licenses/MIT + QueryDto: + required: + - cid + - created + - creator + - dbid + - id + - is_persisted + - query + - query_hash + type: object + properties: + id: + type: integer + format: int64 + cid: + type: integer + format: int64 + dbid: + type: integer + format: int64 + creator: + $ref: '#/components/schemas/UserDto' + execution: + type: string + format: date-time + query: + type: string + example: SELECT `id` FROM `air_quality` + type: + type: string + example: query + enum: + - query + - view + created: + type: string + format: date-time + query_normalized: + type: string + example: SELECT `id` FROM `air_quality` + query_hash: + type: string + is_persisted: + type: boolean + result_hash: + type: string + result_number: + type: integer + format: int64 + example: 1 + last_modified: + type: string + format: date-time + RelatedIdentifierDto: + required: + - created + - id + - value + type: object + properties: + id: + type: integer + format: int64 + value: + type: string + example: 10.70124/dc4zh-9ce78 + type: + type: string + example: DOI + enum: + - DOI + - URL + - URN + - ARK + - arXiv + - bibcode + - EAN13 + - EISSN + - Handle + - IGSN + - ISBN + - ISTC + - LISSN + - LSID + - PMID + - PURL + - UPC + - w3id + relation: + type: string + example: Cites + enum: + - IsCitedBy + - Cites + - IsSupplementTo + - IsSupplementedBy + - IsContinuedBy + - Continues + - IsDescribedBy + - Describes + - HasMetadata + - IsMetadataFor + - HasVersion + - IsVersionOf + - IsNewVersionOf + - IsPreviousVersionOf + - IsPartOf + - HasPart + - IsPublishedIn + - IsReferencedBy + - References + - IsDocumentedBy + - Documents + - IsCompiledBy + - Compiles + - IsVariantFormOf + - IsOriginalFormOf + - IsIdenticalTo + - IsReviewedBy + - Reviews + - IsDerivedFrom + - IsSourceOf + - IsRequiredBy + - Requires + - IsObsoletedBy + - Obsoletes + created: + type: string + format: date-time + deleted: + type: string + format: date-time + last_modified: + type: string + format: date-time + TableBriefDto: + required: + - creator + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + creator: + $ref: '#/components/schemas/UserBriefDto' + internal_name: + type: string + example: air_quality + UserBriefDto: + required: + - email_verified + - id + - theme_dark + - username + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + description: Only contains lowercase characters + example: user + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + titles_before: + type: string + example: Prof. + titles_after: + type: string + theme_dark: + type: boolean + example: true + email_verified: + type: boolean + example: true + UserDto: + required: + - email + - email_verified + - id + - theme_dark + - username + type: object + properties: + id: + type: integer + format: int64 + authorities: + type: array + items: + $ref: '#/components/schemas/GrantedAuthorityDto' + username: + type: string + description: Only contains lowercase characters + example: jcarberry + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + containers: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + databases: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + identifiers: + type: array + items: + $ref: '#/components/schemas/ContainerDto' + email: + type: string + example: jcarberry@brown.edu + titles_before: + type: string + example: Prof. + titles_after: + type: string + theme_dark: + type: boolean + example: true + email_verified: + type: boolean + example: true + ViewCreateDto: + required: + - is_public + - name + - query + type: object + properties: + name: + type: string + example: Air Quality + query: + type: string + example: SELECT `id` FROM `air_quality` + is_public: + type: boolean + example: true + ViewBriefDto: + required: + - created + - created_by + - id + - query + - vdbid + type: object + properties: + id: + type: integer + format: int64 + vdbid: + type: integer + format: int64 + name: + type: string + example: Air Quality + query: + type: string + example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC + created: + type: string + format: date-time + deleted: + type: string + format: date-time + is_public: + type: boolean + example: true + initial_view: + type: boolean + description: True if it is the default view for the database + example: true + created_by: + type: integer + format: int64 + last_modified: + type: string + format: date-time + TableCsvDto: + required: + - data + type: object + properties: + data: + type: object + additionalProperties: + type: object + ImportDto: + required: + - location + - separator + type: object + properties: + location: + type: string + example: /tmp/file.csv + separator: + type: string + example: "," + quote: + type: string + example: '"' + skip_lines: + minimum: 0 + type: integer + format: int64 + false_element: + type: string + true_element: + type: string + null_element: + type: string + example: NA + ViewDto: + required: + - created + - creator + - database + - id + - name + - query + - vdbid + type: object + properties: + id: + type: integer + format: int64 + vdbid: + type: integer + format: int64 + creator: + $ref: '#/components/schemas/UserDto' + database: + $ref: '#/components/schemas/DatabaseDto' + name: + type: string + example: Air Quality + query: + type: string + example: SELECT `id` FROM `air_quality` ORDER BY `value` DESC + created: + type: string + format: date-time + deleted: + type: string + format: date-time + is_public: + type: boolean + example: true + initial_view: + type: boolean + description: True if it is the default view for the database + example: true + last_modified: + type: string + format: date-time + QueryBriefDto: + required: + - cid + - created + - creator + - dbid + - id + - query + - query_hash + type: object + properties: + id: + type: integer + format: int64 + cid: + type: integer + format: int64 + dbid: + type: integer + format: int64 + creator: + $ref: '#/components/schemas/UserDto' + execution: + type: string + format: date-time + query: + type: string + example: SELECT `id` FROM `air_quality` + type: + type: string + example: query + enum: + - query + - view + created: + type: string + format: date-time + query_normalized: + type: string + example: SELECT `id` FROM `air_quality` + query_hash: + type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 + result_hash: + type: string + example: 17e682f060b5f8e47ea04c5c4855908b0a5ad612022260fe50e11ecb0cc0ab76 + result_number: + type: integer + format: int64 + example: 1 + last_modified: + type: string + format: date-time + TableCsvDeleteDto: + required: + - keys + type: object + properties: + keys: + type: object + additionalProperties: + type: object + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT diff --git a/swagger/table/.gitkeep b/swagger/table/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/swagger/table/api.yaml b/swagger/table/api.yaml new file mode 100644 index 0000000..1624286 --- /dev/null +++ b/swagger/table/api.yaml @@ -0,0 +1,677 @@ +openapi: 3.0.1 +info: + title: Database Repository Table Service API + description: Service that manages the tables + contact: + name: Prof. Andreas Rauber + email: andreas.rauber@tuwien.ac.at + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + version: 1.1.0-alpha +externalDocs: + description: Wiki Documentation + url: https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/wikis +servers: +- url: http://localhost:9094 + description: Generated server url +paths: + /api/container/{id}/database/{databaseId}/table/{tableId}: + get: + tags: + - table-endpoint + summary: Get information about table + operationId: findById + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/TableDto' + security: + - bearerAuth: [] + put: + tags: + - table-endpoint + summary: Update a table + operationId: update + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/TableBriefDto' + security: + - bearerAuth: [] + delete: + tags: + - table-endpoint + summary: Delete a table + operationId: delete + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + - name: tableId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + security: + - bearerAuth: [] + /api/container/{id}/database/{databaseId}/table: + get: + tags: + - table-endpoint + summary: List all tables + operationId: list + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/TableBriefDto' + security: + - bearerAuth: [] + post: + tags: + - table-endpoint + summary: Create a table + operationId: create + parameters: + - name: id + in: path + required: true + schema: + type: integer + format: int64 + - name: databaseId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TableCreateDto' + required: true + responses: + "400": + description: Bad Request + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "409": + description: Conflict + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "404": + description: Not Found + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "405": + description: Method Not Allowed + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "406": + description: Not Acceptable + content: + '*/*': + schema: + $ref: '#/components/schemas/ApiErrorDto' + "200": + description: OK + content: + '*/*': + schema: + $ref: '#/components/schemas/TableBriefDto' + security: + - bearerAuth: [] +components: + schemas: + ApiErrorDto: + required: + - code + - message + - status + type: object + properties: + status: + type: string + example: NOT_FOUND + enum: + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED + message: + type: string + example: Could not find container + code: + type: string + example: error.container.notfound + TableBriefDto: + required: + - creator + - id + - internal_name + - name + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + creator: + $ref: '#/components/schemas/UserBriefDto' + internal_name: + type: string + example: air_quality + UserBriefDto: + required: + - email_verified + - id + - theme_dark + - username + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + description: Only contains lowercase characters + example: user + firstname: + type: string + example: Josiah + lastname: + type: string + example: Carberry + affiliation: + type: string + example: Brown University + orcid: + type: string + example: 0000-0002-1825-0097 + titles_before: + type: string + example: Prof. + titles_after: + type: string + theme_dark: + type: boolean + example: true + email_verified: + type: boolean + example: true + ColumnCreateDto: + required: + - name + - null_allowed + - primary_key + - type + - unique + type: object + properties: + name: + type: string + example: Date + type: + type: string + example: string + enum: + - enum + - number + - decimal + - string + - text + - boolean + - date + - timestamp + - blob + dfid: + type: integer + description: date format id + format: int64 + unique: + type: boolean + example: false + references: + type: string + primary_key: + type: boolean + example: false + null_allowed: + type: boolean + example: true + check_expression: + type: string + foreign_key: + type: string + enum_values: + type: array + items: + type: string + TableCreateDto: + required: + - columns + - description + - name + type: object + properties: + name: + type: string + example: Air Quality + description: + type: string + example: Air Quality in Austria + columns: + type: array + items: + $ref: '#/components/schemas/ColumnCreateDto' + ColumnDto: + required: + - auto_generated + - column_type + - id + - internal_name + - is_null_allowed + - is_primary_key + - name + - unique + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Date + unique: + type: boolean + example: true + references: + type: string + internal_name: + type: string + example: mdb_date + date_format: + $ref: '#/components/schemas/ImageDateDto' + auto_generated: + type: boolean + example: false + is_primary_key: + type: boolean + example: true + column_type: + type: string + example: string + enum: + - enum + - number + - decimal + - string + - text + - boolean + - date + - timestamp + - blob + column_concept: + $ref: '#/components/schemas/ConceptDto' + is_null_allowed: + type: boolean + example: false + check_expression: + type: string + foreign_key: + type: string + enum_values: + type: array + items: + type: string + ConceptDto: + required: + - created + - name + - uri + type: object + properties: + uri: + type: string + name: + type: string + created: + type: string + format: date-time + ImageDateDto: + required: + - database_format + - example + - has_time + - id + - unix_format + type: object + properties: + id: + type: integer + format: int64 + example: + type: string + example: 30.01.2022 + database_format: + type: string + example: '%d.%c.%Y' + unix_format: + type: string + example: dd.MM.YYYY + has_time: + type: boolean + example: false + created_at: + type: string + format: date-time + TableDto: + required: + - columns + - creator + - description + - id + - internal_name + - name + - topic + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + example: Air Quality + creator: + $ref: '#/components/schemas/UserBriefDto' + topic: + type: string + example: air_quality + description: + type: string + example: Air Quality in Austria + created: + type: string + format: date-time + columns: + type: array + items: + $ref: '#/components/schemas/ColumnDto' + internal_name: + type: string + example: air_quality + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT diff --git a/swagger/units/.gitkeep b/swagger/units/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/swagger/units/api.yaml b/swagger/units/api.yaml new file mode 100644 index 0000000..39fd737 --- /dev/null +++ b/swagger/units/api.yaml @@ -0,0 +1 @@ +{"definitions":{},"info":{"description":"powered by Flasgger","termsOfService":"/tos","title":"units","version":"0.0.1"},"paths":{"/api/units/savecolumnsconcept":{"post":{"consumes":["application/json"],"description":"This is a simple API for saving units and concepts.","parameters":[{"description":"to-do description","in":"body","name":"body","required":true,"schema":{"properties":{"cdbid":{"example":"1","type":"integer"},"cid":{"example":"1","type":"integer"},"tid":{"example":"1","type":"integer"},"uri":{"example":"http://www.ontology-of-units-of-measure.org/resource/om-2/metre","type":"string"}},"type":"object"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"405":{"description":"Invalid input"},"409":{"description":"Concept already assigned"}},"summary":"Save concepts to MDB"}},"/api/units/saveconcept":{"post":{"consumes":["application/json"],"description":"This is a simple API for saving units and concepts.","parameters":[{"description":"to-do description","in":"body","name":"body","required":true,"schema":{"properties":{"name":{"example":"metre","type":"string"},"uri":{"example":"http://www.ontology-of-units-of-measure.org/resource/om-2/metre","type":"string"}},"type":"object"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"405":{"description":"Invalid input"},"409":{"description":"Concept already present"}},"summary":"Save concepts to MDB"}},"/api/units/suggest":{"post":{"consumes":["application/json"],"description":"This is a simple API which returns a list of suggested units.","parameters":[{"description":"to-do description","in":"body","name":"body","required":true,"schema":{"properties":{"offset":{"example":0,"type":"integer"},"ustring":{"example":"met","type":"string"}},"type":"object"}}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Autosuggest units"}},"/api/units/uri/{uname}":{"get":{"consumes":["application/json"],"description":"This is a simple API for getting the URI of a certain unit in OM.","parameters":[{"description":"to-do description","in":"path","name":"uname","required":true,"type":"string"}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Get URI of units"}},"/api/units/validate/{unit}":{"get":{"consumes":["application/json"],"description":"This is a simple API for validating units.","parameters":[{"description":"to-do description","in":"path","name":"unit","required":true,"type":"string"}],"produces":["application/json"],"responses":{"200":{"description":"OK"},"405":{"description":"Invalid input"}},"summary":"Validate units"}}},"swagger":"2.0","swaggerUiPrefix":""} -- GitLab