文档API 参考

Rust · 0.1.0

Get Attachment

GET /api/v1/attachments/{attachment}

AttachmentService · AttachmentService_GetAttachment

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

访问权限

调用者必须有权读取资源。匿名访问取决于实例公开策略和笔记可见性。未关联附件需要其所有者或实例管理员权限。知道资源名不等于获得访问权限。

请求

GetAttachment returns an attachment by name.

GET/api/v1/attachments/{attachment}

参数

名称 / 位置类型 / 是否必需描述
attachment
path
string
必需
The attachment id.

请求体

未声明请求体。

响应

200 · OK

application/json · Attachment

default · Default error response

application/json · Status

完整操作定义

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

展开 JSON 定义
{
  "tags": [
    "AttachmentService"
  ],
  "description": "GetAttachment returns an attachment by name.",
  "operationId": "AttachmentService_GetAttachment",
  "parameters": [
    {
      "name": "attachment",
      "in": "path",
      "description": "The attachment id.",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Attachment"
          }
        }
      }
    },
    "default": {
      "description": "Default error response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Status"
          }
        }
      }
    }
  }
}