文档API 参考

Rust · 0.1.0

Create Memo View

POST /api/v1/users/{user}/views

UserService · UserService_CreateMemoView

基于协议生成的参考。授权与实例策略仍然生效。结构描述继承自 MIT 许可的应用接口定义;本站不会向真实服务执行示例。

访问权限

仅限所有者:路径中的用户必须是已认证调用者;实例管理员身份不允许在此代替其他账号操作。

视图保存的是筛选条件

保存视图需要非空 title 和有效、非空的 ListMemos filter。它不会复制匹配笔记或授予其访问权限。CreateMemoView 支持 validateOnly;UpdateMemoView 支持 title、filter 和 icon 掩码。掩码包含 icon 而请求体省略该值时重置图标。

请求

CreateMemoView creates a new memo view for a user.

POST/api/v1/users/{user}/views

参数

名称 / 位置类型 / 是否必需描述
user
path
string
必需
The user id.
validateOnly
query
boolean
OpenAPI 未标记为必需
Optional. If set, validate the request, but do not actually create the memo view.

请求体

必需

application/json · MemoView

响应

200 · OK

application/json · MemoView

default · Default error response

application/json · Status

完整操作定义

下方保留全部已声明约束、媒体类型和响应细节。结构引用链接到完整定义。

展开 JSON 定义
{
  "tags": [
    "UserService"
  ],
  "description": "CreateMemoView creates a new memo view for a user.",
  "operationId": "UserService_CreateMemoView",
  "parameters": [
    {
      "name": "user",
      "in": "path",
      "description": "The user id.",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "name": "validateOnly",
      "in": "query",
      "description": "Optional. If set, validate the request, but do not actually create the memo view.",
      "schema": {
        "type": "boolean"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/MemoView"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/MemoView"
          }
        }
      }
    },
    "default": {
      "description": "Default error response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Status"
          }
        }
      }
    }
  }
}