In our previous posts, we created an App Service and an API Management in Azure. Let’s now use Postman to send a request to the Azure API Management endpoint.
Go to the APIM and select the API. Under Settings, copy the Base URL:
Now, in our case, we have /api/Customers to get all customers:
So our URL is https://crmdevapim.azure-api.net/api/customers.
Let’s open Postman and create this request. Click Send:
We get a response back:
Now these tests are without a subscription. Let’s try this with a Subscription:
If we rerun our Postman request, we get a 401 Access Denied – { “statusCode”: 401, “message”: “Access denied due to missing subscription key. Make sure to include subscription key when making requests to an API.” }:
In the header in Postman, we will pass the Ocp-Apim-Subscription-Key
key. To get the key value, go to the APIM Subscriptions:
Resend the request and you will get back a response:
I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.
IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.
THANK YOU, AND LET'S KEEP LEARNING TOGETHER.
CARL
Hello Carl and thanks for your simple and quick tutorial.
But how you get the Ocp-Apim-Subscription-Key value? It is “overlapped” in my APIM, and I cannot copy it.
Regards and thanks in advance for your answer.
Thank you Carl, I have just found the answer to my previous question about get the key value for subscription.
Hi Carl,
Thanks for your tutorial. Really helpful. Since you are an expert in Microsoft Dynamics 365 CRM. I would like to ask whether UiPath is the best tool to do Automation for it? What do you suggest for Automating Dynamics 365?
… [Trackback]
[…] Read More Information here on that Topic: carldesouza.com/using-postman-to-hit-an-api-management-endpoint-with-subscription/ […]