Skip to main content

Retrieve Object

Retrieve and decrypt an object

Description

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

An object's hash and type must be passed such that the API can parse the fetched Protocol Buffer.

Usage

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

Method: GET

Headers:

info

Supply one x-uuid header when running locally.

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

Query Parameters:

FieldDescriptionData Type
objectStoreAddressThe URL to the encrypted object store to run againstString
hashHash of the stored objectString
typeFully qualified class associated with the Protocol Buffer that is storedString

Response Status Codes:

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

Response Body: JSON formatted Protocol Buffer

Example

Assuming you followed the example found in the Store Object Example section to store a single LoanState Protocol Buffer, and received a resulting hash of o0iERVQp7v7WdSkq8dlREr+yP8kEuAHvBMmprazYr0k=, you could fetch that object using the following request:

curl --location --request GET 'localhost:8080/p8e-cee-api/external/api/v1/eos?objectStoreAddress=grpc://localhost:5001&hash=o0iERVQp7v7WdSkq8dlREr+yP8kEuAHvBMmprazYr0k=&type=tech.figure.servicing.v1beta1.LoanStateOuterClass$LoanState' \
--header 'x-uuid: deadbeef-face-479b-860c-facefaceface'

and receive the following output:

{
"id": {
"value": "65baf01d-ee8b-4ad2-b646-cffe26640df3"
},
"effectiveTime": "2022-05-22T00:00:00Z",
"servicerName": "Servicer One",
"totalUnpaidPrinBal": {
"amount": 250000.0,
"currency": "USD"
},
"accruedInterest": {
"amount": 0.0,
"currency": "USD"
},
"dailyIntAmount": {
"amount": 5.0,
"currency": "USD"
},
"loanStatus": {
"status": "IN REPAY",
"effectiveTime": "2022-05-22T00:00:00Z"
},
"daysDelinquent": 0,
"remainingTermMonths": 0,
"autopayFlag": false,
"daysForbearance": 0,
"kv": {}
}