openapi: 3.0.0 info: title: Interface for Ports used as file storage version: '1.0' description: >- This document describes the interface of the port owncloud from the innermost circle of the rds architecture to the second circle. contact: name: Peter Heiss email: peter.heiss@uni-muenster.de url: 'https://www.research-data-services.org' servers: - url: 'http://port:3000/storage' paths: /file: parameters: [] get: summary: Get file tags: [] responses: '200': description: OK content: application/octet-stream: schema: type: string application/json: schema: type: string description: Returns the file parameters: [] requestBody: content: application/json: schema: type: object properties: filepath: type: string userId: $ref: '#/components/schemas/portusername' required: - filepath post: summary: Create the file in filepath responses: '200': description: OK description: Create the file parameters: [] requestBody: content: multipart/form-data: schema: type: object properties: filepath: type: string userId: $ref: '#/components/schemas/portusername' files: type: object required: - filepath delete: summary: '' responses: '200': description: OK description: Delete the file parameters: [] requestBody: content: application/json: schema: type: object properties: filepath: type: string userId: $ref: '#/components/schemas/portusername' required: - filepath description: '' patch: summary: '' responses: '200': description: OK description: Update the file parameters: [] requestBody: content: application/json: schema: type: object properties: filepath: type: string userId: $ref: '#/components/schemas/portusername' required: - filepath /folder: get: summary: Returns all filenames in filepath tags: [] responses: '200': description: OK content: application/json: schema: type: object properties: files: type: array items: type: string examples: requests "/": value: files: - /folder1/ - /folder2/ - /file1 requests "/folder1": value: files: - /folder1/file1 - /folder1/file2 - /folder1/innerFolder1/ requestBody: content: application/json: schema: type: object properties: filepath: type: string userId: $ref: '#/components/schemas/portusername' description: >- Returns all files and folders within filepath, if it is a folder. Otherwise the array is empty. The paths needs to be absolute, so the user can request the returned elements without any string modifcations. Folders are marked with slash / at the end. Files does not have this slash. The lookup for files and folders is not recursive. The user make a request by himself for the recursive folder lookup for your returned array. parameters: [] tags: - name: deposit description: All about depositions - name: creator description: All about user and deposition creators - name: misc description: Everything else. components: schemas: portusername: title: username for port type: string description: >- This field is very special, because this helps very much to work with ports. So it has 2 different styles: The session and the normal format. The normal format will be used, when the port have to make the search by themself for example against the token storage. The session format will be used to provide the login credentials through the RDS system directly to the port, without the need to lookup from port. The first part symbolize, which port should parse the following credentials and is equal to the name, which set the port by themself in the registration-process at startup. It can be ignored by the port, but should not. The username and password are the user inputs from the web ui provided by token storage. Beware: Do not use a token (e.g. for oauth) as password, because this is used in the token field. session format: ://: normal format: