diff --git a/openapi.json b/openapi.json deleted file mode 100644 index 3b4c1d2..0000000 --- a/openapi.json +++ /dev/null @@ -1,655 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "Typed PID Maker - RESTful API", - "description": "The Typed PID Maker is a service for creating, updating, obtaining and validating PID record information using Kernel Information Profiles, as defined by the Research Data Alliance.", - "contact": { - "name": "KIT Data Manager Support", - "url": "https://github.com/kit-data-manager", - "email": "support@datamanager.kit.edu" - }, - "license": { - "name": "Apache 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" - }, - "version": "2.0.0" - }, - "servers": [ - { - "url": "http://localhost:8090", - "description": "Generated server url" - } - ], - "paths": { - "/api/v1/pit/pid/**": { - "get": { - "tags": [ - "typing-rest-resource-impl" - ], - "summary": "Get the record of the given PID.", - "description": "Get the record to the given PID, if it exists. No validation is performed by default.", - "operationId": "getRecord", - "parameters": [ - { - "name": "validation", - "in": "query", - "description": "If true, validation will be run on the resolved PID. On failure, an error will be returned. On success, the PID will be resolved.", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - } - ], - "responses": { - "400": { - "description": "Validation failed. See body for details.", - "content": { - "application/json": {} - } - }, - "500": { - "description": "Server error. See body for details.", - "content": { - "application/json": {} - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": {} - } - }, - "503": { - "description": "Communication to required external service failed.", - "content": { - "application/json": {} - } - }, - "200": { - "description": "Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PIDRecord" - } - }, - "application/vnd.datamanager.pid.simple+json": { - "schema": { - "$ref": "#/components/schemas/SimplePidRecord" - } - } - } - } - } - }, - "put": { - "tags": [ - "typing-rest-resource-impl" - ], - "summary": "Update an existing PID record", - "description": "Update an existing PID record using the record information from the request body.", - "operationId": "updatePID", - "requestBody": { - "description": "The body containing all PID record values as they should be after the update.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PIDRecord" - } - }, - "application/vnd.datamanager.pid.simple+json": { - "schema": { - "$ref": "#/components/schemas/SimplePidRecord" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Validation failed. See body for details.", - "content": { - "application/json": {} - } - }, - "406": { - "description": "Provided input is invalid with regard to the supported accept header (Not acceptable)", - "content": { - "application/json": {} - } - }, - "500": { - "description": "Server error. See body for details.", - "content": { - "application/json": {} - } - }, - "200": { - "description": "Success.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PIDRecord" - } - }, - "application/vnd.datamanager.pid.simple+json": { - "schema": { - "$ref": "#/components/schemas/SimplePidRecord" - } - } - } - }, - "503": { - "description": "Communication to required external service failed.", - "content": { - "application/json": {} - } - }, - "415": { - "description": "Provided input is invalid with regard to the supported content types. (Unsupported Mediatype)", - "content": { - "application/json": {} - } - }, - "428": { - "description": "No ETag given in If-Match header (Precondition required)", - "content": { - "application/json": {} - } - }, - "412": { - "description": "ETag comparison failed (Precondition failed)", - "content": { - "application/json": {} - } - } - } - } - }, - "/api/v1/search": { - "post": { - "tags": [ - "search-controller" - ], - "summary": "Search for resources.", - "description": "Search for resources using the configured Elastic backend. This endpoint serves as direct proxy to the RESTful endpoint of Elastic. In the body, a query document following the Elastic query format has to be provided. Format errors are returned directly from Elastic. This endpoint also supports authentication and authorization. User information obtained via JWT is applied to the provided query as post filter. If a post filter was already provided with the query it will be replaced. Furthermore, this endpoint supports pagination. 'page' and 'size' query parameters are translated into the Elastic attributes 'from' and 'size' automatically, if not already provided within the query by the caller.", - "operationId": "search", - "parameters": [ - { - "name": "proxy", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/ProxyExchangeByte[]" - } - }, - { - "name": "page", - "in": "query", - "description": "Zero-based page index (0..N)", - "schema": { - "type": "integer", - "default": 0 - } - }, - { - "name": "size", - "in": "query", - "description": "The size of the page to be returned", - "schema": { - "type": "integer", - "default": 20 - } - }, - { - "name": "sort", - "in": "query", - "description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/hal+json": { - "schema": { - "type": "object" - } - } - } - }, - "200": { - "description": "OK", - "content": { - "application/hal+json": { - "schema": { - "type": "object" - } - } - } - } - }, - "security": [ - { - "bearer-jwt": [] - } - ] - } - }, - "/api/v1/pit/pid/": { - "post": { - "tags": [ - "typing-rest-resource-impl" - ], - "summary": "Create a new PID record", - "description": "Create a new PID record using the record information from the request body.", - "operationId": "createPID", - "parameters": [ - { - "name": "dryrun", - "in": "query", - "description": "If true, only validation will be done and no PID will be created. No data will be changed and no services will be notified.", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "description": "The body containing all PID record values as they should be in the new PIDs record.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PIDRecord" - } - }, - "application/vnd.datamanager.pid.simple+json": { - "schema": { - "$ref": "#/components/schemas/SimplePidRecord" - } - } - }, - "required": true - }, - "responses": { - "400": { - "description": "Validation failed. See body for details. Contains also the validated record.", - "content": { - "application/json": {} - } - }, - "406": { - "description": "Provided input is invalid with regard to the supported accept header (Not acceptable)", - "content": { - "application/json": {} - } - }, - "500": { - "description": "Server error. See body for details.", - "content": { - "application/json": {} - } - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PIDRecord" - } - }, - "application/vnd.datamanager.pid.simple+json": { - "schema": { - "$ref": "#/components/schemas/SimplePidRecord" - } - } - } - }, - "503": { - "description": "Communication to required external service failed.", - "content": { - "application/json": {} - } - }, - "409": { - "description": "If providing an own PID is enabled 409 indicates, that the PID already exists.", - "content": { - "application/json": {} - } - }, - "415": { - "description": "Provided input is invalid with regard to the supported content types. (Unsupported Mediatype)", - "content": { - "application/json": {} - } - } - } - } - }, - "/api/v1/pit/known-pid": { - "get": { - "tags": [ - "typing-rest-resource-impl" - ], - "summary": "Returns all known PIDs. Supports paging, filtering criteria, and different formats.", - "description": "Returns all known PIDs, limited by the given page size and number. Several filtering criteria are also available. Known PIDs are defined as being stored in a local store. This store is not a cache! Instead, the service remembers every PID which it created (and resolved, depending on the configuration parameter `pit.storage.strategy` of the service) on request. Use the Accept header to adjust the format.", - "operationId": "findAll_1", - "parameters": [ - { - "name": "created_after", - "in": "query", - "description": "The UTC time of the earliest creation timestamp of a returned PID.", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "created_before", - "in": "query", - "description": "The UTC time of the latest creation timestamp of a returned PID.", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "modified_after", - "in": "query", - "description": "The UTC time of the earliest modification timestamp of a returned PID.", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "modified_before", - "in": "query", - "description": "The UTC time of the latest modification timestamp of a returned PID.", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "page", - "in": "query", - "description": "Zero-based page index (0..N)", - "schema": { - "type": "integer", - "default": 0 - } - }, - { - "name": "size", - "in": "query", - "description": "The size of the page to be returned", - "schema": { - "type": "integer", - "default": 20 - } - }, - { - "name": "sort", - "in": "query", - "description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "Accept", - "in": "header", - "schema": { - "type": "string", - "enum": [ - "application/tabulator+json" - ] - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/hal+json": { - "schema": { - "type": "object" - } - } - } - }, - "200": { - "description": "If the request was valid. May return an empty list.", - "content": { - "application/hal+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/KnownPid" - } - } - }, - "application/tabulator+json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/TabulatorPaginationFormatKnownPid" - }, - { - "$ref": "#/components/schemas/TabulatorPaginationFormat" - } - ] - } - } - } - }, - "500": { - "description": "Server error. See body for details.", - "content": { - "application/json": {}, - "application/tabulator+json": { - "schema": { - "$ref": "#/components/schemas/TabulatorPaginationFormatKnownPid" - } - } - } - } - } - } - }, - "/api/v1/pit/known-pid/**": { - "get": { - "tags": [ - "typing-rest-resource-impl" - ], - "summary": "Returns a PID and its timestamps from the local store, if available.", - "description": "Returns a PID from the local store. This store is not a cache! Instead, the service remembers every PID which it created (and resolved, depending on the configuration parameter `pit.storage.strategy` of the service) on request. If this PID is known, it will be returned together with the timestamps of creation and modification executed on this PID by this service.", - "operationId": "findByPid", - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/hal+json": { - "schema": { - "type": "object" - } - } - } - }, - "200": { - "description": "If the PID is known and its information was returned.", - "content": { - "application/hal+json": { - "schema": { - "$ref": "#/components/schemas/KnownPid" - } - } - } - }, - "404": { - "description": "If the PID is unknown.", - "content": { - "application/json": {} - } - }, - "500": { - "description": "Server error. See body for details.", - "content": { - "application/json": {} - } - } - } - } - } - }, - "components": { - "schemas": { - "PIDRecord": { - "type": "object", - "properties": { - "pid": { - "type": "string" - }, - "entries": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PIDRecordEntry" - } - } - } - } - }, - "PIDRecordEntry": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "SimplePair": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "SimplePidRecord": { - "type": "object", - "properties": { - "pid": { - "type": "string" - }, - "record": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SimplePair" - } - } - } - }, - "JsonNode": { - "type": "object" - }, - "ProxyExchangeByte[]": { - "type": "object" - }, - "KnownPid": { - "required": [ - "created", - "modified", - "pid" - ], - "type": "object", - "properties": { - "pid": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "modified": { - "type": "string", - "format": "date-time" - } - } - }, - "TabulatorPaginationFormat": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object" - } - }, - "last_page": { - "type": "integer", - "format": "int32" - } - } - }, - "TabulatorPaginationFormatKnownPid": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/KnownPid" - } - }, - "last_page": { - "type": "integer", - "format": "int32" - } - } - } - }, - "securitySchemes": { - "bearer-jwt": { - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" - } - } - } -} \ No newline at end of file