Tags: Data Product
, V1 APIs
, Connector
, Harmonized Data
Platform of Trust harmonizes incompatible data coming from various sources, enabling it to be merged and utilized. Users can request and use this data by requesting data products.
Defines both data content and the business elements of real-world entities in a machine-readable format. Data product defines how to query harmonized data from the relevant data source via the means of Platform of Trust Broker API.
Data Product
3rd party developers always use Broker API to access data product data. For more information, visit developer portal API profile to learn about Broker API. Or read more about /broker/v1/fetch-data-product
in API documentation.
Note: We expect the raw data provider to have a beta API environment which can be used in the Platform of Trust environment. The beta API is used for testing the data product before launch.
An integration component that enables the Platform to pull and harmonize data from external sources.
Connector
Main connector functions:
Note: Keep in mind, Version 1.0 of Platform of Trust APIs has been used in this demonstration.
You need to be familiar with the ontology to harmonize your source data fields to standard formats used in Platform of Trust . With a harmonized ontology and semantics we can be sure that everyone understands the content in a similar way. You can also learn about our harmonized data model from our Ontology Viewer.
First you need to find out what data is available in the source system. On top of that you need to have a reason why it is published. You can checkout currently supported Data Source Integrations in Platform of Trust here.
If you act on behalf of another company and your task is to setup technical facilities for the data product, discuss with your client.
The 3rd party developers will access the data via the Platform of Trust Data Broker API, which forwards the request to the connector component that continues processing the request and responses accordingly. The beta API is also expected to stay available after the data product has been created since 3rd party developers will continue to use it via Data Broker API while developing applications instead of calling your production API.
To get started, you need to create a user on Platform of Trust. You can do it by simply signing up on Login Portal. In order to able to perform authorized API requests to Platform of Trust, you need to get a Bearer token first.
A connector transforms the local data model and attributes to match the Platform of Trust ontology
To access the data behind a connector, the 3rd party developers request data through the Data Broker API, which forwards the request to the connector.
The Platform of Trust Data Broker API does not store or cache the data anywhere. Each request is always relayed as is, with extra security added in signed payload headers. The request data or response data is never mangled in any way in the Data Broker API.
Read more about how to setup your own connector
You can work with our Multi-connector which is now actively being developed with new features added frequently. This connector provides a huge starting point for those who want to develop connectors. Basically, building a connector, in most cases, only involves writing a few configuration files.
You can also fork any of the public connectors repositories available in our GitHub organization. A few of our connectors are:
You need to deploy the code yourself, e.g. use your own server or a cloud provider. So this would require more work from you.
The third popular option is the use of Connector Engine service in Platform of Trust. We have a list of dedicated partners who are willing to implement customized connectors tailored to your needs. Contact us for more information about this with the message "Require a Connector".
You can register the data product with our Product API V1. The documentation always points to the sandbox APIs, which means that you should first test against that. To learn more about Product API, visit the API profile in the Developer Portal.
You can directly test Product API live from the Developer Portal. On running the following snippet, you can get a list of Data Products available in the Sandbox environment
Here's an example of how you would register a data product with the Product API in Platform of Trust. Besides Bearer token
, you will also need groupId
parameter. Read more about how to create your own group
Request: POST /products/v1
curl -X POST https://api-sandbox.oftrust.net/products/v1 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzY29w...DVs5aaf" \
-d '{
"dataContext": "https://standards.oftrust.net/v2/Context/DataProductOutput/?v=2.0",
"parameterContext": "https://standards.oftrust.net/v2/Context/DataProductParameters/?v=2.0",
"productCode": "example-product-1",
"name": "Example product",
"groupId": "25d5c931-7479-45a6-b7fb-f66bc795345d",
"translatorUrl": "https://example.com/translator/url",
"organizationPublicKeys": [
{
"url": "https://example.com/example.pub",
"type": "RsaSignature2018"
}
]
}'
Response: Ok
Status: 201 Created
Body:
{
"@context": "https://standards.oftrust.net/v2/Context/Identity/Product/DataProduct/",
"@type": "DataProduct",
"@id": "https://api-sandbox.oftrust.net/products/v1/example-product-1",
"productCode": "example-product-1",
"dataContext": "https://standards.oftrust.net/v2/Context/DataProductOutput/?v=2.0",
"parameterContext": "https://standards.oftrust.net/v2/Context/DataProductParameters/?v=2.0",
"translatorUrl": "https://example.com/translator/url",
"name": "Example product",
"organizationPublicKeys": [
{
"type": "RsaSignature2018",
"url": "https://example.com/example.pub"
}
],
"description": null,
"imageUrl": null,
"identityId": "5d58025b-3764-4f3d-8d09-5e17b064f0f9"
}
Read more about /products/v1
request in Product API documentation.
In order to test your new data product, you need to make a request to the Data Broker API. Read more about how to construct a valid request.
Request: POST /broker/v1/fetch-data-product
curl --request POST \
--url https://api-sandbox.oftrust.net/broker/v1/fetch-data-product \
--header 'content-type: application/json' \
--header 'x-app-token: eyJ…FY' \
--header 'x-pot-signature: MYZlyZR+V5+auLqMMXCUnvaVHfD2wvSujFreOrMrASw=' \
--data '{
"timestamp": "2019-10-25T00:00:00.000Z",
"productCode": "example-product-1",
"parameters": {
"example1": "example2"
}
}'
Response: Ok
Status: 200 OK
Body:
{
"@context": "https://standards.oftrust.net/v2/Context/Identity/Product/DataProduct/",
"data": {
"@context": "https://standards.oftrust.net/v2/Context/Identity/Product/DataProduct/",
"@type": "DataProduct",
"items": [
{
"id": "example1",
"data": [
{
"example1": "example2",
"example2": 1234
},
]
}
]
},
"signature": {
"type": "RsaSignature2018",
"created": "2019-10-25T00:00:05.000Z",
"creator": "https://example.com/example.pub",
"signatureValue": "OaSx5PCjG/yYFdXvguUx...vtjEOqctQDqs0uPFpEKL0E0L4="
}
}
Read more about /broker/v1/fetch-data-product
request in Data Broker API
Configure your data product and connector to work with real data. And, make the same API calls but point all requests to Platform of Trust production servers https://api.oftrust.net instead of https://api-sandbox.oftrust.net
If you are an application developer, it might be a good idea to read the Application Development Guide first.
Identities are fundamental features of the platform, take a look at the Identities and Links
Open sandbox is your friend! Isolated environment for testing applications and data product integrations, read more from Open Platform of Trust Sandbox