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 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

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

NameTypeDescription

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

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

NameTypeDescription

authorization*

string

bearer <JWT> scoped for an Organization

Request Body

NameTypeDescription

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

{
  "id": "16e9755c-68bf-455f-b662-d383104cc715",
  "baseline_id": "15679071-4a5e-41e3-a495-5d93b478257b",
  "opcode": "BLINE",
  "payload": {
    "proof": "8d8f7498db7aee910428c737d8427ac4add98353f981ca70db07697a091d8c23972b55b0b20fc0eebc1ac6c2ae427d783291c7fcb2e3f7417d279fea78ce1eac2d2293e53579abbef4960a1e290bd023e2999d8ff423d01080d449ce5d14ca89c94e277e8e0bb14fb91a0b71129920ae4411e77685287611f4d2aaf66b8fc5dc",
    "type": "general_consistency",
    "witness": {}
  },
  "type": "general_consistency"
}

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

NameTypeDescription

id

string

id of Organization related to middleware requiring deletion

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

NameTypeDescription

id*

uuid

id of Workgroup for which Schema list is desired

Headers

NameTypeDescription

authorization*

string

bearer <JWT> scoped to an Organization

[
    {
        "description": "BAPI Interface: Change Exchange Rate Volatility",
        "name": "/BA1/F4_FXV_CHANGE01",
        "type": "/BA1/F4_FXV_CHANGE01"
    },
    {
        "description": "BAPI Interface: Create Exchange Rate Volatility",
        "name": "/BA1/F4_FXV_CREATE01",
        "type": "/BA1/F4_FXV_CREATE01"
    },
    {
        "description": "BAPI for Creating or Changing Exchange Rate Volatility",
        "name": "/BA1/F4_FXV_MODIFY01",
        "type": "/BA1/F4_FXV_MODIFY01"
    },
    {
        "description": "BAPI for Changing Market Data Exchange Rates",
        "name": "/BA1/F4_FX_CHANGE01",
        "type": "/BA1/F4_FX_CHANGE01"
    }
]

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

NameTypeDescription

id*

uuid

id of Workgroup in which the desired Schema is associated

schemaId*

string

id of Schema for which fields are desired

[
    {
        "fields": [
            {
                "description": "Action code for the whole EDI message",
                "name": "ACTION",
                "type": "CHAR"
            },
            {
                "description": "Flag: order acknowledgment required",
                "name": "KZABS",
                "type": "CHAR"
            },
            {
                "description": "Currency",
                "name": "CURCY",
                "type": "CHAR"
            }
        ]
    }
]

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

NameTypeDescription

id

string

id of organization related to the middleware

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

NameTypeDescription

id*

string

id of object to be updated

Request Body

NameTypeDescription

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

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

NameTypeDescription

id

string

id of Object to be updated

Last updated