Back to top
Vastuu Group

Insomnia Workspace

Version: 2.1
Last updated: Oct. 15, 2020
|
Reading time: 9 min

Features

  • Try out all Platform of Trust V1 core APIs in Sandbox
  • Creating demo Identity Network in Sandbox with one-click
  • Testing a Data Product in Sandbox with one-click*
Insomnia-Demo-Identity Network - Identity Network.jpg

*requires installing and using this additional plugin

Step 1: Register to Platform of Trust sandbox

Sign up to Platform of Trust Sandbox via our World app .

Register to Sandbox

Step 2: Get Bearer Token

Get your Bearer token to access and use Platform of Trust APIs in Sandbox.

NOTE: Bearer token expires in 24 hours. So Make sure to get the regenerated one to continue.

Step 3: Download the Workspace

Click the button below to access the Insomnia workspace.

You can save the file or copy the URL to import the workspace to your Insomnia client.

Get Insomnia Workspace

Step 4: Download and Install Insomnia REST client

  1. Download the REST client from Insomnia's official Download page.
  2. Follow the instructions to install the Insomnia REST API client.

Step 5: Configure the Workspace

p.s. the following instructions are for macOS. You may need to follow separate instructions for Windows or other operating systems.

5.1 On macOS, from Insomnia REST client, go to Insomnia Preference -> Data -> Import Data - > From URL, paste, and save the URL.

insomnia1.png

insomnia2.png

insomnia3.png

On successful import, your REST client will contain the workspace, 2 environment and several folders containing HTTP requests to Platform of Trust APIs.

5.2 To set bearer token as the authorization header in API request bodies:

  • select Manage Environments,
  • Copy the Bearer token from your browser's developer tool
  • paste it as the value for bearer_token attribute in the Sandbox environment. Make sure to exclude the "Bearer " part from the token.
  • Click Done.

insomnia4.png

insomnia-set-bearertoken.png

5.3 From Insomnia REST client environments, select Use Sandbox.

insomnia6.png

You are ready to go!
You can try different API calls depending on what you want to achieve.

You can follow this get-started guide to use the workspace and familiarize yourself with Platform of Trust features.

Workflow using Insomnia Workspacee

Additional Plugins

Install this plugin from Platform of Trust to compute and add a X-Pot-Signature header to /broker/v1/fetch-data-product requests

Install this plugin in add custom timestamps.

Possible Actions

  • If you want to create a new Application, open Create App “template” and fill in the JSON parameters depending on your needs. Click Send button to send the request.
    Remember, group_id environment variable must also be set accordingly.
  • You can create a new Group using the specific chain request.
  • You can also create an identity network as shown in the diagram above.

IMPORTANT: In order to custom create an identity network, you need to modify the contents of the chain request to create an Identity Network. In addition, to learn about Chain request in Insomnia REST client, you also need knowledge on Template Tags and Environment Variable.

Learn about chain requests in Insomnia REST client

Additional Information

The Sandbox environment imported with the workspace contains several attributes, for example: pot_base_url, bearer_token, group_id, client_secret and app_token. pot_base_url is already set with the value https://api-sandbox.oftrust.net, which is needed to try out the APIs in the Sandbox.

Something is not working?

Identified an issue? Report it to GitHub

Rest API Workspace

Check out our public REST API workspaces in GitHub

API Documentation

Read more about Product API here

Read more about Application API here

Read more about Identity API here

Read more about Access Control List (ACL) API here

Read more about Context API here

Read more about Broker API here

Developer Guides

Read Workflow using Insomnia Workspace guide to get started.

Read about Identities and Links guide to know details on Identity Network

Insomnia REST Client

More on Insomnia REST Clients can be found here