Hi. My name
is Katie Legan and I'm a PM intern here at Microsoft.
In this video I will walk through how to use the postman service
to make an API request to the Intelligent Recommendation Service.
Before we begin, please make sure that you watch the Quick Start guide set up video
to make an Intelligent Recommendations account with the service end point,
which we will use to serve the API requests.
Also, be sure to download the Postman Rest
API tool from the internet.
Once you have an IRA account and have downloaded Postman,
we will need to first determine which Azure Active Directory
application to call the service endpoint from.
To do this, navigate to the Azure Portal,
Open Azure Active Directory and click on app registrations.
Then click New registration
to create a new application
to make the new application,
create a name for the app and then click register.
Once the application is created,
you will see the application client ID and the directory tenant ID.
You will need this information later to authenticate the API request.
Next, we will need to update your service and points permissions
to allow the new application to use this end point.
To do this, navigate to the Azure Portal.
Click on your Intelligent Recommendations account on the left menu.
Click Endpoint Authentication.
You can then add your application
as an authorized user by pasting in your application. ID.
We found earlier
into the principal ID field
and then add the directory tenant
ID from earlier into the added tenant ID field.
Change the principal type to application
and then click save.
Now we need to configure
the authentication by creating either a secret or a certificate.
In this video, we will demonstrate how to create a secret to do this.
Return to your newly created application page in the Azure Active Directory.
Click on Certificates and Secrets, then click
Create New Secret.
Save the value of this secret as this will be used to call
the API request.
Now we are ready to make the API requests.
Start by opening up the Postman app on your computer.
Before you make the request,
we will need to fill out some information to authenticate the request.
First Click Create a
request and navigate to the authorization tab.
On the left side.
Change the type to OSS 2.0
and keep add authorization data
on request headers in the Get requests section.
At the top, you will put the request URL.
We provide a list of sample request URLs
that can be found on our docs page.
To find these URLs, navigate to the Intelligent Recommendations
Docs page and click on sample API requests from the left menu.
You will see several examples of the different requests that you can call
for this video.
We will use the popular list request as an example.
Returning to the Postman app paste in the URL.
On the right side, you will create a name for your token.
The grant type should be changed to client credentials.
Most of the rest of the needed information can be copied from our docs
on the make an authenticated API call page to find this
click on the dropdown under Quickstart and then make an authenticated API call
and scroll
down to the calling endpoint with Postman section.
The access token URL is found here.
Note that you will have to input the caller tenant ID that we copied earlier.
You can find this by returning to your application
clicking on overview
and copying this tenant ID field.
You will then paste in the access token URL.
Next we will find the client ID returning to postman.
The client ID is the application ID be copied earlier.
You can find this by returning to the application
page and copying this application ID
Return to the Postman app and paste
in the client ID.
Next we will paste in the client secret.
The client secret is the value of the client secret that we copied earlier.
You can find this by returning to your application,
clicking on certificates and secrets and copying this value paste
in the client secret.
Finally, the scope can be copied from the docs page
as it is always the same value.
Keep the client authentication as send as basic auth header.
Once the information is filled out, click get new access token
and then click use token.
Then you are ready to send the request
hit send at the top of the page.
If everything was setup correctly, the response will appear in the bottom
console under the body tab.
The items field will return a range of list items.
In this example, the most popular item is this top item here.
If you run into any errors with the service, please
go to our troubleshooting page or support page to contact our team directly.
Thank you for watching and be sure to check out the rest of the videos
in this series to learn more about intelligent recommendations.