Back to top
Vastuu Group

Generate Harmonized Data

Version: 1.0
Last updated: Feb. 18, 2021
|
Reading time: 6 min

Overview


The Broker API provides means to connect a service to a translator that will return desired data from different sources. The data broker does not mangle the data in any way, it only functions as a proxy between services and translators.

Capabilities

  • Allows requesting data from an external service defined by the data product, and product code
  • Validates the signature of the payload
  • Relays the verified request to the translator registered to the data product.


You need to be logged in into Platform of Trust Sandbox and get your bearer token to execute the following cURL requests.

POST request to fetch data product

curl -i -X POST \
   --url "https://api-sandbox.oftrust.net/broker/v1/fetch-data-product" \
   --header "X-Pot-Signature: Ioma1gqOVFUBrXiziWS....CLqBG4vFozG3YgzPzillNip0=" \
   --header "X-App-Token: eyJ0eXAiOiJJV1QiLcJhbgciOiJSUzI1NiJ9.eyJzY29w...VXs5fff" \
   --header "X-User-Token: eyJ0eXAIOijKV1QiLcJGbGciOiJSUzI1NiJ9.eyJzY29w...DVs5aaf" \
   --header "Content-Type: application/json" \
   --data \
"{
      \"@context\": \"https://standards.oftrust.net/v2/Context/DataProductParameters/Sensor\",
      \"timestamp\": \"2018-11-01T12:00:00+00:00\",
      \"productCode\": \"product-1\",
      \"parameters\": {
          \"param-1\": \"Value\",
          \"param-2\": \"Value\"
      }
}"

NOTE: checkout doc.oftrust.net to see required parameter descriptions for constructing requests to the Broker API and code samples in Java, Python and JavaScript.


API Specification

Download Open API Specification (OAS) for Broker here

Download RESTful API Modeling Language (RAML) specifications for Broker here

API Documentation

Check API endpoint, HTTP calls and associated parameters in details at docs.oftrust.net

Developer Guides

Read on how to get your Bearer Token to start accessing and using Platform of Trust APIs in this Guide

Read about Broker API use-cases in our Data Product 101 guide

Read on how to use Broker API to to fetch a Data Product in our Consume Data Products guide

Read about interactions between Broker API and Translator in our Setup Translator guide.

Profiles in Other Platforms

ProgrammableWeb

Questions and Feedback

Have a question on Broker API? Shoot it in Platform of Trust Stack Overflow community page.

Did Broker API miss some feature? Make a Wish in GitHub.

Did we miss something? Make a Wish!

Tell us in Github

See all APIs