### GET /settings Source: https://cloudrevev4.apifox.cn/llms Retrieves global site settings partitioned by sections. This allows for customized configuration of the Cloudreve instance. ```APIDOC ## GET /settings ### Description Get global site settings partitioned by sections. Only settings in your requested section will be included in your response. ### Method GET ### Endpoint /settings ### Parameters #### Query Parameters - **section** (string) - Required - The section of settings to retrieve. ### Request Example None ### Response #### Success Response (200) - **settings** (object) - An object containing the settings for the requested section. #### Response Example { "settings": { "siteName": "Cloudreve", "theme": "light" } } ``` -------------------------------- ### GET /site/config/{section} Source: https://cloudrevev4.apifox.cn/get-site-settings-289489676e0 Retrieves global site settings partitioned by sections. Only settings within the specified section are returned. ```APIDOC ## GET /site/config/{section} ### Description Get global site settings partitioned by sections. Only settings in your requested section will be included in your response. ### Method GET ### Endpoint /site/config/{section} ### Parameters #### Path Parameters - **section** (string) - Required - Setting section name. Possible values: basic, login, explorer, emojis, vas, app, thumb. ### Request Example ```json { "example": "GET /site/config/basic" } ``` ### Response #### Success Response (200) - **code** (integer) - Response code. `0` - Success. - **data** (object) - Site configuration details for the requested section. - **instance_id** (string) - Instance ID of the site. - **title** (string) - The title of the site. - **themes** (string) - JSON string representing site themes. - **default_theme** (string) - The default theme of the site. - **site_notice** (string) - A notice displayed on the site. - **user** (object) - Information about the site owner user. - **id** (string) - User ID. - **email** (string) - User email. - **nickname** (string) - User nickname. - **status** (string) - User status. - **avatar** (string) - User avatar path. - **created_at** (string) - Timestamp of user creation. - **credit** (integer) - User credit points. - **group** (object) - User group details. - **id** (string) - Group ID. - **name** (string) - Group name. - **permission** (string) - Group permissions. - **direct_link_batch_size** (integer) - Batch size for direct links. - **trash_retention** (integer) - Trash retention period in seconds. - **pined** (array) - Array of pinned items. - **logo** (string) - Path to the site logo. - **logo_light** (string) - Path to the light version of the site logo. - **msg** (string) - Human readable error message (if any). - **error** (string) - Internal error message, only visible in debug mode. - **correlation_id** (string) - Correlation ID of the request. Only presented on failed requests. #### Response Example ```json { "code": 0, "data": { "instance_id": "ac748bd0-7a04-48e7-a12b-8b3b9184b908", "title": "Cloudreve", "themes": "{\"#3f51b5\":{\"light\":{\"palette\":{\"primary\":{\"main\":\"#3f51b5\"},\"secondary\":{\"main\":\"#f50057\"}}},\"dark\":{\"palette\":{\"primary\":{\"main\":\"#9fa8da\"},\"secondary\":{\"main\":\"#ff4081\"}}}},\"#722946\":{\"light\":{\"palette\":{\"primary\":{\"main\":\"#722946\"},\"secondary\":{\"main\":\"#f50057\"}}},\"dark\":{\"palette\":{\"primary\":{\"main\":\"#e17fa5\"},\"secondary\":{\"main\":\"#f50057\"}}}},\"#1976d2\":{\"light\":{\"palette\":{\"primary\":{\"main\":\"#1976d2\",\"light\":\"#42a5f5\",\"dark\":\"#1565c0\"},\"secondary\":{\"main\":\"#9c27b0\",\"light\":\"#ba68c8\",\"dark\":\"#7b1fa2\"}}},\"dark\":{\"palette\":{\"primary\":{\"main\":\"#90caf9\",\"light\":\"#e3f2fd\",\"dark\":\"#42a5f5\"},\"secondary\":{\"main\":\"#ce93d8\",\"light\":\"#f3e5f5\",\"dark\":\"#ab47bc\"}}}}", "default_theme": "#1976d2", "site_notice": "This is a test site", "user": { "id": "6JIo", "email": "johnny.z@cloudreve.org", "nickname": "Johnny Zhang", "status": "active", "avatar": "file", "created_at": "2023-08-06T19:21:59+08:00", "credit": 2000, "group": { "id": "1AI8", "name": "User", "permission": "/GY=", "direct_link_batch_size": 10, "trash_retention": 14400 }, "pined": [ "cloudreve://my/videos" ] }, "logo": "/static/img/logo.svg", "logo_light": "/static/img/logo_light.svg" }, "msg": "", "error": null, "correlation_id": null } ``` ``` -------------------------------- ### POST /auth/prepare Source: https://cloudrevev4.apifox.cn/llms Queries if a user exists and lists possible login methods. Provides context for frontend UI. ```APIDOC ## POST /auth/prepare ### Description Query if a given is existed, and all possible login method for it. ### Method POST ### Endpoint /auth/prepare ### Parameters #### Request Body - **email** (string) - Required - The email to check. ### Request Example { "email": "user@example.com" } ### Response #### Success Response (200) - **exists** (boolean) - Indicates if the user exists. - **methods** (array) - List of possible login methods. #### Response Example { "exists": true, "methods": ["password", "openid", "passkey"] } ``` -------------------------------- ### Cloudreve v4 API Get Download URLs Example Source: https://cloudrevev4.apifox.cn/create-download-url-306560314e0 Demonstrates a successful API response for retrieving download URLs for multiple files. It provides a list of individual file URLs and an overall expiration timestamp for these links. ```json { "code": 0, "data": { "urls": [ { "url": "http://localhost:5173/api/v4/file/content/DprI3/0/The%20Man.mp3?download=true&sign=btoUMo1Z3K-i-zvUZ_YfCOr92up-tJXBrtJ4Fr-Zbfs%3D%3A1749528415" }, { "url": "http://localhost:5173/api/v4/file/content/Qynu9/0/Taylor%20Swift%20-%20Untouchable%20%28Taylor%E2%80%99s%20Version%29.mp3?download=true&sign=5U3QzjUBRDgMfwiaQHPT-Y40ZOz1hDwSQq14DtT26Sg%3D%3A1749528415" }, { "url": "http://localhost:5173/api/v4/file/content/8zJJC0/0/%E9%81%A0%E9%87%8E%E3%81%B2%E3%81%8B%E3%82%8B%20-%20LOVE%202000.mp3?download=true&sign=vIE8OIoWmwhLDhl5VyO5wysIZTVEhHpOAQfBt1r1zW0%3D%3A1749528415" }, { "url": "http://localhost:5173/api/v4/file/content/o7OhD/0/Taylor%20Swift%20-%20Guilty%20as%20Sin.mp3?download=true&sign=zJmW1lcpI-klLL5D2hC_nDxwQRzybsY-94peD_cpEBQ%3D%3A1749528415" } ], "expires": "2025-06-10T12:06:55.011624+08:00" }, "msg": "" } ``` -------------------------------- ### POST /signup Source: https://cloudrevev4.apifox.cn/llms Creates a new user account using the given email and password. ```APIDOC ## POST /signup ### Description Create a new account from given email and password. ### Method POST ### Endpoint /signup ### Parameters #### Request Body - **email** (string) - Required - The user's email address. - **password** (string) - Required - The user's password. ### Request Example { "email": "newuser@example.com", "password": "password123" } ### Response #### Success Response (200) - **message** (string) - A message indicating successful registration. #### Response Example { "message": "Registration successful" } ``` -------------------------------- ### GET /user/preferences Source: https://cloudrevev4.apifox.cn/llms Gets user preferences. ```APIDOC ## GET /user/preferences ### Description Get preferences. ### Method GET ### Endpoint /user/preferences ### Parameters None ### Request Example None ### Response #### Success Response (200) - **preferences** (object) - An object containing user preferences. #### Response Example { "preferences": { "theme": "dark", "language": "en" } } ``` -------------------------------- ### POST /user/passkey/prepare Source: https://cloudrevev4.apifox.cn/llms Prepares to register a new passkey for the authenticated user. ```APIDOC ## POST /user/passkey/prepare ### Description Prepare to register a new passkey. ### Method POST ### Endpoint /user/passkey/prepare ### Parameters None ### Request Example None ### Response #### Success Response (200) - **challenge** (string) - The challenge for Passkey registration. - **user** (object) - User information. #### Response Example { "challenge": "random_challenge", "user": { "id": "user_id", "name": "user@example.com", "displayName": "User Name" } } ``` -------------------------------- ### GET /user/{id} Source: https://cloudrevev4.apifox.cn/llms Gets a user by ID. Authorization is optional, but the `email` field will be redacted for anonymous requests. ```APIDOC ## GET /user/{id} ### Description Get user by ID. Authorization is optional, but `email` field will be redacted for anonymous request. ### Method GET ### Endpoint /user/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the user. ### Request Example None ### Response #### Success Response (200) - **id** (string) - The user ID. - **email** (string) - The user's email address (redacted if unauthorized). - **name** (string) - The user's name. #### Response Example { "id": "user_123", "email": "user@example.com", "name": "User Name" } ``` -------------------------------- ### GET /user/picture/{id} Source: https://cloudrevev4.apifox.cn/llms Gets a user's profile picture. Can be used directly as the `src` for an `img` tag. ```APIDOC ## GET /user/picture/{id} ### Description Get given user's profile picture. ### Method GET ### Endpoint /user/picture/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the user. ### Request Example None ### Response #### Success Response (200) - (image) - Raw image data. ``` -------------------------------- ### POST /auth/passkey/prepare Source: https://cloudrevev4.apifox.cn/llms Prepares a Passkey login session. Returns data necessary for initiating Passkey authentication. ```APIDOC ## POST /auth/passkey/prepare ### Description Prepare a Passkey login session. ### Method POST ### Endpoint /auth/passkey/prepare ### Parameters None ### Request Example None ### Response #### Success Response (200) - **challenge** (string) - The challenge for Passkey authentication. - **user_verification** (string) - User verification requirement. #### Response Example { "challenge": "random_challenge", "user_verification": "required" } ``` -------------------------------- ### Cloudreve API Direct Link Generation Example Source: https://cloudrevev4.apifox.cn/create-direct-links-306837572e0 Example of a successful API response when generating direct links for files. It includes a list of files, each with a public 'link' and a 'file_url' for direct access. ```json { "code": 0, "data": [ { "link": "http://localhost:5173/f/b8JH4/cloudreve_4.0.0-beta.7_windows_amd64.zip", "file_url": "cloudreve://my/Inspirations/cloudreve_4.0.0-beta.7_windows_amd64.zip" }, { "link": "http://localhost:5173/f/8Qeue/archive.zip", "file_url": "cloudreve://my/Inspirations/archive.zip" } ], "msg": "" } ``` -------------------------------- ### POST /user/2fa/prepare Source: https://cloudrevev4.apifox.cn/llms Prepares enabling 2FA by providing a TOTP secret for generating a QR Code. Requires authentication. ```APIDOC ## POST /user/2fa/prepare ### Description Before enabling 2FA, use this method to get a TOTP secret for generating QR Code. ### Method POST ### Endpoint /user/2fa/prepare ### Parameters None ### Request Example None ### Response #### Success Response (200) - **secret** (string) - The TOTP secret. #### Response Example { "secret": "totp_secret" } ``` -------------------------------- ### Cloudreve v4 API Batch Download Example Source: https://cloudrevev4.apifox.cn/create-download-url-306560314e0 An example of a successful API response for a server-side batch download operation. It returns a list of downloadable URLs and an expiration timestamp for the archive. ```json { "code": 0, "data": { "urls": [ { "url": "http://localhost:5173/api/v4/file/archive/56bb8329-3afa-4137-9ebb-2a07b6ea19b9/archive.zip?sign=1CgU15Is0ezKeTVKE_OAu2tJJoB6lN5s_DvRXTcP7GQ%3D%3A1749525301" } ], "expires": "2025-06-10T11:15:01.186053+08:00" }, "msg": "" } ``` -------------------------------- ### POST /user Source: https://cloudrevev4.apifox.cn/sign-up-289517607e0 Allows for the creation of a new user account using an email and password. It also supports specifying a preferred language and providing CAPTCHA details if enabled. ```APIDOC ## POST /user ### Description Create a new account from given email and password. ### Method POST ### Endpoint /user ### Parameters #### Request Body - **email** (string) - Required - Account email. - **password** (string) - Required - Account password. Minimum length 6, maximum length 64. - **language** (string) - Optional - Primary UI and Email language code. - **captcha** (string) - Optional - User input value of the graphical CAPTCHA. Required if graphic CAPTCHA enabled for current action. - **ticket** (string) - Optional - Ticket/Token of the CAPTCHA. Required if CAPTCHA is enabled for current action. ### Request Example ```json { "email": "example@cloudreve.org", "password": "P@ssw0rd", "language": "en-US", "captcha": "z3ds", "ticket": "4qXv7KmbYajJ0yFDKcmJ" } ``` ### Response #### Success Response (200) - **data** (object) - Contains user information. - **id** (string) - User ID. - **email** (string) - User's email. - **nickname** (string) - User's nickname. - **created_at** (string) - Timestamp of account creation. - **anonymous** (object/null) - Anonymous settings. - **group** (object) - User's group information. - **id** (string) - Group ID. - **name** (string) - Group name. - **permission** (string) - Group permissions. - **direct_link_batch_size** (integer) - Batch size for direct links. - **trash_retention** (integer) - Trash retention period in seconds. - **status** (string) - Account status (e.g., inactive). - **avatar** (string) - Avatar type or URL. - **preferred_theme** (string) - Preferred theme color. - **credit** (integer) - User's credit balance. - **language** (string) - User's preferred language. - **code** (integer) - Response code (0 for success). - **msg** (string) - Human-readable error message (if any). - **error** (string/null) - Internal error message (visible in debug mode). - **correlation_id** (string/null) - Correlation ID for the request (presented on failed requests). #### Response Example ```json { "data": { "id": "6JIo", "email": "Grover30@hotmail.com", "nickname": "Johnny Zhang", "created_at": "2023-08-06T19:21:59+08:00", "anonymous": null, "group": { "id": "1AI8", "name": "Admin", "permission": "/f8B", "direct_link_batch_size": 10, "trash_retention": 864000 }, "status": "inactive", "avatar": "file", "preferred_theme": "#131313", "credit": 8, "language": "en-US" }, "code": 0 } ``` ``` -------------------------------- ### Stripe Payment Example (YAML) Source: https://cloudrevev4.apifox.cn/create-a-payment-307864413e0 An example of a successful Stripe payment response. It includes a status code of 0, payment details such as trade number and price, and request information indicating payment is needed. ```yaml examples: '1': summary: Stripe value: code: 0 data: payment: id: 1XbTb trade_no: '20250612141601003370839825' name: '123' status: created qyt: 4 price_unit: 100 price_id: CNY price_mark: ¥ price_one_unit: 100 created_at: '2025-06-12T14:16:02.794208+08:00' updated_at: '2025-06-12T14:16:02.794208+08:00' product_type: 3 request: payment_needed: true url: >- ``` -------------------------------- ### User Authentication - Prepare Passkey Registration Source: https://cloudrevev4.apifox.cn/prepare-passkey-registration-308300603e0 Prepares the system for a new passkey registration by generating the necessary options for the client-side WebAuthn API. ```APIDOC ## PUT /user/authn ### Description This endpoint prepares for the registration of a new passkey. It returns a `PublicKeyCredentialCreationOptions` object that can be used to invoke the passkey registration process directly from the browser using the WebAuthn API. ### Method PUT ### Endpoint /user/authn ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **code** (integer) - Response code. `0` indicates success. - **msg** (string) - Human-readable error message, if any. - **error** (string, nullable) - Internal error message, visible in debug mode. - **correlation_id** (string, nullable) - Correlation ID of the request, only presented on failed requests. - **data** (object) - Contains the `publicKey` object required for passkey registration. - **publicKey** (object) - A `PublicKeyCredentialCreationOptions` object used to invoke passkey registration from the browser. - **rp** (object) - Relying party information. - **name** (string) - Name of the relying party. - **id** (string) - ID of the relying party. - **user** (object) - User information. - **name** (string) - Username or email. - **displayName** (string) - Display name of the user. - **id** (string) - Unique user ID. - **challenge** (string) - A random challenge generated by the server. - **pubKeyCredParams** (array) - Supported public key credential types and algorithms. #### Response Example ```json { "code": 0, "data": { "publicKey": { "rp": { "name": "Cloudreve", "id": "localhost" }, "user": { "name": "luke@skywalker.com", "displayName": "Luke Skywalker", "id": "Ym5Vbg" }, "challenge": "TSMn9HYi5vCJasIbJYRwEgf4nHVzHU_ldZUzeySb5Uk", "pubKeyCredParams": [ { "type": "public-key", "alg": -7 }, { "type": "public-key", "alg": -35 }, { "type": "public-key", "alg": -36 }, { "type": "public-key", "alg": -257 }, { "type": "public-key", "alg": -258 }, { "type": "public-key", "alg": -259 } ] } } } ``` ``` -------------------------------- ### Delete Pin Request Body Example (YAML) Source: https://cloudrevev4.apifox.cn/delete-a-pin-306763333e0 This is an example of the request body for the 'Delete a pin' API endpoint. It includes the 'uri' of the pinned item to be removed and an optional 'name' for display. ```yaml uri: cloudreve://my/Inspirations?name=jpg&case_folding= name: My images ``` -------------------------------- ### Ping Cloudreve Instance (Shell) Source: https://cloudrevev4.apifox.cn/index This code snippet demonstrates how to ping the Cloudreve instance to get its version using a cURL command. It's a simple GET request to the /site/ping endpoint with no authentication required. The response includes the server version. ```shell curl --location --request GET '/site/ping' ``` -------------------------------- ### POST /auth/openid/prepare Source: https://cloudrevev4.apifox.cn/llms Prepares a social connector sign-in, used for signing in or linking existing accounts. Returns a URL for the user to authenticate with the social provider. ```APIDOC ## POST /auth/openid/prepare ### Description Prepare a social connector sign in. ### Method POST ### Endpoint /auth/openid/prepare ### Parameters #### Request Body - **provider** (string) - Required - The social connector provider (e.g., "google", "facebook"). - **redirect_uri** (string) - Required - The URI to redirect to after authentication. ### Request Example { "provider": "google", "redirect_uri": "https://example.com/callback" } ### Response #### Success Response (200) - **url** (string) - The URL to redirect the user to for social sign-in. - **state** (string) - An opaque state value to prevent CSRF. #### Response Example { "url": "https://accounts.google.com/o/oauth2/auth", "state": "random_state" } ``` -------------------------------- ### User Settings Configuration Source: https://cloudrevev4.apifox.cn/list-file-activities-300250878e0 This section details the configuration options for user settings, including direct link batch size and trash retention. ```APIDOC ## User Settings Configuration ### Description Allows for the configuration of user-specific settings such as the maximum number of files for direct link generation in a batch and the retention period for files in the trash bin. ### Method PUT (or equivalent for configuration update) ### Endpoint /api/settings/user ### Parameters #### Query Parameters None #### Request Body - **direct_link_batch_size** (integer) - Required - The maximum number of files allowed for users to obtain direct links in a single batch. Fill in 0 to disallow batch generation. - **trash_retention** (integer) - Required - The retention time in seconds of files in the trash bin. Files will be permanently deleted after this duration. Changing this setting does not affect files already in the trash. ### Request Example ```json { "direct_link_batch_size": 100, "trash_retention": 864000 } ``` ### Response #### Success Response (200) - **message** (string) - Indicates successful update of user settings. #### Response Example ```json { "message": "User settings updated successfully." } ``` ``` -------------------------------- ### Delete Pin Success Response Example (JSON) Source: https://cloudrevev4.apifox.cn/delete-a-pin-306763333e0 This is an example of a successful response (HTTP status code 200) from the 'Delete a pin' API endpoint. It indicates that the operation was successful with a code of 0 and an empty message. ```json { "code": 0, "msg": "" } ``` -------------------------------- ### StorageProduct Schema Source: https://cloudrevev4.apifox.cn/get-site-settings-289489676e0 Defines the structure for storage product SKUs, including their ID, name, size, duration, and pricing. ```APIDOC ## StorageProduct Schema ### Description Defines the structure for storage product SKUs, including their ID, name, size, duration, and pricing. ### Schema ```json { "id": "string", "name": "string", "size": "integer", "time": "integer", "price": "integer", "chip": "string | null", "points": "integer | null" } ``` ### Fields - **id** (string) - Required - UUID of the storage SKU. - **name** (string) - Required - Display name of the storage SKU. - **size** (integer) - Required - Contained storage in bytes. - **time** (integer) - Required - Valid duration in seconds. - **price** (integer) - Required - Price in minimum currency unit. - **chip** (string | null) - Optional - Chip text. - **points** (integer | null) - Optional - Price in points. Empty value indicates paying with points is disabled. ``` -------------------------------- ### GET /user/payments Source: https://cloudrevev4.apifox.cn/list-payments-308383051e0 Retrieves a list of user payments. Supports pagination and ordering. ```APIDOC ## GET /user/payments ### Description Retrieves a list of user payments. Supports pagination and ordering. ### Method GET ### Endpoint /user/payments ### Parameters #### Query Parameters - **page_size** (number) - Required - Page size. Minimum: 10. - **order_direction** (string) - Optional - Order direction. Allowed values: `asc`, `desc`. Defaults to `asc`. - **next_page_token** (string) - Optional - Token for requesting next page. Empty value means requesting the first page. ### Request Example ```json { "example": "No request body for GET request" } ``` ### Response #### Success Response (200) - **data.pagination.page** (integer) - Current page starting from `0`, only applied to offset pagination. - **data.pagination.page_size** (integer) - Maximum items included in one page. - **data.pagination.next_token** (string) - Token used to request the next page in cursor pagination. - **data.pagination.is_cursor** (boolean) - Whether the response is using cursor pagination. - **data.payments** (array) - List of payment objects. - **payment_object** (object) - Represents a single payment. #### Response Example ```json { "data": { "pagination": { "page": 0, "page_size": 50, "next_token": "eyJpZCI6Inh4cUR1QSJ9", "is_cursor": true }, "payments": [ { "id": "payment_id_1", "user_id": "user_id_1", "amount": 100, "currency": "USD", "status": "completed", "created_at": "2023-10-27T10:00:00Z" }, { "id": "payment_id_2", "user_id": "user_id_1", "amount": 50, "currency": "USD", "status": "pending", "created_at": "2023-10-27T11:00:00Z" } ] } } ``` ``` -------------------------------- ### Session - Prepare Login Source: https://cloudrevev4.apifox.cn/prepare-login-289512825e0 Queries if a given account exists and lists all possible login methods for it. This method is not required for signing in but provides additional context for the frontend UI. ```APIDOC ## GET /session/prepare ### Description Queries if a given account exists and lists all possible login methods for it. This method is not required for signing in but provides additional context for the frontend UI. ### Method GET ### Endpoint /session/prepare ### Parameters #### Query Parameters - **email** (string) - Required - Account email. ### Request Example ```json { "email": "example@cloudreve.org" } ``` ### Response #### Success Response (200) - **data** (object) - Response content. - **webauthn_enabled** (boolean) - Whether this account can be logged in with Passkeys. - **sso_enabled** (boolean) - Whether this account can be logged in with Logto. - **password_enabled** (boolean) - Whether this account can be logged in with password. - **qq_enabled** (boolean) - Whether this account can be logged in with Tencent QQ. - **code** (integer) - Response code. `0` - Success. - **msg** (string) - Human readable error message (if any). - **error** (string) - Internal error message, only visible in debug mode. - **correlation_id** (string) - Correlation ID of the request. Only presented on failed request. #### Response Example ```json { "data": { "webauthn_enabled": true, "sso_enabled": false, "password_enabled": true, "qq_enabled": true }, "code": 0, "msg": "" } ``` ``` -------------------------------- ### GET /api/user/storage_packs Source: https://cloudrevev4.apifox.cn/get-preferences-308319497e0 Retrieves information about the user's active storage packs. ```APIDOC ## GET /api/user/storage_packs ### Description Retrieves information about the user's active storage packs. ### Method GET ### Endpoint /api/user/storage_packs ### Response #### Success Response (200) - **storage_packs** (array) - List of active storage packs. - **name** (string) - Name of the storage pack. - **active_since** (string) - When the storage pack was activated. #### Response Example ```json { "storage_packs": [ { "name": "Unlimited Storage", "active_since": "2025-03-20T17:52:20+08:00" } ] } ``` ``` -------------------------------- ### GET /user/nodes Source: https://cloudrevev4.apifox.cn/llms Lists available nodes assigned to the authenticated user. Requires authentication. ```APIDOC ## GET /user/nodes ### Description List available nodes assigned to authenticated user. ### Method GET ### Endpoint /user/nodes ### Parameters None ### Request Example None ### Response #### Success Response (200) - **nodes** (array) - An array of available nodes. #### Response Example { "nodes": [ { "id": "node_1", "name": "Node 1", "address": "127.0.0.1" } ] } ``` -------------------------------- ### POST /user/passkey/finish Source: https://cloudrevev4.apifox.cn/llms Finishes passkey registration. ```APIDOC ## POST /user/passkey/finish ### Description Finish passkey registration. ### Method POST ### Endpoint /user/passkey/finish ### Parameters #### Request Body - **credential** (object) - Required - The Passkey credential data. ### Request Example { "credential": { "id": "credential_id", "rawId": "raw_credential_id", "response": {}, "type": "public-key" } } ### Response #### Success Response (200) - **message** (string) - A message indicating successful registration. #### Response Example { "message": "Passkey registered successfully" } ``` -------------------------------- ### User Authentication API Source: https://cloudrevev4.apifox.cn/sign-up-289517607e0 Handles user authentication, including login and email activation scenarios. ```APIDOC ## POST /api/users/login ### Description This endpoint handles user login. It may return different responses based on the authentication status and requirements, such as requiring email activation. ### Method POST ### Endpoint /api/users/login ### Parameters #### Request Body - **username** (string) - Required - The user's username. - **password** (string) - Required - The user's password. - **captcha** (string) - Optional - The user's input for graphical CAPTCHA, required if enabled. - **ticket** (string) - Optional - The ticket/token for the CAPTCHA, required if enabled. ### Request Example ```json { "username": "testuser", "password": "password123", "captcha": "z3ds", "ticket": "4qXv7KmbYajJ0yFDKcmJ" } ``` ### Response #### Success Response (200) - **code** (integer) - Response code. `0` indicates success. - **msg** (string) - Human readable error message (if any). - **data** (string) - The response data, typically a session token or user information. #### Email Activation Required Response (203) - **code** (integer) - Response code `203` indicates email activation is required. - **msg** (string) - Message indicating that email activation is required to complete sign-in. #### Response Example (Success) ```json { "code": 0, "msg": "Login successful", "data": "your_session_token" } ``` #### Response Example (Email Activation Required) ```json { "code": 203, "msg": "Email activation required to complete sign-in." } ``` ```