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 |
DeleteObject | deletes a specified |
ListSchemas | returns a list of system schemas |
GetSchema | returns a list of fields associated with a specified |
HealthCheck | returns overall status |
TenantHealthCheck | returns connectivity status of |
UpdateObject | updates a specified |
UpdateObjectStatus | updates the status of a specified |
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
Name | Type | Description |
---|---|---|
ident_endpoint | string | base URL of the Ident service being configured for the tenant |
organization_id | string |
|
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
Name | Type | Description |
---|---|---|
authorization* | string | bearer <JWT> scoped for an |
Name | Type | Description |
---|---|---|
object | object | arbitrary data that holds the |
type | string | type of circuit being used; currently this should be set to |
payload | string | public and private inputs used to generate the proof; |
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
Name | Type | Description |
---|---|---|
id | string |
|
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
Name | Type | Description |
---|---|---|
id* | uuid |
|
Name | Type | Description |
---|---|---|
authorization* | string | bearer <JWT> scoped to an |
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
Name | Type | Description |
---|---|---|
id* | uuid |
|
schemaId* | string |
|
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
Name | Type | Description |
---|---|---|
id | string |
|
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
Name | Type | Description |
---|---|---|
id* | string |
|
Name | Type | Description |
---|---|---|
baseline_id | string | globally-unique UUID used to map the record to the |
object | object | arbitrary data that holds the |
proof | string | cryptographic |
type | string | type of |
witness | string | public and private inputs used to generate the |
PUT
https://baseline.provide.services/api/v1/business_objects/:id/status
Updates the status of a specified Object
Name | Type | Description |
---|---|---|
id | string | id of |