MemoService · MemoService_CreateMemoShare
基于协议生成的参考。授权与实例策略仍然生效。结构描述继承自 MIT 许可的应用接口定义;本站不会向真实服务执行示例。
访问权限
需要笔记作者或实例管理员。更新与分享管理还会检查适用的空间归属;空间成员资格本身不会赋予他人笔记的所有者权限。
分享是一项访问授权
只有 NORMAL 且非 SPACE 的笔记能创建分享。如果提供 expireTime,必须是有效的未来时间戳。返回分享 name 的末尾片段就是 GetSharedMemo 使用的不透明令牌。公开令牌会授予无需登录的笔记读取权限,但不会授予关系图访问权限。
请求
CreateMemoShare creates a share link for a memo. Requires the memo creator or an instance administrator.
POST
/api/v1/memos/{memo}/shares参数
| 名称 / 位置 | 类型 / 是否必需 | 描述 |
|---|---|---|
memopath | string 必需 | The memo id. |
请求体
必需
application/json · MemoShare
响应
200 · OK
application/json · MemoShare
default · Default error response
application/json · Status
完整操作定义
下方保留全部已声明约束、媒体类型和响应细节。结构引用链接到完整定义。
展开 JSON 定义
{
"tags": [
"MemoService"
],
"description": "CreateMemoShare creates a share link for a memo. Requires the memo creator or an instance administrator.",
"operationId": "MemoService_CreateMemoShare",
"parameters": [
{
"name": "memo",
"in": "path",
"description": "The memo id.",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MemoShare"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MemoShare"
}
}
}
},
"default": {
"description": "Default error response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
}
}
}
}
}
}