}
},
"paths": {
- "/index.php/avatar/{userId}/{size}/dark": {
+ "/ocs/v2.php/core/getapppassword": {
"get": {
- "operationId": "avatar-get-avatar-dark",
- "summary": "Get the dark avatar",
+ "operationId": "app_password-get-app-password",
+ "summary": "Create app password",
"tags": [
- "avatar"
+ "app_password"
],
"security": [
- {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "userId",
- "in": "path",
- "description": "ID of the user",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "size",
- "in": "path",
- "description": "Size of the avatar",
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
"required": true,
"schema": {
- "type": "integer",
- "format": "int64"
+ "type": "boolean",
+ "default": true
}
}
],
"responses": {
"200": {
- "description": "Avatar returned",
- "headers": {
- "X-NC-IsCustomAvatar": {
- "schema": {
- "type": "integer",
- "format": "int64"
- }
- }
- },
+ "description": "App password 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": [
+ "apppassword"
+ ],
+ "properties": {
+ "apppassword": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
}
}
}
},
- "404": {
- "description": "Avatar not found",
+ "403": {
+ "description": "Creating app password is not allowed",
"content": {
- "application/json": {
- "schema": {}
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
}
}
}
}
}
},
- "/index.php/avatar/{userId}/{size}": {
- "get": {
- "operationId": "avatar-get-avatar",
- "summary": "Get the avatar",
+ "/ocs/v2.php/core/apppassword": {
+ "delete": {
+ "operationId": "app_password-delete-app-password",
+ "summary": "Delete app password",
"tags": [
- "avatar"
+ "app_password"
],
"security": [
- {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "userId",
- "in": "path",
- "description": "ID of the user",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "size",
- "in": "path",
- "description": "Size of the avatar",
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
"required": true,
"schema": {
- "type": "integer",
- "format": "int64"
+ "type": "boolean",
+ "default": true
}
}
],
"responses": {
"200": {
- "description": "Avatar returned",
- "headers": {
- "X-NC-IsCustomAvatar": {
- "schema": {
- "type": "integer",
- "format": "int64"
- }
- }
- },
+ "description": "App password deleted successfully",
"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": {}
+ }
+ }
+ }
}
}
}
},
- "404": {
- "description": "Avatar not found",
+ "403": {
+ "description": "Deleting app password is not allowed",
"content": {
- "application/json": {
- "schema": {}
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
}
}
}
}
}
},
- "/index.php/avatar/guest/{guestName}/{size}/dark": {
- "get": {
- "operationId": "guest_avatar-get-avatar-dark",
- "summary": "Returns a dark guest avatar image response",
+ "/ocs/v2.php/core/apppassword/rotate": {
+ "post": {
+ "operationId": "app_password-rotate-app-password",
+ "summary": "Rotate app password",
"tags": [
- "guest_avatar"
+ "app_password"
],
"security": [
- {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "guestName",
- "in": "path",
- "description": "The guest name, e.g. \"Albert\"",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "size",
- "in": "path",
- "description": "The desired avatar size, e.g. 64 for 64x64px",
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
"required": true,
"schema": {
- "type": "string"
+ "type": "boolean",
+ "default": true
}
}
],
"responses": {
"200": {
- "description": "Custom avatar returned",
+ "description": "App password 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": [
+ "apppassword"
+ ],
+ "properties": {
+ "apppassword": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
}
}
}
},
- "201": {
- "description": "Avatar returned",
+ "403": {
+ "description": "Rotating app password is not allowed",
"content": {
- "*/*": {
+ "text/plain": {
"schema": {
- "type": "string",
- "format": "binary"
+ "type": "string"
}
}
}
- },
- "500": {
- "description": ""
}
}
}
},
- "/index.php/avatar/guest/{guestName}/{size}": {
- "get": {
- "operationId": "guest_avatar-get-avatar",
- "summary": "Returns a guest avatar image response",
+ "/ocs/v2.php/core/apppassword/confirm": {
+ "put": {
+ "operationId": "app_password-confirm-user-password",
+ "summary": "Confirm the user password",
"tags": [
- "guest_avatar"
+ "app_password"
],
"security": [
- {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "darkTheme",
+ "name": "password",
"in": "query",
- "description": "Return dark avatar",
+ "description": "The password of the user",
+ "required": true,
"schema": {
- "type": "integer",
- "nullable": true,
- "default": 0,
- "enum": [
- 0,
- 1
- ]
+ "type": "string"
}
},
{
- "name": "guestName",
- "in": "path",
- "description": "The guest name, e.g. \"Albert\"",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "size",
- "in": "path",
- "description": "The desired avatar size, e.g. 64 for 64x64px",
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
"required": true,
"schema": {
- "type": "string"
+ "type": "boolean",
+ "default": true
}
}
],
"responses": {
"200": {
- "description": "Custom avatar returned",
+ "description": "Password confirmation succeeded",
"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": [
+ "lastLogin"
+ ],
+ "properties": {
+ "lastLogin": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ }
+ }
+ }
+ }
}
}
}
},
- "201": {
- "description": "Avatar returned",
+ "403": {
+ "description": "Password confirmation failed",
"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": {}
+ }
+ }
+ }
}
}
}
- },
- "500": {
- "description": ""
}
}
}
},
- "/index.php/login/confirm": {
- "post": {
- "operationId": "login-confirm-password",
- "summary": "Confirm the user password",
+ "/ocs/v2.php/core/autocomplete/get": {
+ "get": {
+ "operationId": "auto_complete-get",
+ "summary": "Autocomplete a query",
"tags": [
- "login"
+ "auto_complete"
],
"security": [
{
],
"parameters": [
{
- "name": "password",
+ "name": "search",
"in": "query",
- "description": "The password of the user",
+ "description": "Text to search for",
"required": true,
"schema": {
"type": "string"
}
+ },
+ {
+ "name": "itemType",
+ "in": "query",
+ "description": "Type of the items to search for",
+ "schema": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ {
+ "name": "itemId",
+ "in": "query",
+ "description": "ID of the items to search for",
+ "schema": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ {
+ "name": "sorter",
+ "in": "query",
+ "description": "can be piped, top prio first, e.g.: \"commenters|share-recipients\"",
+ "schema": {
+ "type": "string",
+ "nullable": true
+ }
+ },
+ {
+ "name": "shareTypes[]",
+ "in": "query",
+ "description": "Types of shares to search for",
+ "schema": {
+ "type": "array",
+ "default": [],
+ "items": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "description": "Maximum number of results to return",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "default": 10
+ }
+ },
+ {
+ "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": "Password confirmation succeeded",
+ "description": "Autocomplete results returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
- "lastLogin"
+ "ocs"
],
"properties": {
- "lastLogin": {
- "type": "integer",
- "format": "int64"
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/AutocompleteResult"
+ }
+ }
+ }
}
}
}
}
}
- },
- "403": {
- "description": "Password confirmation failed",
- "content": {
- "application/json": {
- "schema": {}
- }
- }
}
}
}
},
- "/index.php/login/v2/poll": {
- "post": {
- "operationId": "client_flow_login_v2-poll",
- "summary": "Poll the login flow credentials",
+ "/ocs/v2.php/collaboration/resources/collections/{collectionId}": {
+ "get": {
+ "operationId": "collaboration_resources-list-collection",
+ "summary": "Get a collection",
"tags": [
- "client_flow_login_v2"
+ "collaboration_resources"
],
"security": [
- {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "token",
- "in": "query",
- "description": "Token of the flow",
+ "name": "collectionId",
+ "in": "path",
+ "description": "ID of the collection",
"required": true,
"schema": {
- "type": "string"
+ "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": "Login flow credentials returned",
+ "description": "Collection returned",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/LoginFlowV2Credentials"
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "$ref": "#/components/schemas/Collection"
+ }
+ }
+ }
+ }
}
}
}
},
"404": {
- "description": "Login flow not found or completed",
+ "description": "Collection not found",
"content": {
"application/json": {
- "schema": {}
- }
- }
- }
- }
- }
- },
- "/index.php/login/v2": {
- "post": {
- "operationId": "client_flow_login_v2-init",
- "summary": "Init a login flow",
- "tags": [
- "client_flow_login_v2"
- ],
- "security": [
- {},
- {
- "bearer_auth": []
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
},
- {
- "basic_auth": []
- }
- ],
- "responses": {
- "200": {
- "description": "Login flow init returned",
+ "500": {
+ "description": "",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/LoginFlowV2"
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
}
}
}
}
}
- }
- },
- "/index.php/core/preview": {
- "get": {
- "operationId": "preview-get-preview-by-file-id",
- "summary": "Get a preview by file ID",
+ },
+ "post": {
+ "operationId": "collaboration_resources-add-resource",
+ "summary": "Add a resource to a collection",
"tags": [
- "preview"
+ "collaboration_resources"
],
"security": [
{
],
"parameters": [
{
- "name": "fileId",
- "in": "query",
- "description": "ID of the file",
- "schema": {
- "type": "integer",
- "format": "int64",
- "default": -1
- }
- },
- {
- "name": "x",
- "in": "query",
- "description": "Width of the preview",
- "schema": {
- "type": "integer",
- "format": "int64",
- "default": 32
- }
- },
- {
- "name": "y",
+ "name": "resourceType",
"in": "query",
- "description": "Height of the preview",
+ "description": "Name of the resource",
+ "required": true,
"schema": {
- "type": "integer",
- "format": "int64",
- "default": 32
+ "type": "string"
}
},
{
- "name": "a",
+ "name": "resourceId",
"in": "query",
- "description": "Whether to not crop the preview",
+ "description": "ID of the resource",
+ "required": true,
"schema": {
- "type": "integer",
- "default": 0,
- "enum": [
- 0,
- 1
- ]
+ "type": "string"
}
},
{
- "name": "forceIcon",
- "in": "query",
- "description": "Force returning an icon",
+ "name": "collectionId",
+ "in": "path",
+ "description": "ID of the collection",
+ "required": true,
"schema": {
"type": "integer",
- "default": 1,
- "enum": [
- 0,
- 1
- ]
- }
- },
- {
- "name": "mode",
- "in": "query",
- "description": "How to crop the image",
- "schema": {
- "type": "string",
- "default": "fill"
+ "format": "int64"
}
},
{
- "name": "mimeFallback",
- "in": "query",
- "description": "Whether to fallback to the mime icon if no preview is available",
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
"schema": {
- "type": "integer",
- "default": 0,
- "enum": [
- 0,
- 1
- ]
+ "type": "boolean",
+ "default": true
}
}
],
"responses": {
"200": {
- "description": "Preview returned",
+ "description": "Collection 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": {
+ "$ref": "#/components/schemas/Collection"
+ }
+ }
+ }
+ }
}
}
}
},
- "400": {
- "description": "Getting preview is not possible",
- "content": {
- "application/json": {
- "schema": {}
- }
- }
- },
- "403": {
- "description": "Getting preview is not allowed",
+ "404": {
+ "description": "Collection not found or resource inaccessible",
"content": {
"application/json": {
- "schema": {}
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
}
}
},
- "404": {
- "description": "Preview not found",
+ "500": {
+ "description": "",
"content": {
"application/json": {
- "schema": {}
- }
- }
- },
- "303": {
- "description": "Redirect to the mime icon url if mimeFallback is true",
- "headers": {
- "Location": {
"schema": {
- "type": "string"
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
}
}
}
}
}
- }
- },
- "/index.php/core/preview.png": {
- "get": {
- "operationId": "preview-get-preview",
- "summary": "Get a preview by file path",
+ },
+ "delete": {
+ "operationId": "collaboration_resources-remove-resource",
+ "summary": "Remove a resource from a collection",
"tags": [
- "preview"
+ "collaboration_resources"
],
"security": [
{
],
"parameters": [
{
- "name": "file",
+ "name": "resourceType",
"in": "query",
- "description": "Path of the file",
- "schema": {
- "type": "string",
- "default": ""
- }
- },
- {
- "name": "x",
- "in": "query",
- "description": "Width of the preview",
- "schema": {
- "type": "integer",
- "format": "int64",
- "default": 32
- }
- },
- {
- "name": "y",
- "in": "query",
- "description": "Height of the preview",
+ "description": "Name of the resource",
+ "required": true,
"schema": {
- "type": "integer",
- "format": "int64",
- "default": 32
+ "type": "string"
}
},
{
- "name": "a",
+ "name": "resourceId",
"in": "query",
- "description": "Whether to not crop the preview",
+ "description": "ID of the resource",
+ "required": true,
"schema": {
- "type": "integer",
- "default": 0,
- "enum": [
- 0,
- 1
- ]
+ "type": "string"
}
},
{
- "name": "forceIcon",
- "in": "query",
- "description": "Force returning an icon",
+ "name": "collectionId",
+ "in": "path",
+ "description": "ID of the collection",
+ "required": true,
"schema": {
"type": "integer",
- "default": 1,
- "enum": [
- 0,
- 1
- ]
- }
- },
- {
- "name": "mode",
- "in": "query",
- "description": "How to crop the image",
- "schema": {
- "type": "string",
- "default": "fill"
+ "format": "int64"
}
},
{
- "name": "mimeFallback",
- "in": "query",
- "description": "Whether to fallback to the mime icon if no preview is available",
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
"schema": {
- "type": "integer",
- "default": 0,
- "enum": [
- 0,
- 1
- ]
+ "type": "boolean",
+ "default": true
}
}
],
"responses": {
"200": {
- "description": "Preview returned",
+ "description": "Collection 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": {
+ "$ref": "#/components/schemas/Collection"
+ }
+ }
+ }
+ }
}
}
}
},
- "400": {
- "description": "Getting preview is not possible",
- "content": {
- "application/json": {
- "schema": {}
- }
- }
- },
- "403": {
- "description": "Getting preview is not allowed",
+ "404": {
+ "description": "Collection or resource not found",
"content": {
"application/json": {
- "schema": {}
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
}
}
},
- "404": {
- "description": "Preview not found",
+ "500": {
+ "description": "",
"content": {
"application/json": {
- "schema": {}
- }
- }
- },
- "303": {
- "description": "Redirect to the mime icon url if mimeFallback is true",
- "headers": {
- "Location": {
"schema": {
- "type": "string"
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
}
}
}
}
}
- }
- },
- "/index.php/core/references/preview/{referenceId}": {
- "get": {
- "operationId": "reference-preview",
- "summary": "Get a preview for a reference",
+ },
+ "put": {
+ "operationId": "collaboration_resources-rename-collection",
+ "summary": "Rename a collection",
"tags": [
- "reference"
+ "collaboration_resources"
],
"security": [
- {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "referenceId",
- "in": "path",
- "description": "the reference cache key",
+ "name": "collectionName",
+ "in": "query",
+ "description": "New name",
"required": true,
"schema": {
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "Preview returned",
- "content": {
- "*/*": {
- "schema": {
- "type": "string",
- "format": "binary"
- }
- }
- }
},
- "404": {
- "description": "Reference not found",
- "content": {
- "application/json": {
- "schema": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "/index.php/core/wipe/check": {
- "post": {
- "operationId": "wipe-check-wipe",
- "summary": "Check if the device should be wiped",
- "tags": [
- "wipe"
- ],
- "security": [
- {},
{
- "bearer_auth": []
+ "name": "collectionId",
+ "in": "path",
+ "description": "ID of the collection",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "format": "int64"
+ }
},
{
- "basic_auth": []
- }
- ],
- "parameters": [
- {
- "name": "token",
- "in": "query",
- "description": "App password",
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
"required": true,
"schema": {
- "type": "string"
+ "type": "boolean",
+ "default": true
}
}
],
"responses": {
"200": {
- "description": "Device should be wiped",
+ "description": "Collection returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
- "wipe"
+ "ocs"
],
"properties": {
- "wipe": {
- "type": "boolean"
- }
- }
- }
- }
- }
- },
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "$ref": "#/components/schemas/Collection"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"404": {
- "description": "Device should not be wiped",
+ "description": "Collection not found",
"content": {
"application/json": {
- "schema": {}
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
}
}
}
}
}
},
- "/index.php/core/wipe/success": {
- "post": {
- "operationId": "wipe-wipe-done",
- "summary": "Finish the wipe",
+ "/ocs/v2.php/collaboration/resources/collections/search/{filter}": {
+ "get": {
+ "operationId": "collaboration_resources-search-collections",
+ "summary": "Search for collections",
"tags": [
- "wipe"
+ "collaboration_resources"
],
"security": [
- {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "token",
- "in": "query",
- "description": "App password",
+ "name": "filter",
+ "in": "path",
+ "description": "Filter collections",
"required": true,
"schema": {
"type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "Wipe finished successfully",
- "content": {
- "application/json": {
- "schema": {}
- }
- }
- },
- "404": {
- "description": "Device should not be wiped",
- "content": {
- "application/json": {
- "schema": {}
- }
- }
- }
- }
- }
- },
- "/index.php/ocm-provider": {
- "get": {
- "operationId": "ocm-discovery",
- "summary": "generate a OCMProvider with local data and send it as DataResponse. This replaces the old PHP file ocm-provider/index.php",
- "tags": [
- "ocm"
- ],
- "security": [
- {},
- {
- "bearer_auth": []
},
{
- "basic_auth": []
+ "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": "OCM Provider details returned",
- "headers": {
- "X-NEXTCLOUD-OCM-PROVIDERS": {
- "schema": {
- "type": "boolean",
- "enum": [
- true
- ]
- }
- }
- },
+ "description": "Collections returned",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
- "enabled",
- "apiVersion",
- "endPoint",
- "resourceTypes"
+ "ocs"
],
"properties": {
- "enabled": {
- "type": "boolean"
- },
- "apiVersion": {
- "type": "string"
- },
- "endPoint": {
- "type": "string"
- },
- "resourceTypes": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "shareTypes",
- "protocols"
- ],
- "properties": {
- "name": {
- "type": "string"
- },
- "shareTypes": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "protocols": {
- "type": "object",
- "required": [
- "webdav"
- ],
- "properties": {
- "webdav": {
- "type": "string"
- }
- }
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Collection"
}
}
}
}
}
},
- "500": {
- "description": "OCM not supported",
+ "404": {
+ "description": "Collection not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
- "message"
+ "ocs"
],
"properties": {
- "message": {
- "type": "string"
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
}
}
}
}
}
},
- "/ocs/v2.php/cloud/capabilities": {
+ "/ocs/v2.php/collaboration/resources/{resourceType}/{resourceId}": {
"get": {
- "operationId": "ocs-get-capabilities",
- "summary": "Get the capabilities",
+ "operationId": "collaboration_resources-get-collections-by-resource",
+ "summary": "Get collections by resource",
"tags": [
- "ocs"
+ "collaboration_resources"
],
"security": [
- {},
{
"bearer_auth": []
},
}
],
"parameters": [
+ {
+ "name": "resourceType",
+ "in": "path",
+ "description": "Type of the resource",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "resourceId",
+ "in": "path",
+ "description": "ID of the resource",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "OCS-APIRequest",
"in": "header",
],
"responses": {
"200": {
- "description": "Capabilities returned",
+ "description": "Collections returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "type": "object",
- "required": [
- "version",
- "capabilities"
- ],
- "properties": {
- "version": {
- "type": "object",
- "required": [
- "major",
- "minor",
- "micro",
- "string",
- "edition",
- "extendedSupport"
- ],
- "properties": {
- "major": {
- "type": "integer",
- "format": "int64"
- },
- "minor": {
- "type": "integer",
- "format": "int64"
- },
- "micro": {
- "type": "integer",
- "format": "int64"
- },
- "string": {
- "type": "string"
- },
- "edition": {
- "type": "string"
- },
- "extendedSupport": {
- "type": "boolean"
- }
- }
- },
- "capabilities": {
- "type": "object",
- "additionalProperties": {
- "type": "object"
- }
- }
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Collection"
}
}
}
}
}
}
+ },
+ "404": {
+ "description": "Resource not accessible",
+ "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/core/navigation/apps": {
- "get": {
- "operationId": "navigation-get-apps-navigation",
- "summary": "Get the apps navigation",
+ "/ocs/v2.php/collaboration/resources/{baseResourceType}/{baseResourceId}": {
+ "post": {
+ "operationId": "collaboration_resources-create-collection-on-resource",
+ "summary": "Create a collection for a resource",
"tags": [
- "navigation"
+ "collaboration_resources"
],
"security": [
{
],
"parameters": [
{
- "name": "absolute",
+ "name": "name",
"in": "query",
- "description": "Rewrite URLs to absolute ones",
+ "description": "Name of the collection",
+ "required": true,
"schema": {
- "type": "integer",
- "default": 0,
- "enum": [
- 0,
- 1
- ]
+ "type": "string"
+ }
+ },
+ {
+ "name": "baseResourceType",
+ "in": "path",
+ "description": "Type of the base resource",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "baseResourceId",
+ "in": "path",
+ "description": "ID of the base resource",
+ "required": true,
+ "schema": {
+ "type": "string"
}
},
{
],
"responses": {
"200": {
- "description": "Apps navigation returned",
+ "description": "Collection returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/NavigationEntry"
- }
+ "$ref": "#/components/schemas/Collection"
}
}
}
}
}
},
- "304": {
- "description": "No apps navigation changed",
+ "400": {
+ "description": "Creating collection 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": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Resource inaccessible",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {}
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "",
"content": {
"application/json": {
"schema": {
}
}
},
- "/ocs/v2.php/core/navigation/settings": {
+ "/ocs/v2.php/hovercard/v1/{userId}": {
"get": {
- "operationId": "navigation-get-settings-navigation",
- "summary": "Get the settings navigation",
+ "operationId": "hover_card-get-user",
+ "summary": "Get the account details for a hovercard",
"tags": [
- "navigation"
+ "hover_card"
],
"security": [
{
],
"parameters": [
{
- "name": "absolute",
- "in": "query",
- "description": "Rewrite URLs to absolute ones",
+ "name": "userId",
+ "in": "path",
+ "description": "ID of the user",
+ "required": true,
"schema": {
- "type": "integer",
- "default": 0,
- "enum": [
- 0,
- 1
- ]
+ "type": "string"
}
},
{
],
"responses": {
"200": {
- "description": "Apps navigation returned",
+ "description": "Account details returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/NavigationEntry"
+ "type": "object",
+ "required": [
+ "userId",
+ "displayName",
+ "actions"
+ ],
+ "properties": {
+ "userId": {
+ "type": "string"
+ },
+ "displayName": {
+ "type": "string"
+ },
+ "actions": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ContactsAction"
+ }
+ }
}
}
}
}
}
},
- "304": {
- "description": "No apps navigation changed",
+ "404": {
+ "description": "Account not found",
"content": {
"application/json": {
"schema": {
}
}
},
- "/ocs/v2.php/core/autocomplete/get": {
+ "/ocs/v2.php/core/navigation/apps": {
"get": {
- "operationId": "auto_complete-get",
- "summary": "Autocomplete a query",
+ "operationId": "navigation-get-apps-navigation",
+ "summary": "Get the apps navigation",
"tags": [
- "auto_complete"
+ "navigation"
],
"security": [
{
],
"parameters": [
{
- "name": "search",
+ "name": "absolute",
"in": "query",
- "description": "Text to search for",
- "required": true,
+ "description": "Rewrite URLs to absolute ones",
"schema": {
- "type": "string"
+ "type": "integer",
+ "default": 0,
+ "enum": [
+ 0,
+ 1
+ ]
}
},
{
- "name": "itemType",
- "in": "query",
- "description": "Type of the items to search for",
- "schema": {
- "type": "string",
- "nullable": true
- }
- },
- {
- "name": "itemId",
- "in": "query",
- "description": "ID of the items to search for",
- "schema": {
- "type": "string",
- "nullable": true
- }
- },
- {
- "name": "sorter",
- "in": "query",
- "description": "can be piped, top prio first, e.g.: \"commenters|share-recipients\"",
- "schema": {
- "type": "string",
- "nullable": true
- }
- },
- {
- "name": "shareTypes[]",
- "in": "query",
- "description": "Types of shares to search for",
- "schema": {
- "type": "array",
- "default": [],
- "items": {
- "type": "integer",
- "format": "int64"
- }
- }
- },
- {
- "name": "limit",
- "in": "query",
- "description": "Maximum number of results to return",
- "schema": {
- "type": "integer",
- "format": "int64",
- "default": 10
- }
- },
- {
- "name": "OCS-APIRequest",
- "in": "header",
- "description": "Required to be true for the API request to pass",
- "required": 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": "Autocomplete results returned",
+ "description": "Apps navigation returned",
"content": {
"application/json": {
"schema": {
"data": {
"type": "array",
"items": {
- "$ref": "#/components/schemas/AutocompleteResult"
+ "$ref": "#/components/schemas/NavigationEntry"
}
}
}
}
}
}
+ },
+ "304": {
+ "description": "No apps navigation changed",
+ "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/core/whatsnew": {
+ "/ocs/v2.php/core/navigation/settings": {
"get": {
- "operationId": "whats_new-get",
- "summary": "Get the changes",
+ "operationId": "navigation-get-settings-navigation",
+ "summary": "Get the settings navigation",
"tags": [
- "whats_new"
+ "navigation"
],
"security": [
{
}
],
"parameters": [
+ {
+ "name": "absolute",
+ "in": "query",
+ "description": "Rewrite URLs to absolute ones",
+ "schema": {
+ "type": "integer",
+ "default": 0,
+ "enum": [
+ 0,
+ 1
+ ]
+ }
+ },
{
"name": "OCS-APIRequest",
"in": "header",
],
"responses": {
"200": {
- "description": "Changes returned",
+ "description": "Apps navigation returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "type": "object",
- "required": [
- "changelogURL",
- "product",
- "version"
- ],
- "properties": {
- "changelogURL": {
- "type": "string"
- },
- "product": {
- "type": "string"
- },
- "version": {
- "type": "string"
- },
- "whatsNew": {
- "type": "object",
- "required": [
- "regular",
- "admin"
- ],
- "properties": {
- "regular": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "admin": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/NavigationEntry"
}
}
}
}
}
},
- "204": {
- "description": "No changes",
+ "304": {
+ "description": "No apps navigation changed",
"content": {
"application/json": {
"schema": {
}
}
}
- },
- "post": {
- "operationId": "whats_new-dismiss",
- "summary": "Dismiss the changes",
+ }
+ },
+ "/ocs/v2.php/cloud/capabilities": {
+ "get": {
+ "operationId": "ocs-get-capabilities",
+ "summary": "Get the capabilities",
"tags": [
- "whats_new"
+ "ocs"
],
"security": [
+ {},
{
"bearer_auth": []
},
}
],
"parameters": [
- {
- "name": "version",
- "in": "query",
- "description": "Version to dismiss the changes for",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
{
"name": "OCS-APIRequest",
"in": "header",
],
"responses": {
"200": {
- "description": "Changes dismissed",
+ "description": "Capabilities returned",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "object",
+ "required": [
+ "version",
+ "capabilities"
+ ],
+ "properties": {
+ "version": {
+ "type": "object",
+ "required": [
+ "major",
+ "minor",
+ "micro",
+ "string",
+ "edition",
+ "extendedSupport"
+ ],
+ "properties": {
+ "major": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "minor": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "micro": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "string": {
+ "type": "string"
+ },
+ "edition": {
+ "type": "string"
+ },
+ "extendedSupport": {
+ "type": "boolean"
+ }
+ }
+ },
+ "capabilities": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object"
+ }
+ }
+ }
+ }
}
}
}
}
}
}
- },
- "500": {
- "description": "",
- "content": {
- "text/plain": {
- "schema": {
- "type": "string"
- }
- }
- }
}
}
}
},
- "/ocs/v2.php/core/getapppassword": {
- "get": {
- "operationId": "app_password-get-app-password",
- "summary": "Create app password",
+ "/ocs/v2.php/profile/{targetUserId}": {
+ "put": {
+ "operationId": "profile_api-set-visibility",
+ "summary": "Update the visibility of a parameter",
"tags": [
- "app_password"
+ "profile_api"
],
"security": [
{
],
"parameters": [
{
- "name": "OCS-APIRequest",
- "in": "header",
- "description": "Required to be true for the API request to pass",
+ "name": "paramId",
+ "in": "query",
+ "description": "ID of the parameter",
"required": true,
"schema": {
- "type": "boolean",
- "default": true
+ "type": "string"
}
- }
- ],
- "responses": {
- "200": {
- "description": "App password returned",
+ },
+ {
+ "name": "visibility",
+ "in": "query",
+ "description": "New visibility",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "targetUserId",
+ "in": "path",
+ "description": "ID of the user",
+ "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": "Visibility updated successfully",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {
- "type": "object",
- "required": [
- "apppassword"
- ],
- "properties": {
- "apppassword": {
- "type": "string"
- }
- }
- }
+ "data": {}
}
}
}
}
}
},
+ "400": {
+ "description": "Updating visibility is not possible",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
"403": {
- "description": "Creating app password is not allowed",
+ "description": "Not allowed to edit other users visibility",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Account not found",
"content": {
"text/plain": {
"schema": {
}
}
},
- "/ocs/v2.php/core/apppassword/rotate": {
+ "/ocs/v2.php/references/extract": {
"post": {
- "operationId": "app_password-rotate-app-password",
- "summary": "Rotate app password",
+ "operationId": "reference_api-extract",
+ "summary": "Extract references from a text",
"tags": [
- "app_password"
+ "reference_api"
],
"security": [
{
}
],
"parameters": [
+ {
+ "name": "text",
+ "in": "query",
+ "description": "Text to extract from",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "resolve",
+ "in": "query",
+ "description": "Resolve the references",
+ "schema": {
+ "type": "integer",
+ "default": 0,
+ "enum": [
+ 0,
+ 1
+ ]
+ }
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "description": "Maximum amount of references to extract",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "default": 1
+ }
+ },
{
"name": "OCS-APIRequest",
"in": "header",
],
"responses": {
"200": {
- "description": "App password returned",
+ "description": "References returned",
"content": {
"application/json": {
"schema": {
"data": {
"type": "object",
"required": [
- "apppassword"
+ "references"
],
"properties": {
- "apppassword": {
- "type": "string"
+ "references": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/Reference",
+ "nullable": true
+ }
}
}
}
}
}
}
- },
- "403": {
- "description": "Rotating app password is not allowed",
- "content": {
- "text/plain": {
- "schema": {
- "type": "string"
- }
- }
- }
}
}
}
},
- "/ocs/v2.php/core/apppassword": {
- "delete": {
- "operationId": "app_password-delete-app-password",
- "summary": "Delete app password",
+ "/ocs/v2.php/references/resolve": {
+ "get": {
+ "operationId": "reference_api-resolve-one",
+ "summary": "Resolve a reference",
"tags": [
- "app_password"
+ "reference_api"
],
"security": [
{
}
],
"parameters": [
+ {
+ "name": "reference",
+ "in": "query",
+ "description": "Reference to resolve",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "OCS-APIRequest",
"in": "header",
],
"responses": {
"200": {
- "description": "App password deleted successfully",
+ "description": "Reference returned",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "object",
+ "required": [
+ "references"
+ ],
+ "properties": {
+ "references": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/Reference",
+ "nullable": true
+ }
+ }
+ }
+ }
}
}
}
}
}
}
- },
- "403": {
- "description": "Deleting app password is not allowed",
- "content": {
- "text/plain": {
- "schema": {
- "type": "string"
- }
- }
- }
}
}
- }
- },
- "/ocs/v2.php/core/apppassword/confirm": {
- "put": {
- "operationId": "app_password-confirm-user-password",
- "summary": "Confirm the user password",
+ },
+ "post": {
+ "operationId": "reference_api-resolve",
+ "summary": "Resolve multiple references",
"tags": [
- "app_password"
+ "reference_api"
],
"security": [
{
],
"parameters": [
{
- "name": "password",
+ "name": "references[]",
"in": "query",
- "description": "The password of the user",
+ "description": "References to resolve",
"required": true,
"schema": {
- "type": "string"
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "description": "Maximum amount of references to resolve",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "default": 1
}
},
{
],
"responses": {
"200": {
- "description": "Password confirmation succeeded",
+ "description": "References returned",
"content": {
"application/json": {
"schema": {
"data": {
"type": "object",
"required": [
- "lastLogin"
+ "references"
],
"properties": {
- "lastLogin": {
- "type": "integer",
- "format": "int64"
+ "references": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/components/schemas/Reference",
+ "nullable": true
+ }
}
}
}
}
}
}
+ }
+ }
+ }
+ },
+ "/ocs/v2.php/references/providers": {
+ "get": {
+ "operationId": "reference_api-get-providers-info",
+ "summary": "Get the providers",
+ "tags": [
+ "reference_api"
+ ],
+ "security": [
+ {
+ "bearer_auth": []
},
- "403": {
- "description": "Password confirmation failed",
+ {
+ "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": "Providers returned",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ReferenceProvider"
+ }
+ }
}
}
}
}
}
},
- "/ocs/v2.php/hovercard/v1/{userId}": {
- "get": {
- "operationId": "hover_card-get-user",
- "summary": "Get the account details for a hovercard",
+ "/ocs/v2.php/references/provider/{providerId}": {
+ "put": {
+ "operationId": "reference_api-touch-provider",
+ "summary": "Touch a provider",
"tags": [
- "hover_card"
+ "reference_api"
],
"security": [
{
],
"parameters": [
{
- "name": "userId",
+ "name": "timestamp",
+ "in": "query",
+ "description": "Timestamp of the last usage",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "nullable": true
+ }
+ },
+ {
+ "name": "providerId",
"in": "path",
- "description": "ID of the user",
+ "description": "ID of the provider",
"required": true,
"schema": {
"type": "string"
],
"responses": {
"200": {
- "description": "Account details returned",
+ "description": "Provider touched",
"content": {
"application/json": {
"schema": {
"data": {
"type": "object",
"required": [
- "userId",
- "displayName",
- "actions"
+ "success"
],
"properties": {
- "userId": {
- "type": "string"
- },
- "displayName": {
- "type": "string"
- },
- "actions": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ContactsAction"
- }
+ "success": {
+ "type": "boolean"
}
}
}
}
}
}
- },
- "404": {
- "description": "Account 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/collaboration/resources/collections/search/{filter}": {
+ "/ocs/v2.php/textprocessing/tasktypes": {
"get": {
- "operationId": "collaboration_resources-search-collections",
- "summary": "Search for collections",
+ "operationId": "text_processing_api-task-types",
+ "summary": "This endpoint returns all available LanguageModel task types",
"tags": [
- "collaboration_resources"
+ "text_processing_api"
],
"security": [
+ {},
{
"bearer_auth": []
},
}
],
"parameters": [
- {
- "name": "filter",
- "in": "path",
- "description": "Filter collections",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
{
"name": "OCS-APIRequest",
"in": "header",
],
"responses": {
"200": {
- "description": "Collections returned",
+ "description": "Task types returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Collection"
+ "type": "object",
+ "required": [
+ "types"
+ ],
+ "properties": {
+ "types": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "id",
+ "name",
+ "description"
+ ],
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ }
+ }
+ }
+ }
}
}
}
}
}
}
- },
- "404": {
- "description": "Collection 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/collaboration/resources/collections/{collectionId}": {
- "get": {
- "operationId": "collaboration_resources-list-collection",
- "summary": "Get a collection",
+ "/ocs/v2.php/textprocessing/schedule": {
+ "post": {
+ "operationId": "text_processing_api-schedule",
+ "summary": "This endpoint allows scheduling a language model task",
"tags": [
- "collaboration_resources"
+ "text_processing_api"
],
"security": [
+ {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "collectionId",
- "in": "path",
- "description": "ID of the collection",
+ "name": "input",
+ "in": "query",
+ "description": "Input text",
"required": true,
"schema": {
- "type": "integer",
- "format": "int64"
+ "type": "string"
+ }
+ },
+ {
+ "name": "type",
+ "in": "query",
+ "description": "Type of the task",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "appId",
+ "in": "query",
+ "description": "ID of the app that will execute the task",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "identifier",
+ "in": "query",
+ "description": "An arbitrary identifier for the task",
+ "schema": {
+ "type": "string",
+ "default": ""
}
},
{
],
"responses": {
"200": {
- "description": "Collection returned",
+ "description": "Task scheduled successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "$ref": "#/components/schemas/Collection"
+ "type": "object",
+ "required": [
+ "task"
+ ],
+ "properties": {
+ "task": {
+ "$ref": "#/components/schemas/TextProcessingTask"
+ }
+ }
}
}
}
}
}
},
- "404": {
- "description": "Collection not found",
+ "500": {
+ "description": "",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
}
}
}
}
}
},
- "500": {
- "description": "",
+ "400": {
+ "description": "Scheduling task is not possible",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
}
}
}
}
}
}
- }
- }
- },
- "put": {
- "operationId": "collaboration_resources-rename-collection",
- "summary": "Rename a collection",
- "tags": [
- "collaboration_resources"
- ],
- "security": [
+ },
+ "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"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ocs/v2.php/textprocessing/task/{id}": {
+ "get": {
+ "operationId": "text_processing_api-get-task",
+ "summary": "This endpoint allows checking the status and results of a task. Tasks are removed 1 week after receiving their last update.",
+ "tags": [
+ "text_processing_api"
+ ],
+ "security": [
+ {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "collectionName",
- "in": "query",
- "description": "New name",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "collectionId",
+ "name": "id",
"in": "path",
- "description": "ID of the collection",
+ "description": "The id of the task",
"required": true,
"schema": {
"type": "integer",
],
"responses": {
"200": {
- "description": "Collection returned",
+ "description": "Task returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "$ref": "#/components/schemas/Collection"
+ "type": "object",
+ "required": [
+ "task"
+ ],
+ "properties": {
+ "task": {
+ "$ref": "#/components/schemas/TextProcessingTask"
+ }
+ }
}
}
}
}
},
"404": {
- "description": "Collection not found",
+ "description": "Task not found",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
}
}
}
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
}
}
}
}
}
},
- "post": {
- "operationId": "collaboration_resources-add-resource",
- "summary": "Add a resource to a collection",
+ "delete": {
+ "operationId": "text_processing_api-delete-task",
+ "summary": "This endpoint allows to delete a scheduled task for a user",
"tags": [
- "collaboration_resources"
+ "text_processing_api"
],
"security": [
{
],
"parameters": [
{
- "name": "resourceType",
- "in": "query",
- "description": "Name of the resource",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "resourceId",
- "in": "query",
- "description": "ID of the resource",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "collectionId",
+ "name": "id",
"in": "path",
- "description": "ID of the collection",
+ "description": "The id of the task",
"required": true,
"schema": {
"type": "integer",
],
"responses": {
"200": {
- "description": "Collection returned",
+ "description": "Task returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "$ref": "#/components/schemas/Collection"
+ "type": "object",
+ "required": [
+ "task"
+ ],
+ "properties": {
+ "task": {
+ "$ref": "#/components/schemas/TextProcessingTask"
+ }
+ }
}
}
}
}
},
"404": {
- "description": "Collection not found or resource inaccessible",
+ "description": "Task not found",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
}
}
}
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
}
}
}
}
}
}
- },
- "delete": {
- "operationId": "collaboration_resources-remove-resource",
- "summary": "Remove a resource from a collection",
+ }
+ },
+ "/ocs/v2.php/textprocessing/tasks/app/{appId}": {
+ "get": {
+ "operationId": "text_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": [
- "collaboration_resources"
+ "text_processing_api"
],
"security": [
{
],
"parameters": [
{
- "name": "resourceType",
- "in": "query",
- "description": "Name of the resource",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "resourceId",
+ "name": "identifier",
"in": "query",
- "description": "ID of the resource",
- "required": true,
+ "description": "An arbitrary identifier for the task",
"schema": {
- "type": "string"
+ "type": "string",
+ "nullable": true
}
},
{
- "name": "collectionId",
+ "name": "appId",
"in": "path",
- "description": "ID of the collection",
+ "description": "ID of the app",
"required": true,
"schema": {
- "type": "integer",
- "format": "int64"
+ "type": "string"
}
},
{
],
"responses": {
"200": {
- "description": "Collection returned",
+ "description": "Task list returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "$ref": "#/components/schemas/Collection"
+ "type": "object",
+ "required": [
+ "tasks"
+ ],
+ "properties": {
+ "tasks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/TextProcessingTask"
+ }
+ }
+ }
}
}
}
}
}
},
- "404": {
- "description": "Collection or resource not found",
+ "500": {
+ "description": "",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
}
}
}
}
}
}
+ }
+ }
+ }
+ },
+ "/ocs/v2.php/text2image/is_available": {
+ "get": {
+ "operationId": "text_to_image_api-is-available",
+ "summary": "Check whether this feature is available",
+ "tags": [
+ "text_to_image_api"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
},
- "500": {
- "description": "",
- "content": {
- "application/json": {
+ {
+ "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": "Returns availability status",
+ "content": {
+ "application/json": {
"schema": {
"type": "object",
"required": [
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "object",
+ "required": [
+ "isAvailable"
+ ],
+ "properties": {
+ "isAvailable": {
+ "type": "boolean"
+ }
+ }
+ }
}
}
}
}
}
},
- "/ocs/v2.php/collaboration/resources/{resourceType}/{resourceId}": {
- "get": {
- "operationId": "collaboration_resources-get-collections-by-resource",
- "summary": "Get collections by resource",
+ "/ocs/v2.php/text2image/schedule": {
+ "post": {
+ "operationId": "text_to_image_api-schedule",
+ "summary": "This endpoint allows scheduling a text to image task",
"tags": [
- "collaboration_resources"
+ "text_to_image_api"
],
"security": [
+ {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "resourceType",
- "in": "path",
- "description": "Type of the resource",
+ "name": "input",
+ "in": "query",
+ "description": "Input text",
"required": true,
"schema": {
"type": "string"
}
},
{
- "name": "resourceId",
- "in": "path",
- "description": "ID of the resource",
+ "name": "appId",
+ "in": "query",
+ "description": "ID of the app that will execute the task",
"required": true,
"schema": {
"type": "string"
}
},
+ {
+ "name": "identifier",
+ "in": "query",
+ "description": "An arbitrary identifier for the task",
+ "schema": {
+ "type": "string",
+ "default": ""
+ }
+ },
+ {
+ "name": "numberOfImages",
+ "in": "query",
+ "description": "The number of images to generate",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "default": 8
+ }
+ },
{
"name": "OCS-APIRequest",
"in": "header",
],
"responses": {
"200": {
- "description": "Collections returned",
+ "description": "Task scheduled successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Collection"
+ "type": "object",
+ "required": [
+ "task"
+ ],
+ "properties": {
+ "task": {
+ "$ref": "#/components/schemas/TextToImageTask"
+ }
}
}
}
}
}
},
- "404": {
- "description": "Resource not accessible",
+ "412": {
+ "description": "Scheduling task is not possible",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "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/collaboration/resources/{baseResourceType}/{baseResourceId}": {
- "post": {
- "operationId": "collaboration_resources-create-collection-on-resource",
- "summary": "Create a collection for a resource",
+ "/ocs/v2.php/text2image/task/{id}": {
+ "get": {
+ "operationId": "text_to_image_api-get-task",
+ "summary": "This endpoint allows checking the status and results of a task. Tasks are removed 1 week after receiving their last update.",
"tags": [
- "collaboration_resources"
+ "text_to_image_api"
],
"security": [
+ {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "name",
- "in": "query",
- "description": "Name of the collection",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "baseResourceType",
- "in": "path",
- "description": "Type of the base resource",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "baseResourceId",
+ "name": "id",
"in": "path",
- "description": "ID of the base resource",
+ "description": "The id of the task",
"required": true,
"schema": {
- "type": "string"
+ "type": "integer",
+ "format": "int64"
}
},
{
],
"responses": {
"200": {
- "description": "Collection returned",
+ "description": "Task returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "$ref": "#/components/schemas/Collection"
+ "type": "object",
+ "required": [
+ "task"
+ ],
+ "properties": {
+ "task": {
+ "$ref": "#/components/schemas/TextToImageTask"
+ }
+ }
}
}
}
}
}
},
- "400": {
- "description": "Creating collection 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": {}
- }
- }
- }
- }
- }
- }
- },
"404": {
- "description": "Resource inaccessible",
+ "description": "Task not found",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
}
}
}
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
}
}
}
}
}
}
- }
- },
- "/ocs/v2.php/references/resolve": {
- "get": {
- "operationId": "reference_api-resolve-one",
- "summary": "Resolve a reference",
+ },
+ "delete": {
+ "operationId": "text_to_image_api-delete-task",
+ "summary": "This endpoint allows to delete a scheduled task for a user",
"tags": [
- "reference_api"
+ "text_to_image_api"
],
"security": [
{
],
"parameters": [
{
- "name": "reference",
- "in": "query",
- "description": "Reference to resolve",
+ "name": "id",
+ "in": "path",
+ "description": "The id of the task",
"required": true,
"schema": {
- "type": "string"
+ "type": "integer",
+ "format": "int64"
}
},
{
],
"responses": {
"200": {
- "description": "Reference returned",
+ "description": "Task returned",
"content": {
"application/json": {
"schema": {
"data": {
"type": "object",
"required": [
- "references"
+ "task"
],
"properties": {
- "references": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/Reference",
- "nullable": true
- }
+ "task": {
+ "$ref": "#/components/schemas/TextToImageTask"
}
}
}
}
}
}
- }
- }
- },
- "post": {
- "operationId": "reference_api-resolve",
- "summary": "Resolve multiple references",
- "tags": [
- "reference_api"
- ],
- "security": [
- {
- "bearer_auth": []
},
- {
- "basic_auth": []
- }
- ],
- "parameters": [
- {
- "name": "references[]",
- "in": "query",
- "description": "References to resolve",
- "required": true,
- "schema": {
- "type": "array",
- "items": {
- "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"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
}
},
- {
- "name": "limit",
- "in": "query",
- "description": "Maximum amount of references to resolve",
- "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": "References returned",
+ "500": {
+ "description": "",
"content": {
"application/json": {
"schema": {
"data": {
"type": "object",
"required": [
- "references"
+ "message"
],
"properties": {
- "references": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/Reference",
- "nullable": true
- }
+ "message": {
+ "type": "string"
}
}
}
}
}
},
- "/ocs/v2.php/references/extract": {
- "post": {
- "operationId": "reference_api-extract",
- "summary": "Extract references from a text",
+ "/ocs/v2.php/text2image/task/{id}/image/{index}": {
+ "get": {
+ "operationId": "text_to_image_api-get-image",
+ "summary": "This endpoint allows downloading the resulting image of a task",
"tags": [
- "reference_api"
+ "text_to_image_api"
],
"security": [
+ {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "text",
- "in": "query",
- "description": "Text to extract from",
+ "name": "id",
+ "in": "path",
+ "description": "The id of the task",
"required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "resolve",
- "in": "query",
- "description": "Resolve the references",
"schema": {
"type": "integer",
- "default": 0,
- "enum": [
- 0,
- 1
- ]
+ "format": "int64"
}
},
{
- "name": "limit",
- "in": "query",
- "description": "Maximum amount of references to extract",
+ "name": "index",
+ "in": "path",
+ "description": "The index of the image to retrieve",
+ "required": true,
"schema": {
"type": "integer",
- "format": "int64",
- "default": 1
+ "format": "int64"
}
},
{
],
"responses": {
"200": {
- "description": "References returned",
+ "description": "Image returned",
+ "content": {
+ "*/*": {
+ "schema": {
+ "type": "string",
+ "format": "binary"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Task or image not found",
"content": {
"application/json": {
"schema": {
"data": {
"type": "object",
"required": [
- "references"
+ "message"
],
"properties": {
- "references": {
- "type": "object",
- "additionalProperties": {
- "$ref": "#/components/schemas/Reference",
- "nullable": true
- }
+ "message": {
+ "type": "string"
}
}
}
}
}
}
- }
- }
- }
- },
- "/ocs/v2.php/references/providers": {
- "get": {
- "operationId": "reference_api-get-providers-info",
- "summary": "Get the providers",
- "tags": [
- "reference_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": "Providers returned",
+ "500": {
+ "description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/ReferenceProvider"
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
}
}
}
}
}
},
- "/ocs/v2.php/references/provider/{providerId}": {
- "put": {
- "operationId": "reference_api-touch-provider",
- "summary": "Touch a provider",
+ "/ocs/v2.php/text2image/tasks/app/{appId}": {
+ "get": {
+ "operationId": "text_to_image_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": [
- "reference_api"
+ "text_to_image_api"
],
"security": [
{
],
"parameters": [
{
- "name": "timestamp",
+ "name": "identifier",
"in": "query",
- "description": "Timestamp of the last usage",
+ "description": "An arbitrary identifier for the task",
"schema": {
- "type": "integer",
- "format": "int64",
+ "type": "string",
"nullable": true
}
},
{
- "name": "providerId",
+ "name": "appId",
"in": "path",
- "description": "ID of the provider",
+ "description": "ID of the app",
"required": true,
"schema": {
"type": "string"
],
"responses": {
"200": {
- "description": "Provider touched",
+ "description": "Task list returned",
"content": {
"application/json": {
"schema": {
"data": {
"type": "object",
"required": [
- "success"
+ "tasks"
],
"properties": {
- "success": {
- "type": "boolean"
- }
+ "tasks": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/TextToImageTask"
+ }
+ }
}
}
}
}
}
}
- }
- }
- }
- },
- "/ocs/v2.php/profile/{targetUserId}": {
- "put": {
- "operationId": "profile_api-set-visibility",
- "summary": "Update the visibility of a parameter",
- "tags": [
- "profile_api"
- ],
- "security": [
- {
- "bearer_auth": []
- },
- {
- "basic_auth": []
- }
- ],
- "parameters": [
- {
- "name": "paramId",
- "in": "query",
- "description": "ID of the parameter",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "visibility",
- "in": "query",
- "description": "New visibility",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "targetUserId",
- "in": "path",
- "description": "ID of the user",
- "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": "Visibility updated successfully",
+ "500": {
+ "description": "",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {}
+ "data": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
}
}
}
}
}
}
- },
- "400": {
- "description": "Updating visibility is not possible",
- "content": {
- "text/plain": {
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "403": {
- "description": "Not allowed to edit other users visibility",
- "content": {
- "text/plain": {
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "404": {
- "description": "Account not found",
- "content": {
- "text/plain": {
- "schema": {
- "type": "string"
- }
- }
- }
}
}
}
},
- "/ocs/v2.php/search/providers": {
+ "/ocs/v2.php/translation/languages": {
"get": {
- "operationId": "unified_search-get-providers",
- "summary": "Get the providers for unified search",
+ "operationId": "translation_api-languages",
+ "summary": "Get the list of supported languages",
"tags": [
- "unified_search"
+ "translation_api"
],
"security": [
+ {},
{
"bearer_auth": []
},
}
],
"parameters": [
- {
- "name": "from",
- "in": "query",
- "description": "the url the user is currently at",
- "schema": {
- "type": "string",
- "default": ""
- }
- },
{
"name": "OCS-APIRequest",
"in": "header",
],
"responses": {
"200": {
- "description": "Providers returned",
+ "description": "Supported languages returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/UnifiedSearchProvider"
+ "type": "object",
+ "required": [
+ "languages",
+ "languageDetection"
+ ],
+ "properties": {
+ "languages": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "from",
+ "fromLabel",
+ "to",
+ "toLabel"
+ ],
+ "properties": {
+ "from": {
+ "type": "string"
+ },
+ "fromLabel": {
+ "type": "string"
+ },
+ "to": {
+ "type": "string"
+ },
+ "toLabel": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "languageDetection": {
+ "type": "boolean"
+ }
}
}
}
}
}
},
- "/ocs/v2.php/search/providers/{providerId}/search": {
- "get": {
- "operationId": "unified_search-search",
- "summary": "Launch a search for a specific search provider.",
- "description": "Additional filters are available for each provider. Send a request to /providers endpoint to list providers with their available filters.",
+ "/ocs/v2.php/translation/translate": {
+ "post": {
+ "operationId": "translation_api-translate",
+ "summary": "Translate a text",
"tags": [
- "unified_search"
+ "translation_api"
],
"security": [
+ {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "term",
- "in": "query",
- "description": "Term to search",
- "schema": {
- "type": "string",
- "default": ""
- }
- },
- {
- "name": "sortOrder",
+ "name": "text",
"in": "query",
- "description": "Order of entries",
+ "description": "Text to be translated",
+ "required": true,
"schema": {
- "type": "integer",
- "format": "int64",
- "nullable": true
+ "type": "string"
}
},
{
- "name": "limit",
+ "name": "fromLanguage",
"in": "query",
- "description": "Maximum amount of entries",
+ "description": "Language to translate from",
"schema": {
- "type": "integer",
- "format": "int64",
+ "type": "string",
"nullable": true
}
},
{
- "name": "cursor",
- "in": "query",
- "description": "Offset for searching",
- "schema": {
- "nullable": true,
- "oneOf": [
- {
- "type": "integer",
- "format": "int64"
- },
- {
- "type": "string"
- }
- ]
- }
- },
- {
- "name": "from",
+ "name": "toLanguage",
"in": "query",
- "description": "The current user URL",
- "schema": {
- "type": "string",
- "default": ""
- }
- },
- {
- "name": "providerId",
- "in": "path",
- "description": "ID of the provider",
+ "description": "Language to translate to",
"required": true,
"schema": {
"type": "string"
],
"responses": {
"200": {
- "description": "Search entries returned",
+ "description": "Translated text returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "$ref": "#/components/schemas/UnifiedSearchResult"
+ "type": "object",
+ "required": [
+ "text",
+ "from"
+ ],
+ "properties": {
+ "text": {
+ "type": "string"
+ },
+ "from": {
+ "type": "string",
+ "nullable": true
+ }
+ }
}
}
}
}
},
"400": {
- "description": "Searching is not possible",
+ "description": "Language not detected or unable to translate",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "type": "string"
- }
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "from": {
+ "type": "string",
+ "nullable": true
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "412": {
+ "description": "Translating 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"
+ },
+ "from": {
+ "type": "string",
+ "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"
+ },
+ "from": {
+ "type": "string",
+ "nullable": true
+ }
+ }
+ }
}
}
}
}
}
},
- "/ocs/v2.php/translation/languages": {
+ "/ocs/v2.php/search/providers": {
"get": {
- "operationId": "translation_api-languages",
- "summary": "Get the list of supported languages",
+ "operationId": "unified_search-get-providers",
+ "summary": "Get the providers for unified search",
"tags": [
- "translation_api"
+ "unified_search"
],
"security": [
- {},
{
"bearer_auth": []
},
}
],
"parameters": [
+ {
+ "name": "from",
+ "in": "query",
+ "description": "the url the user is currently at",
+ "schema": {
+ "type": "string",
+ "default": ""
+ }
+ },
{
"name": "OCS-APIRequest",
"in": "header",
],
"responses": {
"200": {
- "description": "Supported languages returned",
+ "description": "Providers returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "type": "object",
- "required": [
- "languages",
- "languageDetection"
- ],
- "properties": {
- "languages": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "from",
- "fromLabel",
- "to",
- "toLabel"
- ],
- "properties": {
- "from": {
- "type": "string"
- },
- "fromLabel": {
- "type": "string"
- },
- "to": {
- "type": "string"
- },
- "toLabel": {
- "type": "string"
- }
- }
- }
- },
- "languageDetection": {
- "type": "boolean"
- }
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/UnifiedSearchProvider"
}
}
}
}
}
},
- "/ocs/v2.php/translation/translate": {
- "post": {
- "operationId": "translation_api-translate",
- "summary": "Translate a text",
+ "/ocs/v2.php/search/providers/{providerId}/search": {
+ "get": {
+ "operationId": "unified_search-search",
+ "summary": "Launch a search for a specific search provider.",
+ "description": "Additional filters are available for each provider. Send a request to /providers endpoint to list providers with their available filters.",
"tags": [
- "translation_api"
+ "unified_search"
],
"security": [
- {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "text",
+ "name": "term",
"in": "query",
- "description": "Text to be translated",
- "required": true,
+ "description": "Term to search",
"schema": {
- "type": "string"
+ "type": "string",
+ "default": ""
}
},
{
- "name": "fromLanguage",
+ "name": "sortOrder",
"in": "query",
- "description": "Language to translate from",
+ "description": "Order of entries",
"schema": {
- "type": "string",
+ "type": "integer",
+ "format": "int64",
"nullable": true
}
},
{
- "name": "toLanguage",
+ "name": "limit",
"in": "query",
- "description": "Language to translate to",
+ "description": "Maximum amount of entries",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "nullable": true
+ }
+ },
+ {
+ "name": "cursor",
+ "in": "query",
+ "description": "Offset for searching",
+ "schema": {
+ "nullable": true,
+ "oneOf": [
+ {
+ "type": "integer",
+ "format": "int64"
+ },
+ {
+ "type": "string"
+ }
+ ]
+ }
+ },
+ {
+ "name": "from",
+ "in": "query",
+ "description": "The current user URL",
+ "schema": {
+ "type": "string",
+ "default": ""
+ }
+ },
+ {
+ "name": "providerId",
+ "in": "path",
+ "description": "ID of the provider",
"required": true,
"schema": {
"type": "string"
],
"responses": {
"200": {
- "description": "Translated text returned",
+ "description": "Search entries returned",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "type": "object",
- "required": [
- "text",
- "from"
- ],
- "properties": {
- "text": {
- "type": "string"
- },
- "from": {
- "type": "string",
- "nullable": true
- }
- }
+ "$ref": "#/components/schemas/UnifiedSearchResult"
}
}
}
}
},
"400": {
- "description": "Language not detected or unable to translate",
+ "description": "Searching is not possible",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
- "type": "object",
- "required": [
- "message"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "from": {
- "type": "string",
- "nullable": true
- }
- }
+ "type": "string"
}
}
}
}
}
}
+ }
+ }
+ }
+ },
+ "/ocs/v2.php/core/whatsnew": {
+ "get": {
+ "operationId": "whats_new-get",
+ "summary": "Get the changes",
+ "tags": [
+ "whats_new"
+ ],
+ "security": [
+ {
+ "bearer_auth": []
},
- "412": {
- "description": "Translating is not possible",
+ {
+ "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": "Changes returned",
"content": {
"application/json": {
"schema": {
"data": {
"type": "object",
"required": [
- "message"
+ "changelogURL",
+ "product",
+ "version"
],
"properties": {
- "message": {
+ "changelogURL": {
"type": "string"
},
- "from": {
- "type": "string",
- "nullable": true
+ "product": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ },
+ "whatsNew": {
+ "type": "object",
+ "required": [
+ "regular",
+ "admin"
+ ],
+ "properties": {
+ "regular": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "admin": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
}
}
}
}
}
},
- "500": {
- "description": "",
+ "204": {
+ "description": "No changes",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {
- "type": "object",
- "required": [
- "message"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "from": {
- "type": "string",
- "nullable": true
- }
- }
- }
+ "data": {}
}
}
}
}
}
}
- }
- },
- "/ocs/v2.php/textprocessing/tasktypes": {
- "get": {
- "operationId": "text_processing_api-task-types",
- "summary": "This endpoint returns all available LanguageModel task types",
+ },
+ "post": {
+ "operationId": "whats_new-dismiss",
+ "summary": "Dismiss the changes",
"tags": [
- "text_processing_api"
+ "whats_new"
],
"security": [
- {},
{
"bearer_auth": []
},
}
],
"parameters": [
+ {
+ "name": "version",
+ "in": "query",
+ "description": "Version to dismiss the changes for",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "OCS-APIRequest",
"in": "header",
],
"responses": {
"200": {
- "description": "Task types returned",
+ "description": "Changes dismissed",
"content": {
"application/json": {
"schema": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
- "data": {
- "type": "object",
- "required": [
- "types"
- ],
- "properties": {
- "types": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "id",
- "name",
- "description"
- ],
- "properties": {
- "id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- }
- }
- }
- }
- }
- }
+ "data": {}
}
}
}
}
}
}
+ },
+ "500": {
+ "description": "",
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string"
+ }
+ }
+ }
}
}
}
},
- "/ocs/v2.php/textprocessing/schedule": {
- "post": {
- "operationId": "text_processing_api-schedule",
- "summary": "This endpoint allows scheduling a language model task",
+ "/index.php/avatar/{userId}/{size}/dark": {
+ "get": {
+ "operationId": "avatar-get-avatar-dark",
+ "summary": "Get the dark avatar",
"tags": [
- "text_processing_api"
+ "avatar"
],
"security": [
{},
],
"parameters": [
{
- "name": "input",
- "in": "query",
- "description": "Input text",
+ "name": "userId",
+ "in": "path",
+ "description": "ID of the user",
"required": true,
"schema": {
"type": "string"
}
},
{
- "name": "type",
- "in": "query",
- "description": "Type of the task",
+ "name": "size",
+ "in": "path",
+ "description": "Size of the avatar",
"required": true,
"schema": {
- "type": "string"
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Avatar returned",
+ "headers": {
+ "X-NC-IsCustomAvatar": {
+ "schema": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ },
+ "content": {
+ "*/*": {
+ "schema": {
+ "type": "string",
+ "format": "binary"
+ }
+ }
}
},
- {
- "name": "appId",
- "in": "query",
- "description": "ID of the app that will execute the task",
- "required": true,
- "schema": {
- "type": "string"
+ "404": {
+ "description": "Avatar not found",
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
}
+ }
+ }
+ }
+ },
+ "/index.php/avatar/{userId}/{size}": {
+ "get": {
+ "operationId": "avatar-get-avatar",
+ "summary": "Get the avatar",
+ "tags": [
+ "avatar"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
},
{
- "name": "identifier",
- "in": "query",
- "description": "An arbitrary identifier for the task",
+ "basic_auth": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "userId",
+ "in": "path",
+ "description": "ID of the user",
+ "required": true,
"schema": {
- "type": "string",
- "default": ""
+ "type": "string"
}
},
{
- "name": "OCS-APIRequest",
- "in": "header",
- "description": "Required to be true for the API request to pass",
+ "name": "size",
+ "in": "path",
+ "description": "Size of the avatar",
"required": true,
"schema": {
- "type": "boolean",
- "default": true
+ "type": "integer",
+ "format": "int64"
}
}
],
"responses": {
"200": {
- "description": "Task scheduled successfully",
- "content": {
- "application/json": {
+ "description": "Avatar returned",
+ "headers": {
+ "X-NC-IsCustomAvatar": {
"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/TextProcessingTask"
- }
- }
- }
- }
- }
- }
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ },
+ "content": {
+ "*/*": {
+ "schema": {
+ "type": "string",
+ "format": "binary"
}
}
}
},
- "500": {
- "description": "",
+ "404": {
+ "description": "Avatar 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"
- }
- }
- }
- }
- }
- }
- }
+ "schema": {}
}
}
+ }
+ }
+ }
+ },
+ "/index.php/login/v2/poll": {
+ "post": {
+ "operationId": "client_flow_login_v2-poll",
+ "summary": "Poll the login flow credentials",
+ "tags": [
+ "client_flow_login_v2"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
},
- "400": {
- "description": "Scheduling task is not possible",
+ {
+ "basic_auth": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "token",
+ "in": "query",
+ "description": "Token of the flow",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Login flow credentials 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": [
- "message"
- ],
- "properties": {
- "message": {
- "type": "string"
- }
- }
- }
- }
- }
- }
+ "$ref": "#/components/schemas/LoginFlowV2Credentials"
}
}
}
},
- "412": {
- "description": "Scheduling task is not possible",
+ "404": {
+ "description": "Login flow not found or completed",
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ }
+ }
+ }
+ }
+ },
+ "/index.php/login/v2": {
+ "post": {
+ "operationId": "client_flow_login_v2-init",
+ "summary": "Init a login flow",
+ "tags": [
+ "client_flow_login_v2"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Login flow init 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": [
- "message"
- ],
- "properties": {
- "message": {
- "type": "string"
- }
- }
- }
- }
- }
- }
+ "$ref": "#/components/schemas/LoginFlowV2"
}
}
}
}
}
},
- "/ocs/v2.php/textprocessing/task/{id}": {
+ "/index.php/avatar/guest/{guestName}/{size}": {
"get": {
- "operationId": "text_processing_api-get-task",
- "summary": "This endpoint allows checking the status and results of a task. Tasks are removed 1 week after receiving their last update.",
+ "operationId": "guest_avatar-get-avatar",
+ "summary": "Returns a guest avatar image response",
"tags": [
- "text_processing_api"
+ "guest_avatar"
],
"security": [
{},
],
"parameters": [
{
- "name": "id",
+ "name": "darkTheme",
+ "in": "query",
+ "description": "Return dark avatar",
+ "schema": {
+ "type": "integer",
+ "nullable": true,
+ "default": 0,
+ "enum": [
+ 0,
+ 1
+ ]
+ }
+ },
+ {
+ "name": "guestName",
"in": "path",
- "description": "The id of the task",
+ "description": "The guest name, e.g. \"Albert\"",
"required": true,
"schema": {
- "type": "integer",
- "format": "int64"
+ "type": "string"
}
},
{
- "name": "OCS-APIRequest",
- "in": "header",
- "description": "Required to be true for the API request to pass",
+ "name": "size",
+ "in": "path",
+ "description": "The desired avatar size, e.g. 64 for 64x64px",
"required": true,
"schema": {
- "type": "boolean",
- "default": true
+ "type": "string"
}
}
],
"responses": {
"200": {
- "description": "Task returned",
+ "description": "Custom avatar 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/TextProcessingTask"
- }
- }
- }
- }
- }
- }
+ "type": "string",
+ "format": "binary"
}
}
}
},
- "404": {
- "description": "Task not found",
+ "201": {
+ "description": "Avatar 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": [
- "message"
- ],
- "properties": {
- "message": {
- "type": "string"
- }
- }
- }
- }
- }
- }
+ "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"
- }
- }
- }
- }
- }
- }
- }
- }
- }
+ "description": ""
}
}
- },
- "delete": {
- "operationId": "text_processing_api-delete-task",
- "summary": "This endpoint allows to delete a scheduled task for a user",
+ }
+ },
+ "/index.php/avatar/guest/{guestName}/{size}/dark": {
+ "get": {
+ "operationId": "guest_avatar-get-avatar-dark",
+ "summary": "Returns a dark guest avatar image response",
"tags": [
- "text_processing_api"
+ "guest_avatar"
],
"security": [
+ {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "id",
+ "name": "guestName",
"in": "path",
- "description": "The id of the task",
+ "description": "The guest name, e.g. \"Albert\"",
"required": true,
"schema": {
- "type": "integer",
- "format": "int64"
+ "type": "string"
}
},
{
- "name": "OCS-APIRequest",
- "in": "header",
- "description": "Required to be true for the API request to pass",
+ "name": "size",
+ "in": "path",
+ "description": "The desired avatar size, e.g. 64 for 64x64px",
"required": true,
"schema": {
- "type": "boolean",
- "default": true
+ "type": "string"
}
}
],
"responses": {
"200": {
- "description": "Task returned",
+ "description": "Custom avatar 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/TextProcessingTask"
- }
- }
- }
- }
- }
- }
+ "type": "string",
+ "format": "binary"
}
}
}
},
- "404": {
- "description": "Task not found",
+ "201": {
+ "description": "Avatar 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": [
- "message"
- ],
- "properties": {
- "message": {
- "type": "string"
- }
- }
- }
- }
- }
- }
+ "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"
- }
- }
- }
- }
- }
- }
- }
- }
- }
+ "description": ""
}
}
}
},
- "/ocs/v2.php/textprocessing/tasks/app/{appId}": {
- "get": {
- "operationId": "text_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",
+ "/index.php/login/confirm": {
+ "post": {
+ "operationId": "login-confirm-password",
+ "summary": "Confirm the user password",
"tags": [
- "text_processing_api"
+ "login"
],
"security": [
{
],
"parameters": [
{
- "name": "identifier",
+ "name": "password",
"in": "query",
- "description": "An arbitrary identifier for the task",
+ "description": "The password of the user",
+ "required": true,
"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
+ "type": "string"
}
}
],
"responses": {
"200": {
- "description": "Task list returned",
+ "description": "Password confirmation succeeded",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
- "ocs"
+ "lastLogin"
],
"properties": {
- "ocs": {
- "type": "object",
- "required": [
- "meta",
- "data"
- ],
- "properties": {
- "meta": {
- "$ref": "#/components/schemas/OCSMeta"
- },
- "data": {
- "type": "object",
- "required": [
- "tasks"
- ],
- "properties": {
- "tasks": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/TextProcessingTask"
- }
- }
- }
- }
- }
+ "lastLogin": {
+ "type": "integer",
+ "format": "int64"
}
}
}
}
}
},
- "500": {
- "description": "",
+ "403": {
+ "description": "Password confirmation failed",
"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"
- }
- }
- }
- }
- }
- }
- }
+ "schema": {}
}
}
}
}
}
},
- "/ocs/v2.php/text2image/is_available": {
+ "/index.php/ocm-provider": {
"get": {
- "operationId": "text_to_image_api-is-available",
- "summary": "Check whether this feature is available",
+ "operationId": "ocm-discovery",
+ "summary": "generate a OCMProvider with local data and send it as DataResponse. This replaces the old PHP file ocm-provider/index.php",
"tags": [
- "text_to_image_api"
+ "ocm"
],
"security": [
{},
"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": "Returns availability status",
+ "description": "OCM Provider details returned",
+ "headers": {
+ "X-NEXTCLOUD-OCM-PROVIDERS": {
+ "schema": {
+ "type": "boolean",
+ "enum": [
+ true
+ ]
+ }
+ }
+ },
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
- "ocs"
+ "enabled",
+ "apiVersion",
+ "endPoint",
+ "resourceTypes"
],
"properties": {
- "ocs": {
- "type": "object",
- "required": [
- "meta",
- "data"
- ],
- "properties": {
- "meta": {
- "$ref": "#/components/schemas/OCSMeta"
- },
- "data": {
- "type": "object",
- "required": [
- "isAvailable"
- ],
- "properties": {
- "isAvailable": {
- "type": "boolean"
+ "enabled": {
+ "type": "boolean"
+ },
+ "apiVersion": {
+ "type": "string"
+ },
+ "endPoint": {
+ "type": "string"
+ },
+ "resourceTypes": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "name",
+ "shareTypes",
+ "protocols"
+ ],
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "shareTypes": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "protocols": {
+ "type": "object",
+ "required": [
+ "webdav"
+ ],
+ "properties": {
+ "webdav": {
+ "type": "string"
+ }
}
}
}
}
}
}
+ },
+ "500": {
+ "description": "OCM not supported",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "message"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
}
}
}
},
- "/ocs/v2.php/text2image/schedule": {
- "post": {
- "operationId": "text_to_image_api-schedule",
- "summary": "This endpoint allows scheduling a text to image task",
+ "/index.php/core/preview.png": {
+ "get": {
+ "operationId": "preview-get-preview",
+ "summary": "Get a preview by file path",
"tags": [
- "text_to_image_api"
+ "preview"
],
"security": [
- {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "input",
+ "name": "file",
"in": "query",
- "description": "Input text",
- "required": true,
+ "description": "Path of the file",
"schema": {
- "type": "string"
+ "type": "string",
+ "default": ""
}
},
{
- "name": "appId",
+ "name": "x",
"in": "query",
- "description": "ID of the app that will execute the task",
- "required": true,
+ "description": "Width of the preview",
"schema": {
- "type": "string"
+ "type": "integer",
+ "format": "int64",
+ "default": 32
}
},
{
- "name": "identifier",
+ "name": "y",
"in": "query",
- "description": "An arbitrary identifier for the task",
+ "description": "Height of the preview",
"schema": {
- "type": "string",
- "default": ""
+ "type": "integer",
+ "format": "int64",
+ "default": 32
}
},
{
- "name": "numberOfImages",
+ "name": "a",
"in": "query",
- "description": "The number of images to generate",
+ "description": "Whether to not crop the preview",
"schema": {
"type": "integer",
- "format": "int64",
- "default": 8
+ "default": 0,
+ "enum": [
+ 0,
+ 1
+ ]
}
},
{
- "name": "OCS-APIRequest",
- "in": "header",
- "description": "Required to be true for the API request to pass",
- "required": true,
+ "name": "forceIcon",
+ "in": "query",
+ "description": "Force returning an icon",
"schema": {
- "type": "boolean",
- "default": true
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Task scheduled successfully",
+ "type": "integer",
+ "default": 1,
+ "enum": [
+ 0,
+ 1
+ ]
+ }
+ },
+ {
+ "name": "mode",
+ "in": "query",
+ "description": "How to crop the image",
+ "schema": {
+ "type": "string",
+ "default": "fill"
+ }
+ },
+ {
+ "name": "mimeFallback",
+ "in": "query",
+ "description": "Whether to fallback to the mime icon if no preview is available",
+ "schema": {
+ "type": "integer",
+ "default": 0,
+ "enum": [
+ 0,
+ 1
+ ]
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Preview 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/TextToImageTask"
- }
- }
- }
- }
- }
- }
+ "type": "string",
+ "format": "binary"
}
}
}
},
- "412": {
- "description": "Scheduling task is not possible",
+ "400": {
+ "description": "Getting preview 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"
- }
- }
- }
- }
- }
- }
- }
+ "schema": {}
}
}
},
- "500": {
- "description": "",
+ "403": {
+ "description": "Getting preview is not allowed",
"content": {
"application/json": {
+ "schema": {}
+ }
+ }
+ },
+ "404": {
+ "description": "Preview not found",
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ }
+ },
+ "303": {
+ "description": "Redirect to the mime icon url if mimeFallback is true",
+ "headers": {
+ "Location": {
"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"
- }
- }
- }
- }
- }
- }
+ "type": "string"
}
}
}
}
}
},
- "/ocs/v2.php/text2image/task/{id}": {
+ "/index.php/core/preview": {
"get": {
- "operationId": "text_to_image_api-get-task",
- "summary": "This endpoint allows checking the status and results of a task. Tasks are removed 1 week after receiving their last update.",
+ "operationId": "preview-get-preview-by-file-id",
+ "summary": "Get a preview by file ID",
"tags": [
- "text_to_image_api"
+ "preview"
],
"security": [
- {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "id",
- "in": "path",
- "description": "The id of the task",
- "required": true,
+ "name": "fileId",
+ "in": "query",
+ "description": "ID of the file",
"schema": {
"type": "integer",
- "format": "int64"
+ "format": "int64",
+ "default": -1
}
},
{
- "name": "OCS-APIRequest",
- "in": "header",
- "description": "Required to be true for the API request to pass",
- "required": true,
+ "name": "x",
+ "in": "query",
+ "description": "Width of the preview",
"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/TextToImageTask"
- }
- }
- }
- }
- }
- }
- }
- }
+ "type": "integer",
+ "format": "int64",
+ "default": 32
}
},
- "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"
- }
- }
- }
- }
- }
- }
- }
- }
+ {
+ "name": "y",
+ "in": "query",
+ "description": "Height of the preview",
+ "schema": {
+ "type": "integer",
+ "format": "int64",
+ "default": 32
}
},
- "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"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "delete": {
- "operationId": "text_to_image_api-delete-task",
- "summary": "This endpoint allows to delete a scheduled task for a user",
- "tags": [
- "text_to_image_api"
- ],
- "security": [
{
- "bearer_auth": []
+ "name": "a",
+ "in": "query",
+ "description": "Whether to not crop the preview",
+ "schema": {
+ "type": "integer",
+ "default": 0,
+ "enum": [
+ 0,
+ 1
+ ]
+ }
},
{
- "basic_auth": []
- }
- ],
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "description": "The id of the task",
- "required": true,
+ "name": "forceIcon",
+ "in": "query",
+ "description": "Force returning an icon",
"schema": {
"type": "integer",
- "format": "int64"
+ "default": 1,
+ "enum": [
+ 0,
+ 1
+ ]
}
},
{
- "name": "OCS-APIRequest",
- "in": "header",
- "description": "Required to be true for the API request to pass",
- "required": true,
+ "name": "mode",
+ "in": "query",
+ "description": "How to crop the image",
"schema": {
- "type": "boolean",
- "default": true
+ "type": "string",
+ "default": "fill"
+ }
+ },
+ {
+ "name": "mimeFallback",
+ "in": "query",
+ "description": "Whether to fallback to the mime icon if no preview is available",
+ "schema": {
+ "type": "integer",
+ "default": 0,
+ "enum": [
+ 0,
+ 1
+ ]
}
}
],
"responses": {
"200": {
- "description": "Task returned",
+ "description": "Preview 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/TextToImageTask"
- }
- }
- }
- }
- }
- }
+ "type": "string",
+ "format": "binary"
}
}
}
},
- "404": {
- "description": "Task not found",
+ "400": {
+ "description": "Getting preview 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"
- }
- }
- }
- }
- }
- }
- }
+ "schema": {}
}
}
},
- "500": {
- "description": "",
+ "403": {
+ "description": "Getting preview 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"
- }
- }
- }
- }
- }
- }
+ "schema": {}
+ }
+ }
+ },
+ "404": {
+ "description": "Preview not found",
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ }
+ },
+ "303": {
+ "description": "Redirect to the mime icon url if mimeFallback is true",
+ "headers": {
+ "Location": {
+ "schema": {
+ "type": "string"
}
}
}
}
}
},
- "/ocs/v2.php/text2image/task/{id}/image/{index}": {
+ "/index.php/core/references/preview/{referenceId}": {
"get": {
- "operationId": "text_to_image_api-get-image",
- "summary": "This endpoint allows downloading the resulting image of a task",
+ "operationId": "reference-preview",
+ "summary": "Get a preview for a reference",
"tags": [
- "text_to_image_api"
+ "reference"
],
"security": [
{},
],
"parameters": [
{
- "name": "id",
- "in": "path",
- "description": "The id of the task",
- "required": true,
- "schema": {
- "type": "integer",
- "format": "int64"
- }
- },
- {
- "name": "index",
+ "name": "referenceId",
"in": "path",
- "description": "The index of the image 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",
+ "description": "the reference cache key",
"required": true,
"schema": {
- "type": "boolean",
- "default": true
+ "type": "string"
}
}
],
"responses": {
"200": {
- "description": "Image returned",
+ "description": "Preview returned",
"content": {
"*/*": {
"schema": {
}
},
"404": {
- "description": "Task or image not found",
+ "description": "Reference 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"
- }
- }
- }
- }
- }
- }
+ "type": "string"
}
}
}
+ }
+ }
+ }
+ },
+ "/index.php/core/wipe/check": {
+ "post": {
+ "operationId": "wipe-check-wipe",
+ "summary": "Check if the device should be wiped",
+ "tags": [
+ "wipe"
+ ],
+ "security": [
+ {},
+ {
+ "bearer_auth": []
},
- "500": {
- "description": "",
+ {
+ "basic_auth": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "token",
+ "in": "query",
+ "description": "App password",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Device should be wiped",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
- "ocs"
+ "wipe"
],
"properties": {
- "ocs": {
- "type": "object",
- "required": [
- "meta",
- "data"
- ],
- "properties": {
- "meta": {
- "$ref": "#/components/schemas/OCSMeta"
- },
- "data": {
- "type": "object",
- "required": [
- "message"
- ],
- "properties": {
- "message": {
- "type": "string"
- }
- }
- }
- }
+ "wipe": {
+ "type": "boolean"
}
}
}
}
}
+ },
+ "404": {
+ "description": "Device should not be wiped",
+ "content": {
+ "application/json": {
+ "schema": {}
+ }
+ }
}
}
}
},
- "/ocs/v2.php/text2image/tasks/app/{appId}": {
- "get": {
- "operationId": "text_to_image_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",
+ "/index.php/core/wipe/success": {
+ "post": {
+ "operationId": "wipe-wipe-done",
+ "summary": "Finish the wipe",
"tags": [
- "text_to_image_api"
+ "wipe"
],
"security": [
+ {},
{
"bearer_auth": []
},
],
"parameters": [
{
- "name": "identifier",
+ "name": "token",
"in": "query",
- "description": "An arbitrary identifier for the task",
- "schema": {
- "type": "string",
- "nullable": true
- }
- },
- {
- "name": "appId",
- "in": "path",
- "description": "ID of the app",
+ "description": "App password",
"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",
+ "description": "Wipe finished 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": [
- "tasks"
- ],
- "properties": {
- "tasks": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/TextToImageTask"
- }
- }
- }
- }
- }
- }
- }
- }
+ "schema": {}
}
}
},
- "500": {
- "description": "",
+ "404": {
+ "description": "Device should not be wiped",
"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"
- }
- }
- }
- }
- }
- }
- }
+ "schema": {}
}
}
}
*
*/
-use OC\Core\Application;
-
-/** @var Application $application */
-$application = \OC::$server->query(Application::class);
-$application->registerRoutes($this, [
- 'routes' => [
- ['name' => 'lost#email', 'url' => '/lostpassword/email', 'verb' => 'POST'],
- ['name' => 'lost#resetform', 'url' => '/lostpassword/reset/form/{token}/{userId}', 'verb' => 'GET'],
- ['name' => 'lost#setPassword', 'url' => '/lostpassword/set/{token}/{userId}', 'verb' => 'POST'],
- ['name' => 'ProfilePage#index', 'url' => '/u/{targetUserId}', 'verb' => 'GET'],
- ['name' => 'user#getDisplayNames', 'url' => '/displaynames', 'verb' => 'POST'],
- ['name' => 'avatar#getAvatarDark', 'url' => '/avatar/{userId}/{size}/dark', 'verb' => 'GET'],
- ['name' => 'avatar#getAvatar', 'url' => '/avatar/{userId}/{size}', 'verb' => 'GET'],
- ['name' => 'avatar#deleteAvatar', 'url' => '/avatar/', 'verb' => 'DELETE'],
- ['name' => 'avatar#postCroppedAvatar', 'url' => '/avatar/cropped', 'verb' => 'POST'],
- ['name' => 'avatar#getTmpAvatar', 'url' => '/avatar/tmp', 'verb' => 'GET'],
- ['name' => 'avatar#postAvatar', 'url' => '/avatar/', 'verb' => 'POST'],
- ['name' => 'GuestAvatar#getAvatarDark', 'url' => '/avatar/guest/{guestName}/{size}/dark', 'verb' => 'GET'],
- ['name' => 'GuestAvatar#getAvatar', 'url' => '/avatar/guest/{guestName}/{size}', 'verb' => 'GET'],
- ['name' => 'CSRFToken#index', 'url' => '/csrftoken', 'verb' => 'GET'],
- ['name' => 'login#tryLogin', 'url' => '/login', 'verb' => 'POST'],
- ['name' => 'login#confirmPassword', 'url' => '/login/confirm', 'verb' => 'POST'],
- ['name' => 'login#showLoginForm', 'url' => '/login', 'verb' => 'GET'],
- ['name' => 'login#logout', 'url' => '/logout', 'verb' => 'GET'],
-
- // Original login flow used by all clients
- ['name' => 'ClientFlowLogin#showAuthPickerPage', 'url' => '/login/flow', 'verb' => 'GET'],
- ['name' => 'ClientFlowLogin#generateAppPassword', 'url' => '/login/flow', 'verb' => 'POST'],
- ['name' => 'ClientFlowLogin#grantPage', 'url' => '/login/flow/grant', 'verb' => 'GET'],
- ['name' => 'ClientFlowLogin#apptokenRedirect', 'url' => '/login/flow/apptoken', 'verb' => 'POST'],
-
- // NG login flow used by desktop client in case of Kerberos/fancy 2fa (smart cards for example)
- ['name' => 'ClientFlowLoginV2#poll', 'url' => '/login/v2/poll', 'verb' => 'POST'],
- ['name' => 'ClientFlowLoginV2#showAuthPickerPage', 'url' => '/login/v2/flow', 'verb' => 'GET'],
- ['name' => 'ClientFlowLoginV2#landing', 'url' => '/login/v2/flow/{token}', 'verb' => 'GET'],
- ['name' => 'ClientFlowLoginV2#grantPage', 'url' => '/login/v2/grant', 'verb' => 'GET'],
- ['name' => 'ClientFlowLoginV2#generateAppPassword', 'url' => '/login/v2/grant', 'verb' => 'POST'],
- ['name' => 'ClientFlowLoginV2#init', 'url' => '/login/v2', 'verb' => 'POST'],
- ['name' => 'ClientFlowLoginV2#apptokenRedirect', 'url' => '/login/v2/apptoken', 'verb' => 'POST'],
- ['name' => 'TwoFactorChallenge#selectChallenge', 'url' => '/login/selectchallenge', 'verb' => 'GET'],
- ['name' => 'TwoFactorChallenge#showChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'GET'],
- ['name' => 'TwoFactorChallenge#solveChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'POST'],
- ['name' => 'TwoFactorChallenge#setupProviders', 'url' => 'login/setupchallenge', 'verb' => 'GET'],
- ['name' => 'TwoFactorChallenge#setupProvider', 'url' => 'login/setupchallenge/{providerId}', 'verb' => 'GET'],
- ['name' => 'TwoFactorChallenge#confirmProviderSetup', 'url' => 'login/setupchallenge/{providerId}', 'verb' => 'POST'],
- ['name' => 'OCJS#getConfig', 'url' => '/core/js/oc.js', 'verb' => 'GET'],
- ['name' => 'Preview#getPreviewByFileId', 'url' => '/core/preview', 'verb' => 'GET'],
- ['name' => 'Preview#getPreview', 'url' => '/core/preview.png', 'verb' => 'GET'],
- ['name' => 'RecommendedApps#index', 'url' => '/core/apps/recommended', 'verb' => 'GET'],
- ['name' => 'Reference#preview', 'url' => '/core/references/preview/{referenceId}', 'verb' => 'GET'],
- ['name' => 'Css#getCss', 'url' => '/css/{appName}/{fileName}', 'verb' => 'GET'],
- ['name' => 'Js#getJs', 'url' => '/js/{appName}/{fileName}', 'verb' => 'GET'],
- ['name' => 'contactsMenu#index', 'url' => '/contactsmenu/contacts', 'verb' => 'POST'],
- ['name' => 'contactsMenu#findOne', 'url' => '/contactsmenu/findOne', 'verb' => 'POST'],
- ['name' => 'WalledGarden#get', 'url' => '/204', 'verb' => 'GET'],
- ['name' => 'Search#search', 'url' => '/core/search', 'verb' => 'GET'],
- ['name' => 'Wipe#checkWipe', 'url' => '/core/wipe/check', 'verb' => 'POST'],
- ['name' => 'Wipe#wipeDone', 'url' => '/core/wipe/success', 'verb' => 'POST'],
-
- // Logins for passwordless auth
- ['name' => 'WebAuthn#startAuthentication', 'url' => 'login/webauthn/start', 'verb' => 'POST'],
- ['name' => 'WebAuthn#finishAuthentication', 'url' => 'login/webauthn/finish', 'verb' => 'POST'],
-
- ['name' => 'Error#error404', 'url' => 'error/404'],
- ['name' => 'Error#error403', 'url' => 'error/403'],
-
- // Well known requests https://tools.ietf.org/html/rfc5785
- ['name' => 'WellKnown#handle', 'url' => '.well-known/{service}'],
-
- // OCM Provider requests https://github.com/cs3org/OCM-API
- ['name' => 'OCM#discovery', 'url' => '/ocm-provider/'],
-
- // Unsupported browser
- ['name' => 'UnsupportedBrowser#index', 'url' => 'unsupported'],
- ],
- 'ocs' => [
- ['root' => '/cloud', 'name' => 'OCS#getCapabilities', 'url' => '/capabilities', 'verb' => 'GET'],
- ['root' => '', 'name' => 'OCS#getConfig', 'url' => '/config', 'verb' => 'GET'],
- ['root' => '/person', 'name' => 'OCS#personCheck', 'url' => '/check', 'verb' => 'POST'],
- ['root' => '/identityproof', 'name' => 'OCS#getIdentityProof', 'url' => '/key/{cloudId}', 'verb' => 'GET'],
- ['root' => '/core', 'name' => 'Navigation#getAppsNavigation', 'url' => '/navigation/apps', 'verb' => 'GET'],
- ['root' => '/core', 'name' => 'Navigation#getSettingsNavigation', 'url' => '/navigation/settings', 'verb' => 'GET'],
- ['root' => '/core', 'name' => 'AutoComplete#get', 'url' => '/autocomplete/get', 'verb' => 'GET'],
- ['root' => '/core', 'name' => 'WhatsNew#get', 'url' => '/whatsnew', 'verb' => 'GET'],
- ['root' => '/core', 'name' => 'WhatsNew#dismiss', 'url' => '/whatsnew', 'verb' => 'POST'],
- ['root' => '/core', 'name' => 'AppPassword#getAppPassword', 'url' => '/getapppassword', 'verb' => 'GET'],
- ['root' => '/core', 'name' => 'AppPassword#rotateAppPassword', 'url' => '/apppassword/rotate', 'verb' => 'POST'],
- ['root' => '/core', 'name' => 'AppPassword#deleteAppPassword', 'url' => '/apppassword', 'verb' => 'DELETE'],
- ['root' => '/core', 'name' => 'AppPassword#confirmUserPassword', 'url' => '/apppassword/confirm', 'verb' => 'PUT'],
-
- ['root' => '/hovercard', 'name' => 'HoverCard#getUser', 'url' => '/v1/{userId}', 'verb' => 'GET'],
-
- ['root' => '/collaboration', 'name' => 'CollaborationResources#searchCollections', 'url' => '/resources/collections/search/{filter}', 'verb' => 'GET'],
- ['root' => '/collaboration', 'name' => 'CollaborationResources#listCollection', 'url' => '/resources/collections/{collectionId}', 'verb' => 'GET'],
- ['root' => '/collaboration', 'name' => 'CollaborationResources#renameCollection', 'url' => '/resources/collections/{collectionId}', 'verb' => 'PUT'],
- ['root' => '/collaboration', 'name' => 'CollaborationResources#addResource', 'url' => '/resources/collections/{collectionId}', 'verb' => 'POST'],
-
- ['root' => '/collaboration', 'name' => 'CollaborationResources#removeResource', 'url' => '/resources/collections/{collectionId}', 'verb' => 'DELETE'],
- ['root' => '/collaboration', 'name' => 'CollaborationResources#getCollectionsByResource', 'url' => '/resources/{resourceType}/{resourceId}', 'verb' => 'GET'],
- ['root' => '/collaboration', 'name' => 'CollaborationResources#createCollectionOnResource', 'url' => '/resources/{baseResourceType}/{baseResourceId}', 'verb' => 'POST'],
-
- ['root' => '/references', 'name' => 'ReferenceApi#resolveOne', 'url' => '/resolve', 'verb' => 'GET'],
- ['root' => '/references', 'name' => 'ReferenceApi#extract', 'url' => '/extract', 'verb' => 'POST'],
- ['root' => '/references', 'name' => 'ReferenceApi#resolve', 'url' => '/resolve', 'verb' => 'POST'],
- ['root' => '/references', 'name' => 'ReferenceApi#getProvidersInfo', 'url' => '/providers', 'verb' => 'GET'],
- ['root' => '/references', 'name' => 'ReferenceApi#touchProvider', 'url' => '/provider/{providerId}', 'verb' => 'PUT'],
-
- ['root' => '/profile', 'name' => 'ProfileApi#setVisibility', 'url' => '/{targetUserId}', 'verb' => 'PUT'],
-
- // Unified search
- ['root' => '/search', 'name' => 'UnifiedSearch#getProviders', 'url' => '/providers', 'verb' => 'GET'],
- ['root' => '/search', 'name' => 'UnifiedSearch#search', 'url' => '/providers/{providerId}/search', 'verb' => 'GET'],
-
- ['root' => '/translation', 'name' => 'TranslationApi#languages', 'url' => '/languages', 'verb' => 'GET'],
- ['root' => '/translation', 'name' => 'TranslationApi#translate', 'url' => '/translate', 'verb' => 'POST'],
-
- ['root' => '/textprocessing', 'name' => 'TextProcessingApi#taskTypes', 'url' => '/tasktypes', 'verb' => 'GET'],
- ['root' => '/textprocessing', 'name' => 'TextProcessingApi#schedule', 'url' => '/schedule', 'verb' => 'POST'],
- ['root' => '/textprocessing', 'name' => 'TextProcessingApi#getTask', 'url' => '/task/{id}', 'verb' => 'GET'],
- ['root' => '/textprocessing', 'name' => 'TextProcessingApi#deleteTask', 'url' => '/task/{id}', 'verb' => 'DELETE'],
- ['root' => '/textprocessing', 'name' => 'TextProcessingApi#listTasksByApp', 'url' => '/tasks/app/{appId}', 'verb' => 'GET'],
-
- ['root' => '/text2image', 'name' => 'TextToImageApi#isAvailable', 'url' => '/is_available', 'verb' => 'GET'],
- ['root' => '/text2image', 'name' => 'TextToImageApi#schedule', 'url' => '/schedule', 'verb' => 'POST'],
- ['root' => '/text2image', 'name' => 'TextToImageApi#getTask', 'url' => '/task/{id}', 'verb' => 'GET'],
- ['root' => '/text2image', 'name' => 'TextToImageApi#getImage', 'url' => '/task/{id}/image/{index}', 'verb' => 'GET'],
- ['root' => '/text2image', 'name' => 'TextToImageApi#deleteTask', 'url' => '/task/{id}', 'verb' => 'DELETE'],
- ['root' => '/text2image', 'name' => 'TextToImageApi#listTasksByApp', 'url' => '/tasks/app/{appId}', 'verb' => 'GET'],
- ],
-]);
-
-// Post installation check
-
/** @var $this OCP\Route\IRouter */
// Core ajax actions
// Routing