Middleware
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 |
Configuring Tenants
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:
Configure Tenants
POST
https://example.sor.local/tenants
Initializes a connection with middleware; URL will vary based on system of record implementation
Request Body
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 |
Creating an Object
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.
Create Object
POST
https://baseline.provide.servicesapi/v1/protocol_messages
Creates a baseline Object
Headers
Name | Type | Description |
---|---|---|
authorization* | string | bearer <JWT> scoped for an |
Request Body
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 |
Deleting a Tenant Configuration
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 Middleware Configuration
DELETE
https://example.sor.local/tenants/:id
Deletes a specified proxy configuration
Path Parameters
Name | Type | Description |
---|---|---|
id | string |
|
Listing the Schemas
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.
Fetch Schemas
GET
https://example.sor.local/schemas
Returns a list of schemas within the authorized scope
Path Parameters
Name | Type | Description |
---|---|---|
id* | uuid |
|
Headers
Name | Type | Description |
---|---|---|
authorization* | string | bearer <JWT> scoped to an |
Get Schema
Once a Schema
has been identified, the contained Field
list can be retrieved by including the Type
in the URL of the request.
Get Schema Fields
GET
https://example.sor.local/schemas/:schemaId
Returns a list of fields for a specified Schema
in a specified Workgroup
Path Parameters
Name | Type | Description |
---|---|---|
id* | uuid |
|
schemaId* | string |
|
Health Check
Request to verify that the system of record is online
Health Check - SOR
GET
https://baseline.provide.services/api/v1/status
Checks the health of the system of record
Path Parameters
Name | Type | Description |
---|---|---|
id | string |
|
Tenant Health Check
Request to verify that the system of record can communicate with the tenant
Health Check - Middleware
GET
https://example.sor.local/status
Verifies that a system of record can communicate with the middleware
Updating an Object
When updating an object, the baseline_id
must be relayed with each request. The functions the middleware integration support are as follows:
Update Object
PUT
https://baseline.provide.services/api/v1/objects/:id
Updates a specified Object
Path Parameters
Name | Type | Description |
---|---|---|
id* | string |
|
Request Body
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 |
Updating an Object Status
Update Object Status
PUT
https://baseline.provide.services/api/v1/business_objects/:id/status
Updates the status of a specified Object
Path Parameters
Name | Type | Description |
---|---|---|
id | string | id of |
Last updated