Skip to main content

Store Object

Encrypt and store any object represented as a Protocol Buffer

Description

Used to encrypt and store objects in the object store. See Encrypted Object Store for additional information.

Objects must be passed as a JSON representation of a Google Protocol Buffer message. The message will be parsed, then stored.

info

See API Key and Permissioning Others sections for more detail on which keys are used for encryption.

Usage

URL: https://{host}/api/v1/eos

Method: POST

Headers:

info

Supply one x-uuid header when running locally.

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

Request Body:

{
"objectStoreAddress": "",
"permissions": {
"audiences": [],
"permissionDart": true,
"permissionPortfolioManager": true,
},
"message": {}
"type": ""
}
FieldDescriptionData Type
objectStoreAddressThe URL to the encrypted object store to run againstString
permissionsObject containing PermissionInfo (See Permissioning Others)JSON
messageThe asset that is stored against the EOS. This can be any JSON formatted Google Protocol Buffer that matches the type provided in this requestJSON
typeThe fully qualified type url matching the Protocol Buffer provided as JSON in the messageString

Response Status Codes:

CodeMeaning
200File accepted and stored
400Illegal arguments
500Server error

Response Body:

{
"hash": "string",
"uri": "string",
"bucket": "string",
"name": "string"
}
FieldDescriptionData Type
hashThe returned hash of the saved object in EOSString
uriThe location of the saved objectString
bucketThe volume path of the saved dataString
nameThe name of the saved dataString

Example

Sample Request

The following example stores a LoanState object, representing the current state of an outstanding loan.

curl --location --request POST 'localhost:8080/p8e-cee-api/external/api/v1/eos' \
--header 'x-uuid: deadbeef-face-479b-860c-facefaceface' \
--header 'Content-Type: application/json' \
--data-raw '{
"objectStoreAddress": "grpc://localhost:5001",
"permissions": {
"permissionDart": true,
"permissionPortfolioManager": true
},
"message": {
"id": {
"value": "65baf01d-ee8b-4ad2-b646-cffe26640df3"
},
"effectiveTime": "2022-05-22T00:00:00.000Z",
"servicerName": "Servicer One",
"totalUnpaidPrinBal": {
"amount": 250000.00,
"currency": "USD"
},
"accruedInterest": {
"amount": 50.00,
"currency": "USD"
},
"dailyIntAmount": {
"amount": 5.00,
"currency": "USD"
},
"loanStatus": {
"status": "IN REPAY",
"effectiveTime": "2022-05-22T00:00:00.000Z"
}
},
"type": "tech.figure.servicing.v1beta1.LoanStateOuterClass$LoanState"
}'

Sample Response

{
"hash": "o0iERVQp7v7WdSkq8dlREr+yP8kEuAHvBMmprazYr0k=",
"uri": "object://localhost:8080/o0iERVQp7v7WdSkq8dlREr+yP8kEuAHvBMmprazYr0k=",
"bucket": "/mnt/data",
"name": "NOT_STORAGE_BACKED"
}