diff options
Diffstat (limited to 'core/openapi-ex_app.json')
-rw-r--r-- | core/openapi-ex_app.json | 867 |
1 files changed, 867 insertions, 0 deletions
diff --git a/core/openapi-ex_app.json b/core/openapi-ex_app.json new file mode 100644 index 00000000000..e0cf06753de --- /dev/null +++ b/core/openapi-ex_app.json @@ -0,0 +1,867 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "core-ex_app", + "version": "0.0.1", + "description": "Core functionality of Nextcloud", + "license": { + "name": "agpl" + } + }, + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "Capabilities": { + "type": "object", + "required": [ + "core" + ], + "properties": { + "core": { + "type": "object", + "required": [ + "pollinterval", + "webdav-root", + "reference-api", + "reference-regex", + "mod-rewrite-working" + ], + "properties": { + "pollinterval": { + "type": "integer", + "format": "int64" + }, + "webdav-root": { + "type": "string" + }, + "reference-api": { + "type": "boolean" + }, + "reference-regex": { + "type": "string" + }, + "mod-rewrite-working": { + "type": "boolean" + } + } + } + } + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + }, + "PublicCapabilities": { + "type": "object", + "required": [ + "bruteforce" + ], + "properties": { + "bruteforce": { + "type": "object", + "required": [ + "delay", + "allow-listed" + ], + "properties": { + "delay": { + "type": "integer", + "format": "int64" + }, + "allow-listed": { + "type": "boolean" + } + } + } + } + }, + "TaskProcessingIO": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "TaskProcessingTask": { + "type": "object", + "required": [ + "id", + "lastUpdated", + "type", + "status", + "userId", + "appId", + "input", + "output", + "customId", + "completionExpectedAt", + "progress" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "lastUpdated": { + "type": "integer", + "format": "int64" + }, + "type": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "STATUS_CANCELLED", + "STATUS_FAILED", + "STATUS_SUCCESSFUL", + "STATUS_RUNNING", + "STATUS_SCHEDULED", + "STATUS_UNKNOWN" + ] + }, + "userId": { + "type": "string", + "nullable": true + }, + "appId": { + "type": "string" + }, + "input": { + "$ref": "#/components/schemas/TaskProcessingIO" + }, + "output": { + "$ref": "#/components/schemas/TaskProcessingIO", + "nullable": true + }, + "customId": { + "type": "string", + "nullable": true + }, + "completionExpectedAt": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "progress": { + "type": "number", + "format": "double", + "nullable": true + } + } + } + } + }, + "paths": { + "/ocs/v2.php/taskprocessing/tasks_provider/{taskId}/file/{fileId}": { + "get": { + "operationId": "task_processing_api-get-file-contents-ex-app", + "summary": "Returns the contents of a file referenced in a task(ExApp route version)", + "description": "This endpoint requires admin access", + "tags": [ + "task_processing_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "taskId", + "in": "path", + "description": "The id of the task", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "fileId", + "in": "path", + "description": "The file id of the file to retrieve", + "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": "File content returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "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" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Task or file not found", + "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/taskprocessing/tasks_provider/{taskId}/progress": { + "post": { + "operationId": "task_processing_api-set-progress", + "summary": "Sets the task progress", + "description": "This endpoint requires admin access", + "tags": [ + "task_processing_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "progress" + ], + "properties": { + "progress": { + "type": "number", + "format": "double", + "description": "The progress" + } + } + } + } + } + }, + "parameters": [ + { + "name": "taskId", + "in": "path", + "description": "The id of the task", + "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": "Progress updated 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": [ + "task" + ], + "properties": { + "task": { + "$ref": "#/components/schemas/TaskProcessingTask" + } + } + } + } + } + } + } + } + } + }, + "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" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Task not found", + "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/taskprocessing/tasks_provider/{taskId}/result": { + "post": { + "operationId": "task_processing_api-set-result", + "summary": "Sets the task result", + "description": "This endpoint requires admin access", + "tags": [ + "task_processing_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "output": { + "type": "object", + "nullable": true, + "description": "The resulting task output", + "additionalProperties": { + "type": "object" + } + }, + "errorMessage": { + "type": "string", + "nullable": true, + "description": "An error message if the task failed" + } + } + } + } + } + }, + "parameters": [ + { + "name": "taskId", + "in": "path", + "description": "The id of the task", + "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": "Result updated 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": [ + "task" + ], + "properties": { + "task": { + "$ref": "#/components/schemas/TaskProcessingTask" + } + } + } + } + } + } + } + } + } + }, + "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" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Task not found", + "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/taskprocessing/tasks_provider/next": { + "get": { + "operationId": "task_processing_api-get-next-scheduled-task", + "summary": "Returns the next scheduled task for the taskTypeId", + "description": "This endpoint requires admin access", + "tags": [ + "task_processing_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "providerIds", + "taskTypeIds" + ], + "properties": { + "providerIds": { + "type": "array", + "description": "The ids of the providers", + "items": { + "type": "string" + } + }, + "taskTypeIds": { + "type": "array", + "description": "The ids of the task types", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "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": "Task 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": [ + "task", + "provider" + ], + "properties": { + "task": { + "$ref": "#/components/schemas/TaskProcessingTask" + }, + "provider": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "204": { + "description": "No task found" + }, + "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" + } + } + } + } + } + } + } + } + } + } + } + } + } + }, + "tags": [ + { + "name": "avatar", + "description": "Class AvatarController" + }, + { + "name": "guest_avatar", + "description": "This controller handles guest avatar requests." + }, + { + "name": "ocm", + "description": "Controller about the endpoint /ocm-provider/" + } + ] +} |