Version 35.82 by Danniar Firdausy on 2024/09/30 12:51

Hide last authors
Erik Bakker 21.1 1 {{container}}{{container layoutStyle="columns"}}(((
eMagiz 1.1 2
Danniar Firdausy 35.7 3 Building on what we covered in our [[crash course>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.WebHome||target="blank"]] about setting up the API Gateway, we will now focus on the next critical step: updating your existing API Gateway solution. In this microlearning, we will guide you through the process of updating both the design phase and the create phase of your API Gateway, and explore how these updates impact your solution.
eMagiz 1.1 4
Erik Bakker 21.1 5 Should you have any questions, please contact [[academy@emagiz.com>>mailto:academy@emagiz.com]].
eMagiz 1.1 6
7 == 1. Prerequisites ==
8
9 * Basic knowledge of the eMagiz platform
10
11 == 2. Key concepts ==
12
13 This microlearning centers around updating your API Gateway.
Danniar Firdausy 35.7 14 * By updating, we mean: changing existing software to reflect new insights or ideas that have come up during development and testing.
eMagiz 1.1 15
16 == 3. Updating your API Gateway Operations ==
17
Erik Bakker 29.1 18 In our [[crash course>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.WebHome||target="blank"]] on the API Gateway pattern, we have learned about setting up the API Gateway. However, we still need to delve into how to update your existing API Gateway solution. In this microlearning, we will focus on updating the design phase of your API gateway (and the subsequent steps) and the create phase of your API gateway (and subsequent steps). This is to learn the impact of updates and how we can achieve this.
eMagiz 1.1 19
20 * Updating can happen from Design
21 * Updating can happen from Create
22 * Both situations have a different impact
23
Erik Bakker 29.1 24 In the remainder of this microlearning, we will discuss both scenarios to clarify their impact.
eMagiz 1.1 25
26 === 3.1 Updating from Design ===
27
Erik Bakker 29.1 28 After adding an integration to Create, you can change the error handling, the request and response message structure, the parameters, and more. In all these scenarios, you need to change something in the Design phase of eMagiz. The actual change in these parts of the API Gateway solutions is specified in earlier microlearnings. However, what to do after you have made those changes has yet to be discussed. In this microlearning, we will discuss that process within eMagiz. Note that this process **only** applies when the operation already exists in Create. If it does not yet exist in Create, eMagiz will create a new entry and exit gate for you based on the configuration in Design.
eMagiz 1.1 29
Erik Bakker 29.1 30 From our offering on the messaging pattern and how to update it in those scenarios, you can imagine that (parts of) the API Gateway flows need to be updated to reflect your changes. Depending on the exact change, the effect will be seen in the corresponding entry gate or the corresponding exit gate specific to an operation. The division can be made as follows:
eMagiz 1.1 31
Erik Bakker 29.1 32 * When you change something in the configuration of the API Gateway operation itself (e.g., path, error handling, parameters), the change will only impact the corresponding entry gate.
33 * When you change something in the configuration of the backend operation (i.e., endpoint, parameter, system request/response), the change will only impact the specific exit gate.
34 * When you change the gateway request/response message (with transformation), the change will impact **both** the entry gate and the specific exit gate.
35 * When you change the API Gateway's security configuration, the infra flow and all entry gates will be updated (by clicking on Update security in the context menu).
eMagiz 1.1 36
Erik Bakker 29.1 37 eMagiz will automate all changes on the entry gate level except for changing the security configuration due to the impact of such a change. When the change is executed, eMagiz will automatically create a new version of the entry gate to reflect the change. To update changes in the exit gate, you need to execute a manual version bump. This division is made because the exit gate can contain much more customization, while the entry gate is, in most cases, completely generated by eMagiz.
eMagiz 1.1 38
Erik Bakker 29.1 39 === 3.2 Updating from Create ===
eMagiz 1.1 40
Erik Bakker 29.1 41 Apart from updating your API Gateway solution in Create, you can only update parts of the API Gateway solution in Create. Here, we mainly talk about changing the gateway messages. Any other changes on the 'exit gate' level have no particular impact compared to changing parts of other flows. We discern two parts of updating a (gateway) message that you can execute in the Create phase:
eMagiz 1.1 42
Erik Bakker 29.1 43 * Changing the dataType (i.e., from dateTime to date)
44 * Changing / Adding / Deleting valid enum values
eMagiz 1.1 45
Erik Bakker 29.1 46 In both cases, eMagiz will automatically update your Swagger definition by recreating it to reflect these changes and executing a version bump of the infra flow.
eMagiz 1.1 47
Erik Bakker 29.1 48 === 3.3 Updating the Swagger UI ===
eMagiz 1.1 49
Danniar Firdausy 35.81 50 Additionally, you can also update the Swagger UI of your API Gateway solution, so that it better informs your (external) parties to see the specifications of your API Gateway. As you have learned from the [[previous microlearning>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.crashcourse-api-gateway-swagger-ui||target="blank"]], the Swagger UI contains information on, not only Authorization, HTTP Resource Paths, and HTTP Operations, but also schemas, example messages, tags, and descriptions if defined. Note that, as is the case with all new versions in Create, the changes will only be effective when you deploy your solution via the eMagiz Deploy phase.
Danniar Firdausy 35.9 51
Danniar Firdausy 35.82 52 {{info}}To ensure that the changes below to your Swagger file generated by eMagiz are shown to the end-user, the latest version of the API Gateway runtime infra flow needs to be included in the release and deployed to the correct environment.{{/info}}
Danniar Firdausy 35.81 53
Danniar Firdausy 35.39 54 ==== 3.3.1 Edit Resource ====
55
Danniar Firdausy 35.80 56 To have these information explicitly mentioned in your Swagger UI, then you need to define them in your API Catalog in Design. In this catalog page, you can find the resource that you want to work with. Given that your account has an edit permission in Design, then you can click "Edit" of that resource to edit its resource path, which will later be reflected in your Swagger UI (see the blue box below and in the second screenshot of Section 3.3.2 to see how it is reflected in the Swagger UI).
Danniar Firdausy 35.24 57
Danniar Firdausy 35.56 58 [[image:Main.Images.Microlearning.WebHome@intermediate-api-management-updating-your-api-gateway-operations--edit-resource.png]]
59
Danniar Firdausy 35.39 60 ==== 3.3.2 Edit Operation ====
61
Danniar Firdausy 35.42 62 Next to that, when you click one of your resources in the API Catalog page, then you can also edit the "Operations" attached to that resource (see the screenshot below).
Danniar Firdausy 35.40 63
Danniar Firdausy 35.19 64 [[image:Main.Images.Microlearning.WebHome@intermediate-api-management-updating-your-api-gateway-operations--edit-operation.png]]
65
Danniar Firdausy 35.64 66 In this "Edit Operation" pop-up page, you can specify the HTTP method of that operation. Next to that, you can also specify the "Tags" and the "Summary" of that operation. The "Summary" here shortly describes your resource path and will be shown beside the path of your resource. Whereas, the "Tags" here will group together the operations with the same tag names in your Swagger UI. Thus, the screenshot below shows an example of "Financials" (see the orange box below) as the tag for {{code language='xml'}}/debtor/{code}{{/code}} and {{code}}/invoice{{/code}} operations along with the summaries of each of the resource paths (see the red box below).
Danniar Firdausy 35.11 67
Danniar Firdausy 35.46 68 [[image:Main.Images.Microlearning.WebHome@intermediate-api-management-updating-your-api-gateway-operations--tags-summary.png]]
69
Danniar Firdausy 35.63 70 ==== 3.3.3 Edit Parameters ====
Danniar Firdausy 35.43 71
Danniar Firdausy 35.70 72 Still in the API Catalog page, right next to that "Operations" of that resource, you will see "Parameters", "Request" (only for non-GET operation), and "Responses" tabs.
Danniar Firdausy 35.44 73
Danniar Firdausy 35.69 74 [[image:Main.Images.Microlearning.WebHome@intermediate-api-management-updating-your-api-gateway-operations--edit-parameters.png]]
Danniar Firdausy 35.67 75
Danniar Firdausy 35.73 76 In this "Parameters" tab, you can specify the parameter's name (see the yellow box), description (see the orange box), the location of the parameter (see the blue box), as well as whether the parameter is required or not (see the green box).
Danniar Firdausy 35.67 77
Danniar Firdausy 35.35 78 [[image:Main.Images.Microlearning.WebHome@intermediate-api-management-updating-your-api-gateway-operations--parameters-description.png]]
Danniar Firdausy 35.33 79
Danniar Firdausy 35.63 80 ==== 3.3.4 Edit Request ====
Danniar Firdausy 35.47 81
Danniar Firdausy 35.75 82 Quite similar with the "Parameters" tab, in the "Request" tab of the API Catalog page, you can also specify the description and whether the request body is required in the request. Note that this tab is only visible for non-GET operation.
Danniar Firdausy 35.49 83
Danniar Firdausy 35.76 84 [[image:Main.Images.Microlearning.WebHome@intermediate-api-management-updating-your-api-gateway-operations--edit-request.png]]
Danniar Firdausy 35.75 85
86 The screenshot below shows how the Request "Description" is reflected in the Swagger UI.
87
Danniar Firdausy 35.61 88 [[image:Main.Images.Microlearning.WebHome@intermediate-api-management-updating-your-api-gateway-operations--request-description.png]]
Danniar Firdausy 35.49 89
Danniar Firdausy 35.63 90 ==== 3.3.5 Edit Responses ====
Danniar Firdausy 35.47 91
Danniar Firdausy 35.81 92 Lastly, the "Responses" tab of the API Catalog page also allows you to specify the response description and example response (along with its "Media type") for a specific HTTP status code.
Danniar Firdausy 35.57 93
Danniar Firdausy 35.77 94 [[image:Main.Images.Microlearning.WebHome@intermediate-api-management-updating-your-api-gateway-operations--edit-responses.png]]
95
96 The screenshot below shows what are listed in the "Responses" tab is reflected in the Swagger UI.
97
Danniar Firdausy 35.61 98 [[image:Main.Images.Microlearning.WebHome@intermediate-api-management-updating-your-api-gateway-operations--responses-description.png]]
Danniar Firdausy 35.57 99
Eva Torken 25.1 100 == 4. Key takeaways ==
eMagiz 1.1 101
Danniar Firdausy 35.7 102 * Updates to your API Gateway can be made either during the Design phase or the Create phase, each with distinct impacts.
103 * Changes made in the Design phase affect the configuration of the entry gate and may necessitate updates to both entry and exit gates, depending on the nature of the changes.
104 * Changes during the Create phase typically involve modifications to gateway messages, with changes reflected automatically in the Swagger definition and a version bump of the infra flow.
105 * Adding new operations or updating from either Design or Create does not require a reset of the existing solution.
106 * Ensure that updates are included in the deployment phase to reflect the latest changes in the Swagger file and runtime infra flow.
107
Eva Torken 25.1 108 == 5. Suggested Additional Readings ==
eMagiz 1.1 109
Danniar Firdausy 35.6 110 If you are interested in this topic and want more information, please read the help text provided by eMagiz and see the following link:
Danniar Firdausy 35.5 111
Danniar Firdausy 29.2 112 * [[Crash Course (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.WebHome||target="blank"]]
113 ** [[Crash Course API Gateway (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.WebHome||target="blank"]]
114 *** [[Swagger UI (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.crashcourse-api-gateway-swagger-ui||target="blank"]]
Danniar Firdausy 31.1 115 *** [[Parameters (Path, Query) (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.crashcourse-api-gateway-parameters||target="blank"]]
Danniar Firdausy 31.2 116 *** [[Configure A Backend Operation (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.crashcourse-api-gateway-configure-backend-operation||target="blank"]]
Danniar Firdausy 33.2 117 *** [[Setting up Entry gate (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.crashcourse-api-gateway-setting-up-entry-gate||target="blank"]]
118 *** [[Setting up Exit gate (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.crashcourse-api-gateway-setting-up-exit-gate||target="blank"]]
Danniar Firdausy 32.2 119 *** [[API Gateway Security (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.crashcourse-api-gateway-security||target="blank"]]
Danniar Firdausy 35.3 120 * [[Updating API Gateway Operations (Search Results)>>url:https://docs.emagiz.com/bin/view/Main/Search?sort=score&sortOrder=desc&highlight=true&facet=true&r=1&f_space_facet=0%2FMain.&l_space_facet=10&f_type=DOCUMENT&f_locale=en&f_locale=&f_locale=en&text=updating+%22API+gateway%22+operation||target="blank"]]
Erik Bakker 21.1 121 )))((({{toc/}}))){{/container}}{{/container}}