{ "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" }, "user": { "type": "object", "required": [ "language", "locale", "timezone" ], "properties": { "language": { "type": "string" }, "locale": { "type": "string" }, "timezone": { "type": "string" } } }, "can-create-app-token": { "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" } } ] } }, "TaskProcessingShape": { "type": "object", "required": [ "name", "description", "type" ], "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "type": { "type": "string", "enum": [ "Number", "Text", "Audio", "Image", "Video", "File", "Enum", "ListOfNumbers", "ListOfTexts", "ListOfImages", "ListOfAudios", "ListOfVideos", "ListOfFiles" ] } } }, "TaskProcessingTask": { "type": "object", "required": [ "id", "lastUpdated", "type", "status", "userId", "appId", "input", "output", "customId", "completionExpectedAt", "progress", "scheduledAt", "startedAt", "endedAt", "allowCleanup", "includeWatermark", "userFacingErrorMessage" ], "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": { "nullable": true, "allOf": [ { "$ref": "#/components/schemas/TaskProcessingIO" } ] }, "customId": { "type": "string", "nullable": true }, "completionExpectedAt": { "type": "integer", "format": "int64", "nullable": true }, "progress": { "type": "number", "format": "double", "nullable": true }, "scheduledAt": { "type": "integer", "format": "int64", "nullable": true }, "startedAt": { "type": "integer", "format": "int64", "nullable": true }, "endedAt": { "type": "integer", "format": "int64", "nullable": true }, "allowCleanup": { "type": "boolean" }, "includeWatermark": { "type": "boolean" }, "userFacingErrorMessage": { "type": "string", "nullable": true } } }, "TaskProcessingTaskType": { "type": "object", "required": [ "name", "description", "inputShape", "inputShapeEnumValues", "inputShapeDefaults", "optionalInputShape", "optionalInputShapeEnumValues", "optionalInputShapeDefaults", "outputShape", "outputShapeEnumValues", "optionalOutputShape", "optionalOutputShapeEnumValues" ], "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "inputShape": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TaskProcessingShape" } }, "inputShapeEnumValues": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "required": [ "name", "value" ], "properties": { "name": { "type": "string" }, "value": { "type": "string" } } } } }, "inputShapeDefaults": { "type": "object", "additionalProperties": { "oneOf": [ { "type": "number" }, { "type": "string" } ] } }, "optionalInputShape": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TaskProcessingShape" } }, "optionalInputShapeEnumValues": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "required": [ "name", "value" ], "properties": { "name": { "type": "string" }, "value": { "type": "string" } } } } }, "optionalInputShapeDefaults": { "type": "object", "additionalProperties": { "oneOf": [ { "type": "number" }, { "type": "string" } ] } }, "outputShape": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TaskProcessingShape" } }, "outputShapeEnumValues": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "required": [ "name", "value" ], "properties": { "name": { "type": "string" }, "value": { "type": "string" } } } } }, "optionalOutputShape": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TaskProcessingShape" } }, "optionalOutputShapeEnumValues": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "required": [ "name", "value" ], "properties": { "name": { "type": "string" }, "value": { "type": "string" } } } } } } } } }, "paths": { "/ocs/v2.php/taskprocessing/tasks_consumer/tasktypes": { "get": { "operationId": "task_processing_api-task-types-ex-app-endpoint", "summary": "Returns all available TaskProcessing task types", "description": "Endpoint for ExApp usage without user context\nThis endpoint requires admin access", "tags": [ "task_processing_api" ], "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": "Task types 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": [ "types" ], "properties": { "types": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/TaskProcessingTaskType" } } } } } } } } } } }, "401": { "description": "Current user is not logged in", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "403": { "description": "Logged in account must be an admin", "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/taskprocessing/tasks_consumer/schedule": { "post": { "operationId": "task_processing_api-schedule-ex-app-endpoint", "summary": "Schedules a task", "description": "Endpoint for ExApp usage without user context. Files cannot be referenced in this case.\nThis endpoint requires admin access", "tags": [ "task_processing_api" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "input", "type", "appId" ], "properties": { "input": { "type": "object", "description": "Task's input parameters", "additionalProperties": { "type": "object" } }, "type": { "type": "string", "description": "Type of the task" }, "appId": { "type": "string", "description": "ID of the app that will execute the task" }, "customId": { "type": "string", "default": "", "description": "An arbitrary identifier for the task" }, "webhookUri": { "type": "string", "nullable": true, "default": null, "description": "URI to be requested when the task finishes" }, "webhookMethod": { "type": "string", "nullable": true, "default": null, "description": "Method used for the webhook request (HTTP:GET, HTTP:POST, HTTP:PUT, HTTP:DELETE or AppAPI:APP_ID:GET, AppAPI:APP_ID:POST...)" }, "includeWatermark": { "type": "boolean", "default": true, "description": "Whether to include a watermark in the output file or not" } } } } } }, "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 scheduled 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" } } } } } } } } } }, "400": { "description": "Scheduling task 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": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "412": { "description": "Scheduling task 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": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "401": { "description": "Cannot schedule task because it references files in its input", "content": { "application/json": { "schema": { "anyOf": [ { "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" } } } } } } }, { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } ] } } } }, "403": { "description": "Logged in account must be an admin", "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/taskprocessing/tasks_consumer/task/{id}": { "get": { "operationId": "task_processing_api-get-task-ex-app-endpoint", "summary": "Gets a task including status and result", "description": "Endpoint for ExApp usage without user context\nTasks are removed 1 week after receiving their last update\nThis endpoint requires admin access", "tags": [ "task_processing_api" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "id", "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": "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" ], "properties": { "task": { "$ref": "#/components/schemas/TaskProcessingTask" } } } } } } } } } }, "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" } } } } } } } } } }, "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" } } } } } } } } } }, "401": { "description": "Current user is not logged in", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "403": { "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } } } }, "delete": { "operationId": "task_processing_api-delete-task-ex-app-endpoint", "summary": "Deletes a task", "description": "Endpoint for ExApp usage without user context\nThis endpoint requires admin access", "tags": [ "task_processing_api" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "id", "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": "Task deleted", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "nullable": true } } } } } } } }, "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" } } } } } } } } } }, "401": { "description": "Current user is not logged in", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "403": { "description": "Logged in account must be an admin", "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/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" } } } } } } } } } }, "401": { "description": "Current user is not logged in", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "403": { "description": "Logged in account must be an admin", "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/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" } } } } } } } } } }, "401": { "description": "Current user is not logged in", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "403": { "description": "Logged in account must be an admin", "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/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" } } } } } } } } } }, "401": { "description": "Current user is not logged in", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "403": { "description": "Logged in account must be an admin", "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/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, "default": null, "description": "The resulting task output, files are represented by their IDs", "additionalProperties": { "type": "object" } }, "errorMessage": { "type": "string", "nullable": true, "default": null, "description": "An error message if the task failed" }, "userFacingErrorMessage": { "type": "string", "nullable": true, "default": null, "description": "An error message that will be shown to the user" } } } } } }, "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" } } } } } } } } } }, "401": { "description": "Current user is not logged in", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "403": { "description": "Logged in account must be an admin", "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/taskprocessing/tasks_consumer/tasks/{taskId}/cancel": { "post": { "operationId": "task_processing_api-cancel-task-ex-app-endpoint", "summary": "Cancels a task", "description": "Endpoint for ExApp usage without user context\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": { "200": { "description": "Task canceled 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" } } } } } } } } } }, "401": { "description": "Current user is not logged in", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "403": { "description": "Logged in account must be an admin", "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/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" } } } } } } } } } }, "401": { "description": "Current user is not logged in", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "403": { "description": "Logged in account must be an admin", "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/taskprocessing/tasks_provider/next_batch": { "get": { "operationId": "task_processing_api-get-next-scheduled-task-batch", "summary": "Returns the next n scheduled tasks for the specified set of taskTypes and providers The returned tasks are capped at ~50MiB", "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": "numberOfTasks", "in": "query", "description": "The number of tasks to return", "schema": { "type": "integer", "format": "int64", "default": 1 } }, { "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": "Tasks 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": [ "tasks", "has_more" ], "properties": { "tasks": { "type": "array", "items": { "type": "object", "required": [ "task", "provider" ], "properties": { "task": { "$ref": "#/components/schemas/TaskProcessingTask" }, "provider": { "type": "string" } } } }, "has_more": { "type": "boolean" } } } } } } } } } }, "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" } } } } } } } } } }, "401": { "description": "Current user is not logged in", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "403": { "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } } } } } }, "tags": [ { "name": "ocs", "description": "If you are here because you can't extend the OCSController class, you got the wrong one. Please use {@see \\OCP\\AppFramework\\OCSController}!" }, { "name": "avatar", "description": "Class AvatarController" }, { "name": "guest_avatar", "description": "This controller handles guest avatar requests." }, { "name": "ocm", "description": "Controller about the endpoint /ocm-provider/" }, { "name": "open_metrics", "description": "OpenMetrics controller Gather and display metrics" } ] }