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
:::image type="content" source="media/mock-api-responses/http-api.png" alt-text="Define a HTTP API":::
58
+
:::image type="content" source="media/mock-api-responses/http-api.png" alt-text="Screenshot that shows the first steps for defining an API." lightbox="media/mock-api-responses/http-api.png":::
59
59
60
60
1. In the **Create an HTTP API** window, select **Full**.
61
-
1.Enter *Test API* for **Display name**.
62
-
1.Select**Unlimited** for**Products**.
63
-
1. Ensure that **Managed** is selected for**Gateways**.
61
+
1.In **Display name**, enter *Test API*.
62
+
1.In**Products**, select**Unlimited**.
63
+
1. Ensure that **Managed** is selected in**Gateways**.
64
64
1. Select **Create**.
65
65
66
-
:::image type="content" source="media/mock-api-responses/create-http-api.png" alt-text="Create an HTTP API":::
66
+
:::image type="content" source="media/mock-api-responses/create-http-api.png" alt-text="Screenshot that shows the Create an HTTP API window.":::
67
67
68
68
## Add an operation to the test API
69
69
70
-
An API exposes one or more operations. In this section, you'll add an operation to the HTTP API you created. Calling the operation after completing the steps in this section triggers an error. After you complete the steps in the [Enable response mocking](#enable-response-mocking) section, you'll get no errors.
70
+
An API exposes one or more operations. In this section, you add an operation to the HTTP API you created. Calling the operation after completing the steps in this section triggers an error. After you complete the steps in the [Enable response mocking](#enable-response-mocking) section, you won't get an error.
71
71
72
72
### [Portal](#tab/azure-portal)
73
73
74
-
1. Select the API you created in the previous step.
74
+
1. Select the API that you created in the previous step.
75
75
1. Select **+ Add Operation**.
76
-
1. In the **Frontend** window, enter the following values.
76
+
1. In the **Frontend** window, enter the following values:
|**Display name**|*Test call*| The name that is displayed in the [developer portal](api-management-howto-developer-portal.md). |
83
-
|**URL** (HTTP verb) | GET | Select one of the predefined HTTP verbs. |
84
-
|**URL**|*/test*| A URL path for the API. |
85
-
|**Description**|| Optional description of the operation, used to provide documentation in the developer portal to the developers using this API. |
85
+
:::image type="content" source="media/mock-api-responses/frontend-window.png" alt-text="Screenshot that shows the Frontend window." lightbox="media/mock-api-responses/frontend-window.png":::
86
86
87
-
1. Select the **Responses** tab, located under the URL, Display name, and Description fields. Enter settings on this tab to define response status codes, content types, examples, and schemas.
88
-
1. Select **+ Add response**, and select **200 OK** from the list.
87
+
1. Select the **Responses** tab, which is located under the **URL**, **Display name**, and **Description** boxes. Enter values on this tab to define response status codes, content types, examples, and schemas.
88
+
1. Select **+ Add response**, and then select **200 OK** from the list.
89
89
90
-
:::image type="content" source="media/mock-api-responses/add-response.png" alt-text="Add response to the API operation":::
90
+
:::image type="content" source="media/mock-api-responses/add-response.png" alt-text="Screenshot that shows the Responses tab." lightbox="media/mock-api-responses/add-response.png":::
91
91
92
-
1.Under the **Representations**heading on the right, select **+ Add representation**.
93
-
1. Enter *application/json* into the search box and select the **application/json** content type.
94
-
1. In the **Sample**text box, enter `{ "sampleField" : "test" }`.
92
+
1.In the **Representations**section, select **+ Add representation**.
93
+
1. Enter *application/json* into the search box and then select the **application/json** content type.
94
+
1. In the **Sample** box, enter `{ "sampleField" : "test" }`.
95
95
1. Select **Save**.
96
96
97
-
:::image type="content" source="media/mock-api-responses/add-representation.png" alt-text="Add representation to the API operation":::
97
+
:::image type="content" source="media/mock-api-responses/add-representation.png" alt-text="Screenshot that shows the Representations section." lightbox="media/mock-api-responses/add-representation.png":::
98
98
99
-
Although not required for this example, you can configure more settings for an API operation on other tabs, including:
99
+
Although it's not required for this example, you can configure more settings for an API operation on other tabs, as described in the following table:
0 commit comments