You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/api-management/api-management-sample-send-request.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,9 @@ title: Using API Management service to generate HTTP requests
3
3
description: Learn to use request and response policies in API Management to call external services from your API
4
4
services: api-management
5
5
author: dlepow
6
-
manager: erikre
7
-
ms.assetid: 4539c0fa-21ef-4b1c-a1d4-d89a38c242fa
8
6
ms.service: azure-api-management
9
7
ms.topic: article
10
-
ms.date: 04/14/2022
8
+
ms.date: 08/05/2024
11
9
ms.author: danlep
12
10
13
11
---
@@ -17,7 +15,7 @@ ms.author: danlep
17
15
18
16
The policies available in Azure API Management service can do a wide range of useful work based purely on the incoming request, the outgoing response, and basic configuration information. However, being able to interact with external services from API Management policies opens up many more opportunities.
19
17
20
-
You have previously seen how to interact with the [Azure Event Hub service for logging, monitoring, and analytics](api-management-log-to-eventhub-sample.md). This article demonstrates policies that allow you to interact with any external HTTP-based service. These policies can be used for triggering remote events or for retrieving information that is used to manipulate the original request and response in some way.
18
+
You have previously seen how to interact with the [Azure Event Hubs service for logging, monitoring, and analytics](api-management-log-to-eventhub-sample.md). This article demonstrates policies that allow you to interact with any external HTTP-based service. These policies can be used for triggering remote events or for retrieving information that is used to manipulate the original request and response in some way.
21
19
22
20
## Send-One-Way-Request
23
21
Possibly the simplest external interaction is the fire-and-forget style of request that allows an external service to be notified of some kind of important event. The control flow policy `choose` can be used to detect any kind of condition that you are interested in. If the condition is satisfied, you can make an external HTTP request using the [send-one-way-request](./send-one-way-request-policy.md) policy. This could be a request to a messaging system like Hipchat or Slack, or a mail API like SendGrid or MailChimp, or for critical support incidents something like PagerDuty. All of these messaging systems have simple HTTP APIs that can be invoked.
@@ -95,7 +93,7 @@ The `response-variable-name` attribute is used to give access the returned respo
95
93
96
94
From the response object, you can retrieve the body and RFC 7622 tells API Management that the response must be a JSON object and must contain at least a property called `active` that is a boolean value. When `active` is true then the token is considered valid.
97
95
98
-
Alternatively, if the authorization server doesn't include the "active" field to indicate whether the token is valid, use a tool like Postman to determine what properties are set in a valid token. For example, if a valid token response contains a property called "expires_in", check whether this property name exists in the authorization server response this way:
96
+
Alternatively, if the authorization server doesn't include the "active" field to indicate whether the token is valid, use an HTTP client tool such as `curl` to determine what properties are set in a valid token. For example, if a valid token response contains a property called "expires_in", check whether this property name exists in the authorization server response this way:
Copy file name to clipboardExpand all lines: articles/api-management/devops-api-development-templates.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Both GitHub and Azure Repos allow approval pipelines to be configured that run w
43
43
* API specification linters such as [Spectral][12] to ensure that the definition meets API standards required by the organization.
44
44
* Breaking change detection using tools such as [openapi-diff][13].
45
45
* Security audit and assessment tools. [OWASP maintains a list of tools][14] for security scanning.
46
-
* Automated API test frameworks such as [Newman][15], a test runner for [Postman collections][16].
46
+
* Automated API test frameworks.
47
47
48
48
> [!NOTE]
49
49
> Azure APIs must conform to a [strict set of guidelines][26] that you can use as a starting point for your own API guidelines. There is a [Spectral configuration][27] for enforcing the guidelines.
@@ -88,7 +88,6 @@ Review [Automated API deployments with APIOps][28] in the Azure Architecture Cen
88
88
*[Azure APIOps Toolkit][5] provides a workflow for API Management DevOps.
89
89
*[Spectral][12] provides a linter for OpenAPI specifications.
90
90
*[openapi-diff][13] provides a breaking change detector for OpenAPI v3 definitions.
91
-
*[Newman][15] provides an automated test runner for Postman collections.
To enhance development of your APIs, you can export an API fronted in API Management to [Postman](https://www.postman.com/product/what-is-postman/). Export an API definition from API Management as a Postman [collection](https://learning.postman.com/docs/getting-started/creating-the-first-collection/) so that you can use Postman's tools to design, document, test, monitor, and collaborate on APIs.
16
16
17
+
> [!NOTE]
18
+
> Only the API definition can be exported directly from API Management to Postman. Other information such as policies or subscription keys isn't exported.
19
+
17
20
## Prerequisites
18
21
19
22
+ Complete the following quickstart: [Create an Azure API Management instance](get-started-create-service-instance.md).
@@ -22,8 +25,6 @@ To enhance development of your APIs, you can export an API fronted in API Manage
22
25
> [!NOTE]
23
26
> Currently, you can only export HTTP APIs from API Management directly to Postman.
24
27
25
-
For testing authorization in Postman as outlined later in this article, the API should require a subscription.
26
-
27
28
+ A [Postman](https://www.postman.com) account, which you can use to access Postman for Web.
28
29
* Optionally, [download and install](https://learning.postman.com/docs/getting-started/installation-and-updates/) the Postman desktop app locally.
29
30
@@ -45,30 +46,18 @@ To enhance development of your APIs, you can export an API fronted in API Manage
45
46
46
47
:::image type="content" source="media/export-api-postman/postman-collection-documentation.png" alt-text="Screenshot of collection imported to Postman.":::
47
48
48
-
## Authorize requests in Postman
49
+
## API development with API Management and Postman
49
50
50
-
If the API you exported requires a subscription, you'll need to configure a valid subscription key from your API Management instance to send requests from Postman.
51
+
API developers can rapidly iterate on API changes by using Postman's API testing, monitoring, and development capabilities.
51
52
52
-
Use the following steps to configure a subscription key as a secret variable for the collection.
53
+
APIs developed in Postman can then be exported and imported back into API Management as API revisions. This enables you to develop APIs in Postman and then deploy them to API Management for runtime access and management. [Learn more](https://learning.postman.com/docs/designing-and-developing-your-api/deploying-an-api/deploying-an-api-azure/)
53
54
54
-
1. In your Postman workspace, select **Environments** > **Create environment**.
55
-
1. Enter a name for the environment such as *Azure API Management*.
56
-
1. Add a variable with the following values:
57
-
1. Name - *apiKey*
58
-
1. Type - **secret**
59
-
1. Initial value - a valid API Management subscription key for the API
60
-
1. Select **Save**.
61
-
1. Select **Collections** and the name of the collection that you imported.
62
-
1. Select the **Authorization** tab.
63
-
1. In the upper right, select the name of the environment you created, such as *Azure API Management*.
64
-
1. For the key **Ocp-Apim-Subscription-Key**, enter the variable name `{{apiKey}}`. Select **Save**.
65
55
66
-
:::image type="content" source="media/export-api-postman/postman-api-authorization.png" alt-text="Screenshot of configuring secret API key in Postman.":::
67
-
1. Test your configuration by selecting an operation in your API such as a `GET` operation, and select **Send**.
68
-
69
-
If correctly configured, the operation returns a `200 OK` status and some output.
56
+
> [!CAUTION]
57
+
> Use care when passing API Management subscription keys or other sensitive data in Postman. [Postman Vault](https://learning.postman.com/docs/sending-requests/postman-vault/postman-vault-secrets/) is recommended to store sensitive data as vault secrets in your instance of Postman, so you can safely reuse secrets in your collections and requests.
70
58
71
-
## Next steps
59
+
## Related content
72
60
73
-
* Learn more about [importing APIs to Postman](https://learning.postman.com/docs/designing-and-developing-your-api/importing-an-api/).
61
+
*[Blog: Enhanced API developer experience with the Microsoft-Postman partnership](https://techcommunity.microsoft.com/t5/apps-on-azure-blog/enhanced-api-developer-experience-with-the-microsoft-postman/ba-p/3650304)
62
+
* Learn more about [importing API definitions to Postman](https://learning.postman.com/docs/designing-and-developing-your-api/importing-an-api/).
74
63
* Learn more about [authorizing requests in Postman](https://learning.postman.com/docs/sending-requests/authorization/).
Copy file name to clipboardExpand all lines: articles/api-management/front-door-api-management.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
1
---
2
2
title: Configure Azure Front Door in front of Azure API Management
3
-
description: Learn how to front your API Management instance with Azure Front Door Standard/Premium to provide global HTTPS load balancing, TLS offloading, dynamic request acceleration, and other capabilities.
3
+
description: Learn how to front your API Management instance with Azure Front Door for global HTTPS load balancing, TLS offloading, dynamic request acceleration, and more.
4
4
services: api-management
5
5
author: dlepow
6
6
7
+
7
8
ms.service: azure-api-management
8
9
ms.topic: how-to
9
-
ms.date: 09/27/2022
10
+
ms.date: 08/06/2024
10
11
ms.author: danlep
11
12
---
12
13
# Configure Front Door Standard/Premium in front of Azure API Management
@@ -78,19 +79,17 @@ We recommend updating the default route that's associated with the API Managemen
78
79
79
80
### Test the configuration
80
81
81
-
Test the Front Door profile configuration by calling an API hosted by API Management. First, call the API directly through the API Management gateway to ensure that the API is reachable. Then, call the API through Front Door. To test, you can use a command line client such as `curl` for the calls, or a tool such as [Postman](https://www.getpostman.com).
82
+
Test the Front Door profile configuration by calling an API hosted by API Management, for example, the Demo Conference API. First, call the API directly through the API Management gateway to ensure that the API is reachable. Then, call the API through Front Door.
82
83
83
84
### Call an API directly through API Management
84
85
85
-
In the following example, an operation in the Demo Conference API hosted by the API Management instance is called directly using Postman. In this example, the instance's hostname is in the default `azure-api.net` domain, and a valid subscription key is passed using a request header. A successful response shows `200 OK`and returns the expected data:
86
+
To call an API directly through the API Management gateway, you can use a command line client such as `curl` or another HTTP client. A successful response returns a `200 OK`HTTP response and the expected data:
86
87
87
-
:::image type="content" source="media/front-door-api-management/test-api-management-gateway.png" alt-text="Screenshot showing calling API Management endpoint directly using Postman.":::
88
+
:::image type="content" source="media/front-door-api-management/test-api-management-gateway.png" alt-text="Screenshot showing calling API Management endpoint directly using an HTTP client.":::
88
89
89
90
### Call an API directly through Front Door
90
91
91
-
In the following example, the same operation in the Demo Conference API is called using the Front Door endpoint configured for your instance. The endpoint's hostname in the `azurefd.net` domain is shown in the portal on the **Overview** page of your Front Door profile. A successful response shows `200 OK` and returns the same data as in the previous example:
92
-
93
-
:::image type="content" source="media/front-door-api-management/test-front-door-gateway.png" alt-text="Screenshot showing calling Front Door endpoint using Postman.":::
92
+
Call the same API operation using the Front Door endpoint configured for your instance. The endpoint's hostname in the `azurefd.net` domain is shown in the portal on the **Overview** page of your Front Door profile. A successful response shows `200 OK` and returns the same data as in the previous example.
94
93
95
94
## Restrict incoming traffic to API Management instance
0 commit comments