Skip to main content

Retrieve File

Retrieve and decrypt a file

Description

Used to retrieve and decrypt raw files from the object store. See Encrypted Object Store for additional information.

Usage

URL: https://{host}/p8e-cee-api/external/api/v1/eos/file

Method: GET

Headers:

info

Supply one x-uuid header when running locally.

KeyValue
Content-Typemultipart/form-data
x-uuid<Provenance Member UUID>

Form Data:

FieldDescriptionData Type
objectStoreAddressThe URL to the encrypted object store to run againstString
hashHash of the stored fileString

Response Status Codes:

CodeMeaning
200File retrieved
400Illegal/missing arguments
404File not found
500Server error

Response Body: File bytes

Example

Assuming you followed the example found in the Store File Example section to store a single file, and received a resulting hash of gE8i+JHSwPss2y6sEs41m2I1o6M+NZaPeSTEudtqosw=, you could retrieve that file with the following request:

curl --location --request GET 'localhost:8080/p8e-cee-api/external/api/v1/eos/file?objectStoreAddress=grpc://localhost:5001&hash=gE8i+JHSwPss2y6sEs41m2I1o6M+NZaPeSTEudtqosw=' \
--header 'x-uuid: deadbeef-face-479b-860c-facefaceface'
info

Swap out the hash in the example with the resulting hash from your call to store the file if it differs from the one above.