Skip to content

Commit 186ed48

Browse files
committed
work in progress
1 parent 47a2078 commit 186ed48

File tree

8 files changed

+18
-15
lines changed

8 files changed

+18
-15
lines changed
-104 KB
Loading
-4.81 KB
Loading
75.8 KB
Loading
-22.9 KB
Loading
-43.5 KB
Loading
-171 KB
Loading
-12.8 KB
Loading

articles/api-management/transform-api.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: dlepow
66
ms.service: api-management
77
ms.custom: mvc, devdivchpfy22
88
ms.topic: tutorial
9-
ms.date: 03/15/2022
9+
ms.date: 07/30/2024
1010
ms.author: danlep
1111
---
1212

@@ -30,7 +30,7 @@ In this tutorial, you learn how to:
3030
> * Protect an API by adding a rate limit policy (throttling)
3131
> * Test the transformations
3232
33-
:::image type="content" source="media/transform-api/api-management-console-new.png" alt-text="Policies in portal":::
33+
:::image type="content" source="media/transform-api/api-management-console-new.png" alt-text="Screenshot of API Management policies in the portal.":::
3434

3535
## Prerequisites
3636

@@ -59,7 +59,7 @@ To see the original response:
5959

6060
The original API response should look similar to the following response:
6161

62-
:::image type="content" source="media/transform-api/test-original-response-new.png" alt-text="Original API response":::
62+
:::image type="content" source="media/transform-api/test-original-response-new.png" alt-text="Screenshot of the original API response in the portal":::
6363

6464
As you can see, the response includes the **X-AspNet-Version** and **X-Powered-By** headers.
6565

@@ -70,20 +70,23 @@ This example shows how to use the form-based policy editor, which helps you conf
7070
1. Select **Demo Conference API** > **Design** > **All operations**.
7171
1. In the **Outbound processing** section, select **+ Add policy**.
7272

73-
:::image type="content" source="media/transform-api/outbound-policy.png" alt-text="Navigate to outbound policy" border="false":::
73+
:::image type="content" source="media/transform-api/outbound-policy-small.png" alt-text="Screenshot of navigating to outbound policy in the portal." lightbox="media/transform-api/outbound-policy.png":::
7474

7575
1. In the **Add outbound policy** window, select **Set headers**.
7676

77-
:::image type="content" source="media/transform-api/set-http-header.png" alt-text="Set HTTP header policy":::
77+
:::image type="content" source="media/transform-api/set-http-header.png" alt-text="Screenshot of configuring the Set headers policy in the portal.":::
7878

79-
1. To configure the set headers policy, do the following:
80-
1. Under **Name**, enter **X-Powered-By**. Under **Action**, select **delete**.
81-
1. Select **+ Add header**.
82-
1. Under **Name**, enter **X-AspNet-Version**. Under **Action**, select **delete**.
79+
1. To configure the Set headers policy, do the following:
80+
1. Under **Name**, enter **X-Powered-By**.
81+
1. Leave **Value** empty. If a value appears in the dropdown, delete it.
82+
1. Under **Action**, select **delete**.
83+
1. Select **Save**.
8384

84-
:::image type="content" source="media/transform-api/set-policy.png" alt-text="Set HTTP header":::
85+
1. Repeat the preceding two steps to add a **Set headers** policy that deletes the **X-AspNet-Version** header:
86+
87+
1. After configuration, two **set-header** policy elements appear in the **Outbound processing** section.
8588

86-
1. Select **Save**. Two **set-header** policy elements appear in the **Outbound processing** section.
89+
:::image type="content" source="media/transform-api/set-policy.png" alt-text="Screenshot of the Set headers outbound policies in the portal.":::
8790

8891
## Replace original URLs in the body of the API response with API Management gateway URLs
8992

@@ -98,7 +101,7 @@ To see the original response:
98101

99102
As you can see, the response includes the original backend URLs:
100103

101-
:::image type="content" source="media/transform-api/original-response2.png" alt-text="Original URLs in response":::
104+
:::image type="content" source="media/transform-api/original-response2.png" alt-text="Screenshot of original URLs in response in the portal.":::
102105

103106
### Set the transformation policy
104107

@@ -107,17 +110,17 @@ In this example, you use the policy code editor to add the policy XML snippet di
107110
1. Select **Demo Conference API** > **Design** > **All operations**.
108111
1. In the **Outbound processing** section, select the code editor (**</>**) icon.
109112

110-
:::image type="content" source="media/transform-api/outbound-policy-code.png" alt-text="Navigate to outbound policy code editor":::
113+
:::image type="content" source="media/transform-api/outbound-policy-code.png" alt-text="Screenshot of navigating to outbound policy code editor in the portal.":::
111114

112115
1. Position the cursor inside the **`<outbound>`** element on a blank line. Then select **Show snippets** at the top-right corner of the screen.
113116

114-
:::image type="content" source="media/transform-api/show-snippets-1.png" alt-text="Select show snippets":::
117+
:::image type="content" source="media/transform-api/show-snippets-1.png" alt-text="Screenshot of selecting show snippets in policy editor in the portal.":::
115118

116119
1. In the right window, under **Transformation policies**, select **Mask URLs in content**.
117120

118121
The **`<redirect-content-urls />`** element is added at the cursor.
119122

120-
:::image type="content" source="media/transform-api/mask-urls-new.png" alt-text="Mask URLs in content":::
123+
:::image type="content" source="media/transform-api/mask-urls-new.png" alt-text="Screenshot of inserting mask URLs in content policy in the portal.":::
121124

122125
1. Select **Save**.
123126

0 commit comments

Comments
 (0)