{ "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}/file": { "post": { "operationId": "task_processing_api-set-file-contents-ex-app", "summary": "Upload a file so it can be referenced in a task result (ExApp route version)", "description": "Use field 'file' for the file upload\nThis 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": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "201": { "description": "File created", "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": [ "fileId" ], "properties": { "fileId": { "type": "integer", "format": "int64" } } } } } } } } } }, "400": { "description": "File upload failed or no file was uploaded", "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" } } } } } } } } } }, "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}/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, files are represented by their IDs", "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": [] } ], "parameters": [ { "name": "providerIds[]", "in": "query", "description": "The ids of the providers", "required": true, "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "taskTypeIds[]", "in": "query", "description": "The ids of the task types", "required": true, "schema": { "type": "array", "items": { "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": "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/" } ] }