Middleware
Last updated
Last updated
In order to baseline data from a system of record, an interface must be created to interact with Provide Baseline. The integration interface serves as a bi-directional implementation layer that enables seamless interaction between the system of record and PRVD stack.
In order to successfully interact with Provide Baseline, the integration interface must support the following functions:
ConfigureTenant
sets the organization parameters for baselining a record
CreateObject
creates an object
DeleteObject
deletes a specified object
ListSchemas
returns a list of system schemas
GetSchema
returns a list of fields associated with a specified Schema
HealthCheck
returns overall status
TenantHealthCheck
returns connectivity status of Tenant
UpdateObject
updates a specified object
UpdateObjectStatus
updates the status of a specified object
First, you'll need to configure the tenant with information about the middleware to facilitate a connection. The model that the system of record must ingest is contained in the request below:
POST
https://example.sor.local/tenants
Initializes a connection with middleware; URL will vary based on system of record implementation
ident_endpoint
string
base URL of the Ident service being configured for the tenant
organization_id
string
id
of the organization being configured for the tenant
bpi_endpoint
string
base URL of the middleware being configured for the tenant
refresh_token
string
long-lived bearer token used to authorize access tokens for use with middleware
A Baseline Object
is arbitrary data containing the ProtocolMessage
. The integration middleware will need to pass this object in accordance with the domain model as agreed upon by the counter-parties and enforced by a prover. The middleware will ingest the ProtocolMessage
, return a BaselineRecord
, and output a ProtocolMessage
to participant middlewares.
POST
https://baseline.provide.servicesapi/v1/protocol_messages
Creates a baseline Object
authorization*
string
bearer <JWT> scoped for an Organization
object
object
arbitrary data that holds the ProtocolMessagePayload
type
string
type of circuit being used; currently this should be set to general_consistency
payload
string
public and private inputs used to generate the proof; payload
can be delivered as a JSON object or chunked and streamed.
id
string
arbitrary identifier intended for use by external systems of record
In the DevOps lifecycle, it may become necessary to delete a configured middleware on behalf of a tenant. In these cases, the system of record will need to stop sending requests to the middleware associated with the specified organization_id
.
DELETE
https://example.sor.local/tenants/:id
Deletes a specified proxy configuration
id
string
id
of Organization
related to middleware requiring deletion
Because the payload
contained within the object
supports arbitrary data, it may be necessary to query the stack to retrieve the schema of the object model being used.
GET
https://example.sor.local/schemas
Returns a list of schemas within the authorized scope
id*
uuid
id
of Workgroup
for which Schema
list is desired
authorization*
string
bearer <JWT> scoped to an Organization
Once a Schema
has been identified, the contained Field
list can be retrieved by including the Type
in the URL of the request.
GET
https://example.sor.local/schemas/:schemaId
Returns a list of fields for a specified Schema
in a specified Workgroup
id*
uuid
id
of Workgroup
in which the desired Schema
is associated
schemaId*
string
id
of Schema
for which fields are desired
Request to verify that the system of record is online
GET
https://baseline.provide.services/api/v1/status
Checks the health of the system of record
id
string
id
of organization related to the middleware
Request to verify that the system of record can communicate with the tenant
GET
https://example.sor.local/status
Verifies that a system of record can communicate with the middleware
When updating an object, the baseline_id
must be relayed with each request. The functions the middleware integration support are as follows:
PUT
https://baseline.provide.services/api/v1/objects/:id
Updates a specified Object
id*
string
id
of object to be updated
baseline_id
string
globally-unique UUID used to map the record to the BaselineContext
object
object
arbitrary data that holds the ProtocolMessagePayload
proof
string
cryptographic proof
from a Prover
type
string
type of Prover
being used; currently this should be set to general_consistency
witness
string
public and private inputs used to generate the Proof
. Payload can be delivered as a JSON object or chunked and streamed
PUT
https://baseline.provide.services/api/v1/business_objects/:id/status
Updates the status of a specified Object
id
string
id of Object
to be updated