Wiki source code of HTTP Resource (Paths)

Version 5.1 by Erik Bakker on 2023/01/20 14:17

Show last authors
1 {{container}}{{container layoutStyle="columns"}}(((
2 In this microlearning, we will focus on learning about HTTP Resource (Paths).
3 A crucial part of setting up your (API) Gateway with the help of RESTful services is knowing to which resources (i.e. Order, Client, Employee) you want to give external parties access via your (API) Gateway.
4
5 Should you have any questions, please contact [[academy@emagiz.com>>mailto:academy@emagiz.com]].
6
7 == 1. Prerequisites ==
8
9 * Basic knowledge of the eMagiz platform
10
11 == 2. Key concepts ==
12
13 This microlearning centers around HTTP Resource (Paths) in conjunction with the API Gateway solution of eMagiz.
14 With HTTP Resource Paths we mean: Identify the resource (i.e. Client, Order, Employee) and define the descriptive path (i.e. /v1/order, /v1/order/{uuid}) an external party can call to execute the operation
15 With API Gateway we mean: A collection of RESTful API operations that can be published to the outside world to give them access to applications that are linked to your business process
16
17 When determining the correct resource path to expose to the outside world start at what you want to make publicly available.
18 For example, when you want to make it possible for external parties to retrieve a collection of orders without any filter a valid resource path can be:
19
20 * /orders
21
22 If you have multiple resources that you want to make available that all have something to do with the order process you could add each of them to a 'group' to add an extra layer of information:
23
24 * /order-management/orders
25 * /order-management/trips
26
27 To determine the correct notation also take into account how the backend system that you want to expose via the API Gateway has determined their HTTP Resource (Paths).
28 If this adheres to the best practice simply use that. More on that specific relation in later microlearnings.
29
30 A list of best practices can be found here:
31 [[REST API naming concepts>>https://restfulapi.net/resource-naming/||target="blank"]]
32
33 == 3. HTTP Resource (Paths) ==
34
35 This microlearning focuses on the theoretical part of HTTP Resources regardless of a specific implementation in eMagiz. In the microlearnings that will come, we will use this theoretical knowledge when we configure our API Gateway further.
36
37 When determining the correct resource path to expose to the outside world start at what you want to make publicly available.
38 For example, when you want to make it possible for external parties to retrieve a collection of orders without any filter a valid resource path can be:
39
40 * /orders
41
42 If you have multiple resources that you want to make available that all have something to do with the order process you could add each of them to a 'group' to add an extra layer of information:
43
44 * /order-management/orders
45 * /order-management/trips
46
47 To determine the correct notation also take into account how the backend system that you want to expose via the API Gateway has determined their HTTP Resource (Paths).
48 If this adheres to the best practice simply use that. More on that specific relation in later microlearnings.
49
50 A list of best practices can be found here:
51 https://restfulapi.net/resource-naming/
52
53 In the following microlearning on HTTP Operations, we will bring the HTTP Resource (Paths) together with the HTTP Operations.
54 That combination is the basis for any integration that runs via the API Gateway.
55
56 == 4. Assignment ==
57
58 Read up on the best practices when it comes to the naming of HTTP Resource Paths and see if you can relate this to the eMagiz implementation.
59 This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment.
60
61 == 5. Key takeaways ==
62
63 * Start at the backend operation
64 * Determine usability of what is provided to you
65 * Take action based on that analysis
66
67 == 6. Suggested Additional Readings ==
68
69 If you are interested in this topic and want more information on it please read the help text provided by eMagiz and read the following links:
70
71 * https://restfulapi.net/resource-naming/
72
73 == 7. Silent demonstration video ==
74
75 As this is a more theoretical microlearning no demonstration video is created. See you in the next microlearning.)))((({{toc/}}))){{/container}}{{/container}}