You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1880 lines
82 KiB
1880 lines
82 KiB
{ |
|
"openapi": "3.1.0", |
|
"info": { |
|
"title": "files", |
|
"version": "0.0.1", |
|
"description": "File Management", |
|
"license": { |
|
"name": "agpl", |
|
"identifier": "AGPL-3.0-only" |
|
} |
|
}, |
|
"components": { |
|
"securitySchemes": { |
|
"basic_auth": { |
|
"type": "http", |
|
"scheme": "basic" |
|
}, |
|
"bearer_auth": { |
|
"type": "http", |
|
"scheme": "bearer" |
|
} |
|
}, |
|
"schemas": { |
|
"Capabilities": { |
|
"type": "object", |
|
"required": [ |
|
"files" |
|
], |
|
"properties": { |
|
"files": { |
|
"type": "object", |
|
"required": [ |
|
"bigfilechunking", |
|
"blacklisted_files", |
|
"directEditing" |
|
], |
|
"properties": { |
|
"bigfilechunking": { |
|
"type": "boolean" |
|
}, |
|
"blacklisted_files": { |
|
"type": "array", |
|
"items": { |
|
"type": "object" |
|
} |
|
}, |
|
"directEditing": { |
|
"type": "object", |
|
"required": [ |
|
"url", |
|
"etag", |
|
"supportsFileId" |
|
], |
|
"properties": { |
|
"url": { |
|
"type": "string" |
|
}, |
|
"etag": { |
|
"type": "string" |
|
}, |
|
"supportsFileId": { |
|
"type": "boolean" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"OCSMeta": { |
|
"type": "object", |
|
"required": [ |
|
"status", |
|
"statuscode" |
|
], |
|
"properties": { |
|
"status": { |
|
"type": "string" |
|
}, |
|
"statuscode": { |
|
"type": "integer" |
|
}, |
|
"message": { |
|
"type": "string" |
|
}, |
|
"totalitems": { |
|
"type": "string" |
|
}, |
|
"itemsperpage": { |
|
"type": "string" |
|
} |
|
} |
|
}, |
|
"Template": { |
|
"type": "object", |
|
"required": [ |
|
"templateType", |
|
"templateId", |
|
"basename", |
|
"etag", |
|
"fileid", |
|
"filename", |
|
"lastmod", |
|
"mime", |
|
"size", |
|
"type", |
|
"hasPreview", |
|
"previewUrl" |
|
], |
|
"properties": { |
|
"templateType": { |
|
"type": "string" |
|
}, |
|
"templateId": { |
|
"type": "string" |
|
}, |
|
"basename": { |
|
"type": "string" |
|
}, |
|
"etag": { |
|
"type": "string" |
|
}, |
|
"fileid": { |
|
"type": "integer", |
|
"format": "int64" |
|
}, |
|
"filename": { |
|
"type": "string" |
|
}, |
|
"lastmod": { |
|
"type": "integer", |
|
"format": "int64" |
|
}, |
|
"mime": { |
|
"type": "string" |
|
}, |
|
"size": { |
|
"type": "integer", |
|
"format": "int64" |
|
}, |
|
"type": { |
|
"type": "string" |
|
}, |
|
"hasPreview": { |
|
"type": "boolean" |
|
}, |
|
"previewUrl": { |
|
"type": "string", |
|
"nullable": true |
|
} |
|
} |
|
}, |
|
"TemplateFile": { |
|
"type": "object", |
|
"required": [ |
|
"basename", |
|
"etag", |
|
"fileid", |
|
"filename", |
|
"lastmod", |
|
"mime", |
|
"size", |
|
"type", |
|
"hasPreview" |
|
], |
|
"properties": { |
|
"basename": { |
|
"type": "string" |
|
}, |
|
"etag": { |
|
"type": "string" |
|
}, |
|
"fileid": { |
|
"type": "integer", |
|
"format": "int64" |
|
}, |
|
"filename": { |
|
"type": "string", |
|
"nullable": true |
|
}, |
|
"lastmod": { |
|
"type": "integer", |
|
"format": "int64" |
|
}, |
|
"mime": { |
|
"type": "string" |
|
}, |
|
"size": { |
|
"type": "integer", |
|
"format": "int64" |
|
}, |
|
"type": { |
|
"type": "string" |
|
}, |
|
"hasPreview": { |
|
"type": "boolean" |
|
} |
|
} |
|
}, |
|
"TemplateFileCreator": { |
|
"type": "object", |
|
"required": [ |
|
"app", |
|
"label", |
|
"extension", |
|
"iconClass", |
|
"mimetypes", |
|
"ratio", |
|
"actionLabel" |
|
], |
|
"properties": { |
|
"app": { |
|
"type": "string" |
|
}, |
|
"label": { |
|
"type": "string" |
|
}, |
|
"extension": { |
|
"type": "string" |
|
}, |
|
"iconClass": { |
|
"type": "string", |
|
"nullable": true |
|
}, |
|
"mimetypes": { |
|
"type": "array", |
|
"items": { |
|
"type": "string" |
|
} |
|
}, |
|
"ratio": { |
|
"type": "number", |
|
"format": "float", |
|
"nullable": true |
|
}, |
|
"actionLabel": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"paths": { |
|
"/index.php/apps/files/api/v1/thumbnail/{x}/{y}/{file}": { |
|
"get": { |
|
"operationId": "api-get-thumbnail", |
|
"summary": "Gets a thumbnail of the specified file", |
|
"tags": [ |
|
"api" |
|
], |
|
"security": [ |
|
{ |
|
"bearer_auth": [] |
|
}, |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"parameters": [ |
|
{ |
|
"name": "x", |
|
"in": "path", |
|
"description": "Width of the thumbnail", |
|
"required": true, |
|
"schema": { |
|
"type": "integer", |
|
"format": "int64" |
|
} |
|
}, |
|
{ |
|
"name": "y", |
|
"in": "path", |
|
"description": "Height of the thumbnail", |
|
"required": true, |
|
"schema": { |
|
"type": "integer", |
|
"format": "int64" |
|
} |
|
}, |
|
{ |
|
"name": "file", |
|
"in": "path", |
|
"description": "URL-encoded filename", |
|
"required": true, |
|
"schema": { |
|
"type": "string", |
|
"pattern": "^.+$" |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "Thumbnail returned", |
|
"content": { |
|
"*/*": { |
|
"schema": { |
|
"type": "string", |
|
"format": "binary" |
|
} |
|
} |
|
} |
|
}, |
|
"400": { |
|
"description": "Getting thumbnail is not possible", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"properties": { |
|
"message": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"404": { |
|
"description": "File not found", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"properties": { |
|
"message": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/ocs/v2.php/apps/files/api/v1/directEditing": { |
|
"get": { |
|
"operationId": "direct_editing-info", |
|
"summary": "Get the direct editing capabilities", |
|
"tags": [ |
|
"direct_editing" |
|
], |
|
"security": [ |
|
{ |
|
"bearer_auth": [] |
|
}, |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"parameters": [ |
|
{ |
|
"name": "OCS-APIRequest", |
|
"in": "header", |
|
"description": "Required to be true for the API request to pass", |
|
"required": true, |
|
"schema": { |
|
"type": "boolean", |
|
"default": true |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "Direct editing capabilities returned", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"type": "object", |
|
"required": [ |
|
"editors", |
|
"creators" |
|
], |
|
"properties": { |
|
"editors": { |
|
"type": "object", |
|
"additionalProperties": { |
|
"type": "object", |
|
"required": [ |
|
"id", |
|
"name", |
|
"mimetypes", |
|
"optionalMimetypes", |
|
"secure" |
|
], |
|
"properties": { |
|
"id": { |
|
"type": "string" |
|
}, |
|
"name": { |
|
"type": "string" |
|
}, |
|
"mimetypes": { |
|
"type": "array", |
|
"items": { |
|
"type": "string" |
|
} |
|
}, |
|
"optionalMimetypes": { |
|
"type": "array", |
|
"items": { |
|
"type": "string" |
|
} |
|
}, |
|
"secure": { |
|
"type": "boolean" |
|
} |
|
} |
|
} |
|
}, |
|
"creators": { |
|
"type": "object", |
|
"additionalProperties": { |
|
"type": "object", |
|
"required": [ |
|
"id", |
|
"editor", |
|
"name", |
|
"extension", |
|
"templates", |
|
"mimetypes" |
|
], |
|
"properties": { |
|
"id": { |
|
"type": "string" |
|
}, |
|
"editor": { |
|
"type": "string" |
|
}, |
|
"name": { |
|
"type": "string" |
|
}, |
|
"extension": { |
|
"type": "string" |
|
}, |
|
"templates": { |
|
"type": "boolean" |
|
}, |
|
"mimetypes": { |
|
"type": "array", |
|
"items": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/ocs/v2.php/apps/files/api/v1/directEditing/templates/{editorId}/{creatorId}": { |
|
"get": { |
|
"operationId": "direct_editing-templates", |
|
"summary": "Get the templates for direct editing", |
|
"tags": [ |
|
"direct_editing" |
|
], |
|
"security": [ |
|
{ |
|
"bearer_auth": [] |
|
}, |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"parameters": [ |
|
{ |
|
"name": "editorId", |
|
"in": "path", |
|
"description": "ID of the editor", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
}, |
|
{ |
|
"name": "creatorId", |
|
"in": "path", |
|
"description": "ID of the creator", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
}, |
|
{ |
|
"name": "OCS-APIRequest", |
|
"in": "header", |
|
"description": "Required to be true for the API request to pass", |
|
"required": true, |
|
"schema": { |
|
"type": "boolean", |
|
"default": true |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "Templates returned", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"type": "object", |
|
"required": [ |
|
"templates" |
|
], |
|
"properties": { |
|
"templates": { |
|
"type": "object", |
|
"additionalProperties": { |
|
"type": "object", |
|
"required": [ |
|
"id", |
|
"title", |
|
"preview", |
|
"extension", |
|
"mimetype" |
|
], |
|
"properties": { |
|
"id": { |
|
"type": "string" |
|
}, |
|
"title": { |
|
"type": "string" |
|
}, |
|
"preview": { |
|
"type": "string", |
|
"nullable": true |
|
}, |
|
"extension": { |
|
"type": "string" |
|
}, |
|
"mimetype": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"500": { |
|
"description": "", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"type": "object", |
|
"required": [ |
|
"message" |
|
], |
|
"properties": { |
|
"message": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/ocs/v2.php/apps/files/api/v1/directEditing/open": { |
|
"post": { |
|
"operationId": "direct_editing-open", |
|
"summary": "Open a file for direct editing", |
|
"tags": [ |
|
"direct_editing" |
|
], |
|
"security": [ |
|
{ |
|
"bearer_auth": [] |
|
}, |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"parameters": [ |
|
{ |
|
"name": "path", |
|
"in": "query", |
|
"description": "Path of the file", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
}, |
|
{ |
|
"name": "editorId", |
|
"in": "query", |
|
"description": "ID of the editor", |
|
"schema": { |
|
"type": "string", |
|
"nullable": true |
|
} |
|
}, |
|
{ |
|
"name": "fileId", |
|
"in": "query", |
|
"description": "ID of the file", |
|
"schema": { |
|
"type": "integer", |
|
"format": "int64", |
|
"nullable": true |
|
} |
|
}, |
|
{ |
|
"name": "OCS-APIRequest", |
|
"in": "header", |
|
"description": "Required to be true for the API request to pass", |
|
"required": true, |
|
"schema": { |
|
"type": "boolean", |
|
"default": true |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "URL for direct editing returned", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"type": "object", |
|
"required": [ |
|
"url" |
|
], |
|
"properties": { |
|
"url": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"403": { |
|
"description": "Opening file is not allowed", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"type": "object", |
|
"required": [ |
|
"message" |
|
], |
|
"properties": { |
|
"message": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"500": { |
|
"description": "", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"type": "object", |
|
"required": [ |
|
"message" |
|
], |
|
"properties": { |
|
"message": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/ocs/v2.php/apps/files/api/v1/directEditing/create": { |
|
"post": { |
|
"operationId": "direct_editing-create", |
|
"summary": "Create a file for direct editing", |
|
"tags": [ |
|
"direct_editing" |
|
], |
|
"security": [ |
|
{ |
|
"bearer_auth": [] |
|
}, |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"parameters": [ |
|
{ |
|
"name": "path", |
|
"in": "query", |
|
"description": "Path of the file", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
}, |
|
{ |
|
"name": "editorId", |
|
"in": "query", |
|
"description": "ID of the editor", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
}, |
|
{ |
|
"name": "creatorId", |
|
"in": "query", |
|
"description": "ID of the creator", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
}, |
|
{ |
|
"name": "templateId", |
|
"in": "query", |
|
"description": "ID of the template", |
|
"schema": { |
|
"type": "string", |
|
"nullable": true |
|
} |
|
}, |
|
{ |
|
"name": "OCS-APIRequest", |
|
"in": "header", |
|
"description": "Required to be true for the API request to pass", |
|
"required": true, |
|
"schema": { |
|
"type": "boolean", |
|
"default": true |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "URL for direct editing returned", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"type": "object", |
|
"required": [ |
|
"url" |
|
], |
|
"properties": { |
|
"url": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"403": { |
|
"description": "Opening file is not allowed", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"type": "object", |
|
"required": [ |
|
"message" |
|
], |
|
"properties": { |
|
"message": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"500": { |
|
"description": "", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"type": "object", |
|
"required": [ |
|
"message" |
|
], |
|
"properties": { |
|
"message": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/ocs/v2.php/apps/files/api/v1/templates": { |
|
"get": { |
|
"operationId": "template-list", |
|
"summary": "List the available templates", |
|
"tags": [ |
|
"template" |
|
], |
|
"security": [ |
|
{ |
|
"bearer_auth": [] |
|
}, |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"parameters": [ |
|
{ |
|
"name": "OCS-APIRequest", |
|
"in": "header", |
|
"description": "Required to be true for the API request to pass", |
|
"required": true, |
|
"schema": { |
|
"type": "boolean", |
|
"default": true |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "Available templates returned", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"type": "array", |
|
"items": { |
|
"$ref": "#/components/schemas/TemplateFileCreator" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/ocs/v2.php/apps/files/api/v1/templates/create": { |
|
"post": { |
|
"operationId": "template-create", |
|
"summary": "Create a template", |
|
"tags": [ |
|
"template" |
|
], |
|
"security": [ |
|
{ |
|
"bearer_auth": [] |
|
}, |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"parameters": [ |
|
{ |
|
"name": "filePath", |
|
"in": "query", |
|
"description": "Path of the file", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
}, |
|
{ |
|
"name": "templatePath", |
|
"in": "query", |
|
"description": "Name of the template", |
|
"schema": { |
|
"type": "string", |
|
"default": "" |
|
} |
|
}, |
|
{ |
|
"name": "templateType", |
|
"in": "query", |
|
"description": "Type of the template", |
|
"schema": { |
|
"type": "string", |
|
"default": "user" |
|
} |
|
}, |
|
{ |
|
"name": "OCS-APIRequest", |
|
"in": "header", |
|
"description": "Required to be true for the API request to pass", |
|
"required": true, |
|
"schema": { |
|
"type": "boolean", |
|
"default": true |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "Template created successfully", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"$ref": "#/components/schemas/TemplateFile" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"403": { |
|
"description": "Creating template is not allowed", |
|
"content": { |
|
"text/plain": { |
|
"schema": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/ocs/v2.php/apps/files/api/v1/templates/path": { |
|
"post": { |
|
"operationId": "template-path", |
|
"summary": "Initialize the template directory", |
|
"tags": [ |
|
"template" |
|
], |
|
"security": [ |
|
{ |
|
"bearer_auth": [] |
|
}, |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"parameters": [ |
|
{ |
|
"name": "templatePath", |
|
"in": "query", |
|
"description": "Path of the template directory", |
|
"schema": { |
|
"type": "string", |
|
"default": "" |
|
} |
|
}, |
|
{ |
|
"name": "copySystemTemplates", |
|
"in": "query", |
|
"description": "Whether to copy the system templates to the template directory", |
|
"schema": { |
|
"type": "integer", |
|
"default": 0 |
|
} |
|
}, |
|
{ |
|
"name": "OCS-APIRequest", |
|
"in": "header", |
|
"description": "Required to be true for the API request to pass", |
|
"required": true, |
|
"schema": { |
|
"type": "boolean", |
|
"default": true |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "Template directory initialized successfully", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"type": "object", |
|
"required": [ |
|
"template_path", |
|
"templates" |
|
], |
|
"properties": { |
|
"template_path": { |
|
"type": "string" |
|
}, |
|
"templates": { |
|
"type": "array", |
|
"items": { |
|
"$ref": "#/components/schemas/TemplateFileCreator" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"403": { |
|
"description": "Initializing the template directory is not allowed", |
|
"content": { |
|
"text/plain": { |
|
"schema": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/ocs/v2.php/apps/files/api/v1/transferownership": { |
|
"post": { |
|
"operationId": "transfer_ownership-transfer", |
|
"summary": "Transfer the ownership to another user", |
|
"tags": [ |
|
"transfer_ownership" |
|
], |
|
"security": [ |
|
{ |
|
"bearer_auth": [] |
|
}, |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"parameters": [ |
|
{ |
|
"name": "recipient", |
|
"in": "query", |
|
"description": "Username of the recipient", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
}, |
|
{ |
|
"name": "path", |
|
"in": "query", |
|
"description": "Path of the file", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
}, |
|
{ |
|
"name": "OCS-APIRequest", |
|
"in": "header", |
|
"description": "Required to be true for the API request to pass", |
|
"required": true, |
|
"schema": { |
|
"type": "boolean", |
|
"default": true |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "Ownership transferred successfully", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": {} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"400": { |
|
"description": "Transferring ownership is not possible", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": {} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"403": { |
|
"description": "Transferring ownership is not allowed", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": {} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/ocs/v2.php/apps/files/api/v1/transferownership/{id}": { |
|
"post": { |
|
"operationId": "transfer_ownership-accept", |
|
"summary": "Accept an ownership transfer", |
|
"tags": [ |
|
"transfer_ownership" |
|
], |
|
"security": [ |
|
{ |
|
"bearer_auth": [] |
|
}, |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"parameters": [ |
|
{ |
|
"name": "id", |
|
"in": "path", |
|
"description": "ID of the ownership transfer", |
|
"required": true, |
|
"schema": { |
|
"type": "integer", |
|
"format": "int64" |
|
} |
|
}, |
|
{ |
|
"name": "OCS-APIRequest", |
|
"in": "header", |
|
"description": "Required to be true for the API request to pass", |
|
"required": true, |
|
"schema": { |
|
"type": "boolean", |
|
"default": true |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "Ownership transfer accepted successfully", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": {} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"403": { |
|
"description": "Accepting ownership transfer is not allowed", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": {} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"404": { |
|
"description": "Ownership transfer not found", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": {} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"delete": { |
|
"operationId": "transfer_ownership-reject", |
|
"summary": "Reject an ownership transfer", |
|
"tags": [ |
|
"transfer_ownership" |
|
], |
|
"security": [ |
|
{ |
|
"bearer_auth": [] |
|
}, |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"parameters": [ |
|
{ |
|
"name": "id", |
|
"in": "path", |
|
"description": "ID of the ownership transfer", |
|
"required": true, |
|
"schema": { |
|
"type": "integer", |
|
"format": "int64" |
|
} |
|
}, |
|
{ |
|
"name": "OCS-APIRequest", |
|
"in": "header", |
|
"description": "Required to be true for the API request to pass", |
|
"required": true, |
|
"schema": { |
|
"type": "boolean", |
|
"default": true |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "Ownership transfer rejected successfully", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": {} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"403": { |
|
"description": "Rejecting ownership transfer is not allowed", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": {} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"404": { |
|
"description": "Ownership transfer not found", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": {} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/ocs/v2.php/apps/files/api/v1/openlocaleditor": { |
|
"post": { |
|
"operationId": "open_local_editor-create", |
|
"summary": "Create a local editor", |
|
"tags": [ |
|
"open_local_editor" |
|
], |
|
"security": [ |
|
{ |
|
"bearer_auth": [] |
|
}, |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"parameters": [ |
|
{ |
|
"name": "path", |
|
"in": "query", |
|
"description": "Path of the file", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
}, |
|
{ |
|
"name": "OCS-APIRequest", |
|
"in": "header", |
|
"description": "Required to be true for the API request to pass", |
|
"required": true, |
|
"schema": { |
|
"type": "boolean", |
|
"default": true |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "Local editor returned", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"type": "object", |
|
"required": [ |
|
"userId", |
|
"pathHash", |
|
"expirationTime", |
|
"token" |
|
], |
|
"properties": { |
|
"userId": { |
|
"type": "string", |
|
"nullable": true |
|
}, |
|
"pathHash": { |
|
"type": "string" |
|
}, |
|
"expirationTime": { |
|
"type": "integer", |
|
"format": "int64" |
|
}, |
|
"token": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"500": { |
|
"description": "", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": {} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"/ocs/v2.php/apps/files/api/v1/openlocaleditor/{token}": { |
|
"post": { |
|
"operationId": "open_local_editor-validate", |
|
"summary": "Validate a local editor", |
|
"tags": [ |
|
"open_local_editor" |
|
], |
|
"security": [ |
|
{ |
|
"bearer_auth": [] |
|
}, |
|
{ |
|
"basic_auth": [] |
|
} |
|
], |
|
"parameters": [ |
|
{ |
|
"name": "path", |
|
"in": "query", |
|
"description": "Path of the file", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
}, |
|
{ |
|
"name": "token", |
|
"in": "path", |
|
"description": "Token of the local editor", |
|
"required": true, |
|
"schema": { |
|
"type": "string" |
|
} |
|
}, |
|
{ |
|
"name": "OCS-APIRequest", |
|
"in": "header", |
|
"description": "Required to be true for the API request to pass", |
|
"required": true, |
|
"schema": { |
|
"type": "boolean", |
|
"default": true |
|
} |
|
} |
|
], |
|
"responses": { |
|
"200": { |
|
"description": "Local editor validated successfully", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": { |
|
"type": "object", |
|
"required": [ |
|
"userId", |
|
"pathHash", |
|
"expirationTime", |
|
"token" |
|
], |
|
"properties": { |
|
"userId": { |
|
"type": "string" |
|
}, |
|
"pathHash": { |
|
"type": "string" |
|
}, |
|
"expirationTime": { |
|
"type": "integer", |
|
"format": "int64" |
|
}, |
|
"token": { |
|
"type": "string" |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"404": { |
|
"description": "Local editor not found", |
|
"content": { |
|
"application/json": { |
|
"schema": { |
|
"type": "object", |
|
"required": [ |
|
"ocs" |
|
], |
|
"properties": { |
|
"ocs": { |
|
"type": "object", |
|
"required": [ |
|
"meta", |
|
"data" |
|
], |
|
"properties": { |
|
"meta": { |
|
"$ref": "#/components/schemas/OCSMeta" |
|
}, |
|
"data": {} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
}, |
|
"tags": [] |
|
} |