-
Notifications
You must be signed in to change notification settings - Fork 0
/
command-api.html
208 lines (194 loc) · 7.17 KB
/
command-api.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>SequentialCI</title>
<meta content="" name="description" />
<meta content="" name="keywords" />
<!-- Favicons -->
<link href="assets/img/favicon.png" rel="icon" />
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon" />
<!-- Google Fonts -->
<link href="https://fonts.gstatic.com" rel="preconnect" />
<link
href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Nunito:300,300i,400,400i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i"
rel="stylesheet"
/>
<!-- Vendor CSS Files -->
<link
href="assets/vendor/bootstrap/css/bootstrap.min.css"
rel="stylesheet"
/>
<link
href="assets/vendor/bootstrap-icons/bootstrap-icons.css"
rel="stylesheet"
/>
<link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet" />
<link href="assets/vendor/quill/quill.snow.css" rel="stylesheet" />
<link href="assets/vendor/quill/quill.bubble.css" rel="stylesheet" />
<link href="assets/vendor/remixicon/remixicon.css" rel="stylesheet" />
<link href="assets/vendor/simple-datatables/style.css" rel="stylesheet" />
<!-- Template Main CSS File -->
<link href="assets/css/style.css" rel="stylesheet" />
</head>
<body>
<!-- ======= Header ======= -->
<header id="header" class="header fixed-top d-flex align-items-center">
<div class="d-flex align-items-center justify-content-between">
<a href="index.html" class="logo d-flex align-items-center">
<span class="d-none d-lg-block">SequentialCi</span>
</a>
<i class="bi bi-list toggle-sidebar-btn"></i>
</div>
<!-- End Logo -->
</header>
<!-- End Header -->
<!-- ======= Sidebar ======= -->
<aside id="sidebar" class="sidebar">
<ul class="sidebar-nav" id="sidebar-nav">
<li class="nav-item">
<a class="nav-link collapsed" href="index.html">
<i class="bi bi-grid"></i>
<span>Overview</span>
</a>
</li>
<!-- End Dashboard Nav -->
<li class="nav-item">
<a
class="nav-link collapsed"
data-bs-target="#components-nav"
data-bs-toggle="collapse"
href="#"
>
<i class="bi bi-menu-button-wide"></i><span>Commands</span
><i class="bi bi-chevron-down ms-auto"></i>
</a>
<ul
id="components-nav"
class="nav-content collapse show"
data-bs-parent="#sidebar-nav"
>
<li>
<a href="command-generate-data.html">
<i class="bi bi-circle"></i><span>Generate data</span>
</a>
</li>
<li>
<a href="command-api.html" class="active">
<i class="bi bi-circle"></i><span>Api</span>
</a>
</li>
<li>
<a href="command-postgres.html">
<i class="bi bi-circle"></i><span>Postgres</span>
</a>
</li>
<li>
<a href="command-mongo.html">
<i class="bi bi-circle"></i><span>Mongo</span>
</a>
</li>
<li>
<a href="command-mysql.html">
<i class="bi bi-circle"></i><span>MySql</span>
</a>
</li>
<li>
<a href="command-kafka.html">
<i class="bi bi-circle"></i><span>Kafka</span>
</a>
</li>
<li>
<a href="command-validate-json.html">
<i class="bi bi-circle"></i><span>Validate json</span>
</a>
</li>
<li>
<a href="command-delay.html">
<i class="bi bi-circle"></i><span>Delay</span>
</a>
</li>
</ul>
</li>
<!-- End Components Nav -->
</ul>
</aside>
<!-- End Sidebar-->
<main id="main" class="main">
<section class="section">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<p style="margin-top: 22px">
Utilizing cURL in Postman, you're able to perform API
requests, replacing data via parameters, and then store this
data into parameters for execution and future use.
</p>
<div id="json-viewer"></div>
<p style="margin-top: 22px">
Curl sample using parameter token(<a style="font-weight: bold"
>{parameters['token']}</a
>) and name(<a style="font-weight: bold"
>{parameters['name']}</a
>)
</p>
<p style="margin-top: 22px">In parameters:</p>
<p style="margin-left: 22px">
<a style="font-weight: bold">result: null</a> then save
parameters[result] with all data received from api
</p>
<p style="margin-left: 22px">
<a style="font-weight: bold">customerId: "id"</a> then save
parameters[customerId] from field id from result of api
</p>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- End #main -->
<!-- ======= Footer ======= -->
<footer id="footer" class="footer">
<div class="copyright">
© Copyright <strong><span>SequentialCI</span></strong
>. All Rights Reserved
</div>
</footer>
<!-- End Footer -->
<a
href="#"
class="back-to-top d-flex align-items-center justify-content-center"
><i class="bi bi-arrow-up-short"></i
></a>
<!-- Vendor JS Files -->
<script src="assets/vendor/apexcharts/apexcharts.min.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="assets/vendor/chart.js/chart.umd.js"></script>
<script src="assets/vendor/echarts/echarts.min.js"></script>
<script src="assets/vendor/quill/quill.min.js"></script>
<script src="assets/vendor/simple-datatables/simple-datatables.js"></script>
<script src="assets/vendor/tinymce/tinymce.min.js"></script>
<script src="assets/vendor/php-email-form/validate.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@textea/json-viewer@3"></script>
<!-- Template Main JS File -->
<script src="assets/js/main.js"></script>
<script>
new JsonViewer({
value: {
name: "api",
description: "Create customer",
curl: "curl --location 'http://localhost/customer' --header 'Authorization: Bearer {parameters['token']}' --data '{\"name\":\"{parameters['name']}\"}'",
parameters: {
result: null,
customerId: "id",
},
},
theme: "dark",
displayDataTypes: false,
}).render("#json-viewer");
</script>
</body>
</html>