1Password API
  1. Files
1Password API
  • auth
    • Performs introspection of the provided Bearer JWT token
      GET
  • api-v1
    • Retrieves item usages
      POST
    • Retrieves sign-in attempts
      POST
  • Activity
    • Retrieve a list of API Requests that have been made.
      GET
  • Vaults
    • Get all Vaults
      GET
    • Get Vault details and metadata
      GET
  • Items
    • Get all items for inside a Vault
      GET
    • Create a new Item
      POST
    • Get the details of an Item
      GET
    • Update an Item
      PUT
    • Delete an Item
      DELETE
    • Update a subset of Item attributes
      PATCH
  • Files
    • Get all the files inside an Item
      GET
    • Get the content of a File
      GET
    • Get the details of a File
      GET
  • Health
    • Ping the server for liveness
      GET
    • Get state of the server and its dependencies.
      GET
  • Metrics
    • Query server for exposed Prometheus metrics
      GET
  1. Files

Get the details of a File

GET
/vaults/{vaultUuid}/items/{itemUuid}/files/{fileUuid}
Files
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'http://localhost:8080/v1/vaults//items//files/'
响应示例响应示例
200 - 示例 1
{
  "id": "6r65pjq33banznomn7q22sj44e",
  "name": "foo.txt",
  "size": 35,
  "content_path": "v1/vaults/ionaiwtdvgclrixbt6ztpqcxnq/items/p7eflcy7f5mk7vg6zrzf5rjjyu/files/6r65pjq33banznomn7q22sj44e/content",
  "content": "VGhlIGZ1dHVyZSBiZWxvbmdzIHRvIHRoZSBjdXJpb3VzLgo="
}

请求参数

Path 参数
vaultUuid
string <uuid>
必需
The UUID of the Vault to fetch Item from
itemUuid
string <uuid>
必需
The UUID of the Item to fetch File from
fileUuid
string <uuid>
必需
The UUID of the File to fetch
Query 参数
inline_files
boolean 
可选
Tells server to return the base64-encoded file contents in the response.
示例值:
true

返回响应

🟢200成功
application/json
OK
Body
id
string 
可选
ID of the file
name
string 
可选
Name of the file
size
integer 
可选
Size in bytes of the file
content_path
string 
只读可选
Path of the Connect API that can be used to download the contents of this file.
content
string <byte>
可选

Base64-encoded contents of the file. Only set if size <= OP_MAX_INLINE_FILE_SIZE_KB kb and inline_files is set to true.

section
object 
可选
For files that are in a section, this field describes the section.
id
string 
可选
🟠401没有权限
🟠403禁止访问
🟠404记录不存在
🟠413413

【1Password】API开发者 微信交流群

用微信扫右侧二维码,加入【1Password】API开发者 交流群,互助沟通

扫码加入交流群
上一页
Get the content of a File
下一页
Ping the server for liveness
Built with