BLOBs API

Create a BLOB

https://d33wubrfki0l68.cloudfront.net/8513b318bb356a4044b0b241683868db1da61329/895a1/_images/plans-available-standard-plus.png
POST /v1/vaults/(string: vault_id)/blobs

Uploads a new BLOB. Each BLOB is limited to 52,428,800 bytes (50 MB) in size.

The request should be a form multipart upload. Both file and owner_id are individual parts.

Parameters:
  • vault_id – string(req’d)
Form Parameters:
 
  • file – string(req’d) - a part whose name is file and whose content is the blob data. If a filename is specified in the part, it must be 255 characters or less.
  • owner_id – string(optional) - A part whose name is owner_id and whose content is the user id that owns the newly created BLOB. If null or omitted, the newly created BLOB will be ownerless.
Request Headers:
 
Status Codes:

Example Request

curl https://api.truevault.com/v1/vaults/00000000-0000-0000-0000-000000000000/blobs \\
    -X POST \\
    -u [API_KEY | ACCESS_TOKEN]: \\
    --form "file=@xray.pdf" \\
    --form "owner_id=00000000-0000-0000-0000-000000000000" \\
    -H "Content-Type:multipart/form-data"

Example Response

{
    "blob_filename": "xray.pdf",
    "blob_id": "00000000-0000-0000-0000-000000000000",
    "blob_size": "5340",
    "result": "success",
    "owner_id": "00000000-0000-0000-0000-000000000000",
    "transaction_id": "00000000-0000-0000-0000-000000000000"
}

Read a BLOB

https://d33wubrfki0l68.cloudfront.net/8513b318bb356a4044b0b241683868db1da61329/895a1/_images/plans-available-standard-plus.png
GET /v1/vaults/(string: vault_id)/blobs/(string: blob_id)

Downloads a BLOB. Returns the raw BLOB Binary data.

Parameters:
  • vault_id – string(req’d)
  • blob_id – string(req’d)
Request Headers:
 
Status Codes:

Example Request

curl https://api.truevault.com/v1/vaults/00000000-0000-0000-0000-000000000000/blobs/00000000-0000-0000-0000-000000000000 \\
    -X GET \\
    -u [API_KEY | ACCESS_TOKEN]:

List all BLOBs

https://d33wubrfki0l68.cloudfront.net/8513b318bb356a4044b0b241683868db1da61329/895a1/_images/plans-available-standard-plus.png
GET /v1/vaults/(string: vault_id)/blobs

List all BLOBs in the specified Vault.

Parameters:
  • vault_id – string(req’d)
Query Parameters:
 
  • page – int(optional, default: 1) - page number in paginated response
  • per_page – int(optional, default: 100) - results per page in paginated response
Request Headers:
 
Status Codes:

Example Request

curl https://api.truevault.com/v1/vaults/00000000-0000-0000-0000-000000000000/blobs?page=3&per_page=15 \\
    -X GET \\
    -u [API_KEY | ACCESS_TOKEN]:

Example Response

{
    "data": {
        "items": [
            {
                "id": "00000000-0000-0000-0000-000000000000",
                "metadata_document_id": null,
                "mime_type": "application/octet-stream",
                "name": "xray.pdf",
                "size": "5340",
                "vault_id": "00000000-0000-0000-0000-000000000000",
                "owner_id": "00000000-0000-0000-0000-000000000000"
            }
        ],
        "page": 1,
        "per_page": 100,
        "total": 1
    },
    "result": "success",
    "transaction_id": "00000000-0000-0000-0000-000000000000"
}

Update a BLOB

https://d33wubrfki0l68.cloudfront.net/8513b318bb356a4044b0b241683868db1da61329/895a1/_images/plans-available-standard-plus.png
PUT /v1/vaults/(string: vault_id)/blobs/(string: blob_id)

Updates (replaces) a BLOB. Each BLOB is limited to 52,428,80 bytes (50 MB) in size.

Parameters:
  • vault_id – string(req’d)
  • blob_id – string(req’d)

The request should be a form multipart upload. Both file and owner_id are individual parts.

Form Parameters:
 
  • file – string(req’d) - a part whose name is file and whose content is the blob data. If a filename is specified in the part, it must be 255 characters or less.
  • owner_id – string(optional) - a part whose content is the user id that the BLOB will be owned by. If no owner_id is provided, then the BLOB will stay owned by its existing owner. If null, then the BLOB will become ownerless.
Request Headers:
 
Status Codes:

Example Request

curl https://api.truevault.com/v1/vaults/00000000-0000-0000-0000-000000000000/blobs/00000000-0000-0000-0000-000000000000 \\
    -X PUT \\
    -u [API_KEY | ACCESS_TOKEN]: \\
    --form "file=@new_xray.pdf" \\
    --form "owner_id=00000000-0000-0000-0000-000000000000" \\
    -H "Content-Type:multipart/form-data"

Example Response

{
    "blob_filename": "new_xray.py",
    "blob_id": "00000000-0000-0000-0000-000000000000",
    "blob_size": "5340",
    "owner_id": "00000000-0000-0000-0000-000000000000",
    "result": "success",
    "transaction_id": "00000000-0000-0000-0000-000000000000"
}

Update a BLOB’s Owner

https://d33wubrfki0l68.cloudfront.net/8513b318bb356a4044b0b241683868db1da61329/895a1/_images/plans-available-standard-plus.png
PUT /v1/vaults/(string: vault_id)/blobs/(string: blob_id)/owner

Updates only the owner_id for a BLOB having blob_id. This can be used to update the owner of a BLOB if changes to the BLOB content are undesirable. If changes to the BLOB content are desired, see the Update Blob operation.

Parameters:
  • vault_id – string(req’d)
  • blob_id – string(req’d)
Form Parameters:
 
  • owner_id – string(req’d) - the new``owner_id`` of the user the BLOB will be owned by. If '', then the BLOB will become ownerless. Note: that owner_id cannot be omitted, it must be provided with a blank value to remove the owner.
Request Headers:
 
Status Codes:

Example Request

curl https://api.truevault.com/v1/vaults/00000000-0000-0000-0000-000000000000/blobs/00000000-0000-0000-0000-000000000000/owner \\
    -X PUT \\
    -u [API_KEY | ACCESS_TOKEN]: \\
    --form "owner_id=00000000-0000-0000-0000-000000000000"

Example of removing the owner:

curl https://api.truevault.com/v1/vaults/00000000-0000-0000-0000-000000000000/blobs/00000000-0000-0000-0000-000000000000/owner \\
    -X PUT \\
    -u [API_KEY | ACCESS_TOKEN]: \\
    --form "owner_id="

Example Response

{
    "blob_id": "00000000-0000-0000-0000-000000000000",
    "owner_id": "00000000-0000-0000-0000-000000000000",
    "result": "success",
    "transaction_id": "00000000-0000-0000-0000-000000000000"
}

Delete a BLOB

https://d33wubrfki0l68.cloudfront.net/8513b318bb356a4044b0b241683868db1da61329/895a1/_images/plans-available-standard-plus.png
DELETE /v1/vaults/(string: vault_id)/blobs/(string: blob_id)

Deletes the specified BLOB from the Vault.

Parameters:
  • vault_id – string(req’d)
Request Headers:
 
Status Codes:

Example Request

curl https://api.truevault.com/v1/vaults/00000000-0000-0000-0000-000000000000/blobs \\
    -X DELETE \\
    -u [API_KEY | ACCESS_TOKEN]:

Example Response

{
    "blob_id": "00000000-0000-0000-0000-000000000000",
    "result": "success",
    "transaction_id": "00000000-0000-0000-0000-000000000000"
}