This Banner is For Sale !!
Get your ad here for a week in 20$ only and get upto 15k traffic Daily!!!

Interact with ADT using Postman


ADT: Azure Digital Twins

Postman is a REST testing instrument that gives key HTTP request functionalities in a desktop and plugin-based GUI. You may craft HTTP requests and submit them to the Azure Digital Twins (ADT) REST APIs.

This weblog describes the right way to configure the Postman REST consumer to work together with the ADT APIs (making a request assortment).



Conditions



Desk of content material

Utilizing Azure CLI
Utilizing Postman
Create your individual ADT assortment
Add a person request
Set request particulars



Getting Began



Utilizing Azure CLI

Image description

1. Run the next command to entry Azure credentials:

az login
Enter fullscreen mode

Exit fullscreen mode

2. Run the next command to get a bearer token with entry to the ADT service.

utilizing knowledge aircraft APIs:

az account get-access-token --resource 0b07f429-9f4b-4714-9392-cc5e8e80c8b0
Enter fullscreen mode

Exit fullscreen mode

utilizing management aircraft APIs:

az account get-access-token --resource https://administration.azure.com/
Enter fullscreen mode

Exit fullscreen mode

outcome instance:
"accessToken": "eyJ0eXAiOiJ..."
"expiresOn": "2022-07-2...",
"subscription": "907b0d06-a...",
"tenant": "24ab6cd0-487e-...",
"tokenType": "Bearer"

Save the worth of the accessToken and we are going to use it in a while.



Utilizing Postman

We will both create our personal assortment of ADT APIs or import an existing one. This text might be speaking about creating one from scratch.



Create your individual ADT assortment

  1. In My Workspace click on new to create a brand new Assortment in Constructing Blocks. Change the gathering title if you happen to like.

  2. Within the Authorization tag, set the Kind to OAuth2.0 and paste your entry token into the Token field. Click on save.



Add a person request

  1. In My Workspace click on new to create a brand new Request in Constructing Blocks.

  2. By clicking the Save button, you possibly can title the brand new request and choose a group to put it aside. Click on save once more.

The brand new request Question twins was saved in ADT Customized Assortment listing.

Image description



Set request particulars

Change the sort from GET to POST, and paste the URL beneath:

https://digitaltwins-host-name/question?api-version=2020-10-31.
Enter fullscreen mode

Exit fullscreen mode

Utilizing your individual digital-twins-host-name

Within the Authorization tab, set the Kind to Inherit auth from guardian.

Test that the physique proven for the request within the Physique tab matches the wants described beneath:

Image description

Use ship button to ship the request.

Image description

OK! All set.



References

https://docs.microsoft.com/en-us/azure/digital-twins/how-to-use-postman?tabs=data-plane
Cowl picture from this hyperlink
https://aithority.com/computing/5-exciting-applications-of-digital-twin-technology/

The Article was Inspired from tech community site.
Contact us if this is inspired from your article and we will give you credit for it for serving the community.

This Banner is For Sale !!
Get your ad here for a week in 20$ only and get upto 10k Tech related traffic daily !!!

Leave a Reply

Your email address will not be published. Required fields are marked *

Want to Contribute to us or want to have 15k+ Audience read your Article ? Or Just want to make a strong Backlink?