Get the content of a File
GET
/vaults/{vaultUuid}/items/{itemUuid}/files/{fileUuid}/content
const url = 'http://1password.local/vaults/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/items/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/files/example/content';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://1password.local/vaults/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/items/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/files/example/content \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” vaultUuid
required
string format: uuid
The UUID of the Vault the item is in
itemUuid
required
string format: uuid
The UUID of the Item the File is in
fileUuid
required
string
UUID of the file to get content from
Responses
Section titled “ Responses ”Success
string format: binary
Headers
Section titled “Headers ” Content-Disposition
string
Example
attachment; filename="privkey.pem" Content-Length
string
Example
6432Invalid or missing token
object
message
A message detailing the error
string
status
HTTP Status Code
integer
Example
{ "message": "Invalid token signature", "status": 401}File not found
object
message
A message detailing the error
string
status
HTTP Status Code
integer
Examples
File not found
{ "message": "file {fileUuid} not found", "status": 404}Item not found
{ "message": "item {itemUuid} not found", "status": 404}Vault not found
{ "message": "vault {vaultUuid} not found", "status": 404}