diff options
author | Marcel Klehr <mklehr@gmx.net> | 2024-05-03 10:14:19 +0200 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2024-05-14 11:38:39 +0200 |
commit | 8e5662602a1dd264f54f249ce1cfc2f30be627fb (patch) | |
tree | e23252130bcc052ff062a05fab3e5b81913b278a /core/openapi.json | |
parent | 7a947980db9e8824a3c5c0f32a85af3f07a9ada9 (diff) | |
download | nextcloud-server-8e5662602a1dd264f54f249ce1cfc2f30be627fb.tar.gz nextcloud-server-8e5662602a1dd264f54f249ce1cfc2f30be627fb.zip |
feat: Add ExApp endpoints
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'core/openapi.json')
-rw-r--r-- | core/openapi.json | 379 |
1 files changed, 340 insertions, 39 deletions
diff --git a/core/openapi.json b/core/openapi.json index 311026a33af..83a6bcc8383 100644 --- a/core/openapi.json +++ b/core/openapi.json @@ -507,7 +507,15 @@ }, "status": { "type": "integer", - "format": "int64" + "format": "int64", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5 + ] }, "userId": { "type": "string", @@ -518,6 +526,7 @@ }, "input": { "type": "object", + "nullable": true, "additionalProperties": { "type": "object" } @@ -3811,13 +3820,43 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { + "type": "object" + } + } + } + } + } + } + } + }, + "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": [ - "task" + "message" ], "properties": { - "task": { - "$ref": "#/components/schemas/TaskProcessingTask" + "message": { + "type": "string" } } } @@ -3827,9 +3866,58 @@ } } } + } + } + } + }, + "/ocs/v2.php/taskprocessing/tasks/app/{appId}": { + "get": { + "operationId": "task_processing_api-list-tasks-by-app", + "summary": "This endpoint returns a list of tasks of a user that are related with a specific appId and optionally with an identifier", + "tags": [ + "task_processing_api" + ], + "security": [ + { + "bearer_auth": [] }, - "404": { - "description": "Task not found", + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "identifier", + "in": "query", + "description": "An arbitrary identifier for the task", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "appId", + "in": "path", + "description": "ID of the app", + "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": "Task list returned", "content": { "application/json": { "schema": { @@ -3851,11 +3939,14 @@ "data": { "type": "object", "required": [ - "message" + "tasks" ], "properties": { - "message": { - "type": "string" + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskProcessingTask" + } } } } @@ -3907,10 +3998,10 @@ } } }, - "/ocs/v2.php/taskprocessing/tasks/app/{appId}": { + "/ocs/v2.php/taskprocessing/tasks/{taskId}/file/{fileId}": { "get": { - "operationId": "task_processing_api-list-tasks-by-app", - "summary": "This endpoint returns a list of tasks of a user that are related with a specific appId and optionally with an identifier", + "operationId": "task_processing_api-get-file-contents", + "summary": "This endpoint returns the contents of a file referenced in a task", "tags": [ "task_processing_api" ], @@ -3924,21 +4015,23 @@ ], "parameters": [ { - "name": "identifier", - "in": "query", - "description": "An arbitrary identifier for the task", + "name": "taskId", + "in": "path", + "description": "The id of the task", + "required": true, "schema": { - "type": "string", - "nullable": true + "type": "integer", + "format": "int64" } }, { - "name": "appId", + "name": "fileId", "in": "path", - "description": "ID of the app", + "description": "The file id of the file to retrieve", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } }, { @@ -3954,7 +4047,18 @@ ], "responses": { "200": { - "description": "Task list returned", + "description": "File content returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "500": { + "description": "", "content": { "application/json": { "schema": { @@ -3976,14 +4080,11 @@ "data": { "type": "object", "required": [ - "tasks" + "message" ], "properties": { - "tasks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TaskProcessingTask" - } + "message": { + "type": "string" } } } @@ -3994,8 +4095,8 @@ } } }, - "500": { - "description": "", + "404": { + "description": "Task or file not found", "content": { "application/json": { "schema": { @@ -4035,10 +4136,10 @@ } } }, - "/ocs/v2.php/taskprocessing/tasks/{taskId}/file/{fileId}": { - "get": { - "operationId": "task_processing_api-get-file-contents", - "summary": "This endpoint returns the contents of a file referenced in a task", + "/ocs/v2.php/taskprocessing/tasks/{taskId}/progress": { + "post": { + "operationId": "task_processing_api-set-progress", + "summary": "This endpoint sets the task progress", "tags": [ "task_processing_api" ], @@ -4052,6 +4153,16 @@ ], "parameters": [ { + "name": "progress", + "in": "query", + "description": "The progress", + "required": true, + "schema": { + "type": "number", + "format": "double" + } + }, + { "name": "taskId", "in": "path", "description": "The id of the task", @@ -4062,9 +4173,172 @@ } }, { - "name": "fileId", + "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": { + "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/{taskId}/result": { + "post": { + "operationId": "task_processing_api-set-result", + "summary": "This endpoint sets the task progress", + "tags": [ + "task_processing_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "output", + "in": "query", + "description": "The resulting task output", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "errorMessage", + "in": "query", + "description": "An error message if the task failed", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "taskId", "in": "path", - "description": "The file id of the file to retrieve", + "description": "The id of the task", "required": true, "schema": { "type": "integer", @@ -4086,10 +4360,37 @@ "200": { "description": "File content returned", "content": { - "*/*": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "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" + } + } + } + } + } + } } } } @@ -4133,7 +4434,7 @@ } }, "404": { - "description": "Task or file not found", + "description": "Task not found", "content": { "application/json": { "schema": { |