-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
725 lines (572 loc) · 34.5 KB
/
index.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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, shrink-to-fit=no">
<link href="assets/images/favicon.ico" rel="icon" />
<title>Arteco integration</title>
<meta name="description" content="This is the API integration document for the Arteco Video Analytics system.">
<meta name="author" content="arteco-global.com">
<!-- Stylesheet
============================== -->
<!-- Bootstrap -->
<link rel="stylesheet" type="text/css" href="assets/vendor/bootstrap/css/bootstrap.min.css" />
<!-- Font Awesome Icon -->
<link rel="stylesheet" type="text/css" href="assets/vendor/font-awesome/css/all.min.css" />
<!-- Magnific Popup -->
<link rel="stylesheet" type="text/css" href="assets/vendor/magnific-popup/magnific-popup.min.css" />
<!-- Highlight Syntax -->
<link rel="stylesheet" type="text/css" href="assets/vendor/highlight.js/styles/github.css" />
<!-- Custom Stylesheet -->
<link rel="stylesheet" type="text/css" href="assets/css/stylesheet.css" />
<!-- Custom Stylesheet red color -->
<link rel="stylesheet" type="text/css" href="assets/css/color-red.css" />
</head>
<body data-spy="scroll" data-target=".idocs-navigation" data-offset="125">
<!-- Preloader -->
<div class="preloader">
<div class="lds-ellipsis">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<!-- Preloader End -->
<!-- Document Wrapper
=============================== -->
<div id="main-wrapper">
<!-- Header
============================ -->
<header id="header" class="sticky-top">
<!-- Navbar -->
<nav class="primary-menu navbar navbar-expand-lg bg-dark navbar-text-light navbar-dropdown-dark border-0">
<div class="container-fluid">
<!-- Sidebar Toggler -->
<button id="sidebarCollapse" class="navbar-toggler d-block d-md-none" type="button"><span></span><span
class="w-75"></span><span class="w-50"></span></button>
<!-- Logo -->
<a class="logo ml-md-3" href="index.html" title="iDocs Template"> <img src="assets/images/logo-dark.png"
alt="iDocs Template" /> </a>
<span class="text-2 text-light ml-2">v1.0</span>
<!-- Logo End -->
<!-- Navbar Toggler -->
<button class="navbar-toggler ml-auto" type="button" data-toggle="collapse"
data-target="#header-nav"><span></span><span></span><span></span></button>
<div id="header-nav" class="collapse navbar-collapse justify-content-end">
<!-- <ul class="navbar-nav">
<li class="dropdown"> <a class="dropdown-toggle" href="#">Dropdown</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Action</a></li>
<li class="dropdown"><a class="dropdown-item dropdown-toggle" href="#">Dropdown Action</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="index.html">Action</a></li>
<li><a class="dropdown-item" href="feature-header-dark.html">Another Action</a></li>
<li><a class="dropdown-item" href="feature-header-primary.html">Something Else Here</a></li>
<li><a class="dropdown-item" href="index-2.html">Another Link</a></li>
</ul>
</li>
<li><a class="dropdown-item" href="#">Another Action</a>
<li><a class="dropdown-item" href="#">Something Else Here</a></li>
</ul>
</li>
<li><a target="_blank" href="https://themeforest.net/user/harnishdesign/portfolio?ref=HarnishDesign">Other Template</a></li>
<li><a target="_blank" href="https://themeforest.net/user/harnishdesign/#contact?ref=HarnishDesign">Support</a></li>
</ul> -->
</div>
<ul class="social-icons social-icons-sm ml-lg-2 mr-2">
<li class="social-icons-facebook"><a data-toggle="tooltip" href="https://www.facebook.com/artecoglobal/"
target="_blank" title="" data-original-title="Facebook"><i class="fab fa-facebook-f"></i></a></li>
</ul>
</div>
</nav>
<!-- Navbar End -->
</header>
<!-- Header End -->
<!-- Content
============================ -->
<div id="content" role="main">
<!-- Sidebar Navigation
============================ -->
<div class="idocs-navigation bg-light">
<ul class="nav flex-column ">
<li class="nav-item"><a class="nav-link active" href="#idocs_start">Getting Started</a>
<ul class="nav flex-column">
<li class="nav-item"><a class="nav-link" href="#server_login">Server Login</a></li>
<li class="nav-item"><a class="nav-link" href="#server_live_event">Send live event</a></li>
<li class="nav-item"><a class="nav-link" href="#server_live_event_form">Send live event
(multipart/form-data)</a></li>
<!-- <li class="nav-item"><a class="nav-link" href="#idocs_color_schemes">Color Schemes</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_theme_customization">Customization</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_logo_settings">Logo Settings</a></li> -->
</ul>
</li>
<!-- <li class="nav-item"><a class="nav-link" href="#idocs_layout">Layout</a>
<ul class="nav flex-column">
<li class="nav-item"><a class="nav-link" href="#idocs_header">Header</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_navbar">Navbar</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_sidebar">Sidebar</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_footer">Footer</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_box_layout">Box Layout</a></li>
</ul>
</li>
<li class="nav-item"><a class="nav-link" href="#idocs_content">Content</a>
<ul class="nav flex-column">
<li class="nav-item"><a class="nav-link" href="#idocs_typography">Typography</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_code">Code</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_table">Table</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_icons">Icons</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_image">Image</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_video">Video</a></li>
</ul>
</li>
<li class="nav-item"><a class="nav-link" href="#idocs_components">Components</a>
<ul class="nav flex-column">
<li class="nav-item"><a class="nav-link" href="#idocs_accordion">Accordion</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_tabs">Tabs</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_social_icon">Social Icon</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_helper_classes">Helper Classes</a></li>
</ul>
</li> -->
<!-- <li class="nav-item"><a class="nav-link" href="#idocs_faq">FAQ</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_source_credits">Source & Credits</a></li> -->
<li class="nav-item"><a class="nav-link" href="#idocs_support">Support</a></li>
<!-- <li class="nav-item"><a class="nav-link" href="#idocs_templates">More Templates</a></li>
<li class="nav-item"><a class="nav-link" href="#idocs_changelog">Changelog</a> -->
<ul class="nav flex-column">
<li class="nav-item"><a class="nav-link" href="#v1-1">v1.1</a></li>
<li class="nav-item"><a class="nav-link" href="#v1-0">v1.0</a></li>
</ul>
</li>
</ul>
</div>
<!-- Docs Content
============================ -->
<div class="idocs-content">
<div class="container">
<!-- Getting Started
============================ -->
<section id="idocs_start">
<h1>Documentation</h1>
<h2>Omnia Web API Integration</h2>
<p class="lead">This is the API integration document for the Arteco Video Analytics system.</p>
<p>
REST API list can be found here: <a href="https://arteco-global.github.io/Mobile-API-Docs/">API REST
List</a>
</p>
<hr>
<p class="alert alert-info">If you have any questions that are beyond the scope of this help document,
please
feel free contact us via <a target="_blank" href="mailto:support@arteco-global.com">Email</a>.
</p>
</section>
<hr class="divider">
<!-- Server Login
============================ -->
<section id="server_login">
<h2>Server Login</h2>
<p class="lead">Arteco Omnia REST APIs support token-based authentication via the Authtoken request header.
The POST Login API is used to retrieve the authentication token. After the authentication token is
obtained, it must be inserted into the Authtoken header for all requests.
</p>
<p>
This demo shows how to obtain the access_token of a server.
Note, in this example, the authentication has been disabled on the server.
</p>
<pre><code class="javascript"> function sendData() {
const artecoServerIP = document.getElementById("artecoServerIP").value;
const username = document.getElementById("username").value;
const password = document.getElementById("password").value;
const url = artecoServerIP + "/api/v2/login";
const XHR = new XMLHttpRequest();
// Define what happens on successful data submission
XHR.addEventListener("load", (event) => {
//);
const response = JSON.parse(event.target.responseText);
alert(response.root.access_token);
});
// Define what happens in case of error
XHR.addEventListener("error", (event) => {
alert('Oops! Something went wrong.');
});
// Set up our request
XHR.open("POST", url);
//Send the proper header information along with the request
XHR.setRequestHeader("Content-Type", "application/json");
const data = {
"username": username,
"password": password
}
// The data sent is what the user provided in the form
XHR.send(JSON.stringify(data));
}
</code></pre>
<h3>Try it yourself</h3>
<form id="artecoForm">
<div class="form-group">
<label for="artecoServerIP">Server IP</label>
<input class="form-control" type="text" id="artecoServerIP" name="arteco_server_ip"
placeholder="https://demo1.my.omniaweb.cloud:443" value="https://demo1.my.omniaweb.cloud:443">
</div>
<div class="form-group">
<label for="username">Username</label>
<input type="text" class="form-control" id="username" name="arteco_server_ip" placeholder="username"
value="">
</div>
<div class="form-group">
<label for="password">Password</label>
<input class="form-control" type="password" id="password" name="arteco_server_ip" placeholder="password"
value="">
</div>
<button type="submit" class="btn btn-primary">Login</button>
<br> <br>
<div class="form-group">
<label for="bearerToken">Token</label>
<input class="form-control" type="text" id="bearerToken" name="arteco_server_token" placeholder="token"
value="">
</div>
</form>
</section>
<hr class="divider">
<!-- server_live_event
============================ -->
<section id="server_live_event">
<h2>Send live event</h2>
<p class="lead">Arteco Omnia REST APIs can send live events to a channel ID.
The POST Login API is used to provide all the information to the server in order to create a new event.
This API must be sent as a "Content-type:application/json".
</p>
<p>
Picture of a live event:
</p>
<picture>
<img src="./assets/images/live_event_example.png" class="img-fluid p-3" style="max-width: 500px;"">
</picture>
<p>
Example code in order to send event to Arteco Server:
Note, in this example authentication has been disabled on the server
</p>
<pre><code class=" javascript">
function sendData() {
const artecoServerIP = document.getElementById("server_live_event_artecoServerIP").value;
const artecoServerParam = document.getElementById("server_live_event_artecoServerParam").value;
const url = artecoServerIP + "/api/v2/event";
const XHR = new XMLHttpRequest();
// Define what happens on successful data submission
XHR.addEventListener("load", (event) => {
alert(event.target.responseText);
});
// Define what happens in case of error
XHR.addEventListener("error", (event) => {
alert('Oops! Something went wrong.');
});
// Set up our request
XHR.open("POST", url);
//Send the proper header information along with the request
XHR.setRequestHeader("Content-Type", "application/json");
// The data sent is what the user provided in the form
XHR.send(artecoServerParam);
}
</code></pre>
<p>
Json example of the code needed in order to send a live event to Arteco
</p>
<pre><code class="json">
{"lane": "manageEvent", "data": { "ctx": "liveEvent", "chId": 0, "param": "param", "brand":"VCA", "integrationType":"integrationType", "data":"data", "image": "base64image","cat": 200 }}
</code></pre>
<h3>Try it yourself</h3>
<form id="json_send_artecoForm">
<div class="form-group">
<label for="artecoServerIP">Server IP</label>
<input class="form-control" type="text" id="server_live_event_artecoServerIP" name="arteco_server_ip"
placeholder="https://demo1.my.omniaweb.cloud:443" value="https://demo1.my.omniaweb.cloud:443">
</div>
<div class="form-group">
<label for="artecoServerParam">Event data</label>
<select class="form-control" id="select_list_channels">
<option>Login first ...</option>
</select>
<br>
<input class="form-control" type="text" id="server_live_event_artecoServerParam"
name="arteco_server_ip">
</div>
</div>
<button type="submit" class="btn btn-primary">Send event</button>
</form>
</section>
<hr class="divider">
<!-- server_live_event
============================
<section id="server_live_event_form">
<h2>Send live event (multipart/form-data)</h2>
<p class="lead">Arteco Omnia REST APIs can send live events to a channel ID.
The POST Login API is used to provide all the information to the server in order to create a new event.
This API must be sent as a "Content-type:multipart/form-data"
</p>
<p>
Picture of a live event:
</p>
<picture>
<img src="./assets/images/live_event_example.png" class="img-fluid p-3" style="max-width: 500px;"">
</picture>
<p>
Example code in order to send event to Arteco Server:
</p>
<pre><code class=" javascript">
function sendData() {
const artecoServerIP = document.getElementById("server_live_event_form_artecoServerIP").value;
const url = artecoServerIP + "/api/v2/event";
const XHR = new XMLHttpRequest();
// Bind the FormData object and the form element
const FD = new FormData(form);
// Define what happens on successful data submission
XHR.addEventListener("load", (event) => {
alert(event.target.responseText);
});
// Define what happens in case of error
XHR.addEventListener("error", (event) => {
alert('Oops! Something went wrong.');
});
// Set up our request
XHR.open("POST", url);
// The data sent is what the user provided in the form
XHR.send(FD);
}
</code></pre>
<p>
Json example of the code needed in order to send a live event to Arteco
</p>
<pre><code class="json">
{"lane": "manageEvent", "data": { "ctx": "liveEvent", "chId": 0, "param": "param", "brand":"VCA", "integrationType":"integrationType", "data":"data", "image": "base64image","cat": 200 }}
</code></pre>
<h3>Try it yourself</h3>
<form id="json_send_artecoForm_multipart">
<div class="form-group">
<label for="artecoServerIP">Server IP</label>
<input class="form-control" type="text" id="server_live_event_form_artecoServerIP"
name="arteco_server_ip" placeholder="https://demo1.my.omniaweb.cloud:443"
value="https://demo1.my.omniaweb.cloud:443">
</div>
<div class="form-group">
<label for="artecoServerParam">Event data</label>
<input class="form-control" type="text" id="server_live_event_form_artecoServerParam" name="arteco"
value=' {"lane": "manageEvent", "data": { "ctx": "liveEvent", "chId": 0, "param": "param", "brand":"VCA", "integrationType":"integrationType", "data":"data","cat": 200 }}'>
</div>
<div class="form-group">
<label for="artecoServerImage">Event image</label>
<input class="form-control" type="file" name="arteco_server_image"
id="server_live_event_form_artecoServerImage">
</div>
<button type="submit" class="btn btn-primary">Send event</button>
</form>
</section>
-->
<hr class="divider">
<!--
<section id="idocs_source_credits">
<h2>Source & Credits</h2>
<h4>Images:</h4>
<ul>
<li>Unsplash - <a target="_blank" href="https://unsplash.com/">https://unsplash.com/</a></li>
</ul>
<h4>Fonts:</h4>
<ul>
<li>Icons Font Face - <a target="_blank" href="https://fontawesome.com/">https://fontawesome.com/</a></li>
</ul>
<h4>Scripts:</h4>
<ul>
<li>jQuery - <a target="_blank" href="http://www.jquery.com/">http://www.jquery.com/</a></li>
<li>Bootstrap 4 - <a target="_blank" href="http://getbootstrap.com/">http://getbootstrap.com/</a></li>
<li>Highlight Js - <a target="_blank" href="https://highlightjs.org/">https://highlightjs.org/</a></li>
<li>jQuery easing - <a target="_blank"
href="http://gsgd.co.uk/sandbox/jquery/easing/">http://gsgd.co.uk/sandbox/jquery/easing/</a></li>
<li>Magnific Popup - <a target="_blank"
href="http://dimsemenov.com/plugins/magnific-popup/">http://dimsemenov.com/plugins/magnific-popup/</a>
</li>
</ul>
</section>
<hr class="divider">
-->
<!-- Support
============================ -->
<section id="idocs_support">
<h2>Support</h2>
<p>If this documentation doesn't answer your questions, please contact us via <a class="btn btn-primary"
target="_blank" href="mailto:support@arteco-global.com">Support email</a></p>
<p> We are located in the GMT +1:00 time zone and we answer all questions within 12-24 hours in weekdays. In
some rare cases the waiting time can last upto 48 hours (except for the holiday seasons which might take
longer).</p>
<div class="alert alert-warning mb-4"><span class="badge badge-danger text-uppercase">Note:</span> While we
aim to provide the best support possible, please keep in mind that it only extends to verified buyers and
only to issues related to our template like bugs and errors. Custom modifications or third party module
implementations are not included.</div>
</section>
<hr class="divider">
</div>
</div>
</div>
<!-- Content end -->
<!-- Footer
============================ -->
<footer id="footer" class="section bg-dark footer-text-light">
<div class="container">
<ul class="social-icons social-icons-lg social-icons-muted justify-content-center mb-3">
<!-- <li><a data-toggle="tooltip" href="https://twitter.com/harnishdesign/" target="_blank" title=""
data-original-title="Twitter"><i class="fab fa-twitter"></i></a></li> -->
<li><a data-toggle="tooltip" href="https://www.facebook.com/artecoglobal/" target="_blank" title=""
data-original-title="Facebook"><i class="fab fa-facebook-f"></i></a></li>
<!-- <li><a data-toggle="tooltip" href="http://www.dribbble.com/harnishdesign/" target="_blank" title=""
data-original-title="Dribbble"><i class="fab fa-dribbble"></i></a></li>
<li><a data-toggle="tooltip" href="http://www.github.com/" target="_blank" title=""
data-original-title="GitHub"><i class="fab fa-github"></i></a></li> -->
</ul>
<p class="text-center">© 2022 ARTECO S.u.r.l. All rights reserved P.IVA 00594980393</p>
</div>
</footer>
<!-- Footer end -->
</div>
<!-- Document Wrapper end -->
<!-- Back To Top -->
<a id="back-to-top" data-toggle="tooltip" title="Back to Top" href="javascript:void(0)"><i
class="fa fa-chevron-up"></i></a>
<!-- JavaScript
============================ -->
<script src="assets/vendor/jquery/jquery.min.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Highlight JS -->
<script src="assets/vendor/highlight.js/highlight.min.js"></script>
<!-- Easing -->
<script src="assets/vendor/jquery.easing/jquery.easing.min.js"></script>
<!-- Magnific Popup -->
<script src="assets/vendor/magnific-popup/jquery.magnific-popup.min.js"></script>
<!-- Custom Script -->
<script src="assets/js/theme.js"></script>
</body>
</html>
<script>
window.addEventListener("load", () => {
function sendData() {
const artecoServerIP = document.getElementById("artecoServerIP").value;
const username = document.getElementById("username").value;
const password = document.getElementById("password").value;
const select = document.getElementById("select_list_channels");
const bearerToken = document.getElementById("bearerToken");
const url = artecoServerIP + "/api/v2/login";
const XHR = new XMLHttpRequest();
// Define what happens on successful data submission
XHR.addEventListener("load", (event) => {
//);
const response = JSON.parse(event.target.responseText);
//alert(response.root.access_token);
bearerToken.value = response.root.access_token;
console.log(response.root.access_token);
const listOfChannels = Object.values(response.root.server.channels.channel).map(channel => {
return {
name: channel.descr,
id: channel.id,
}
})
for (var i = 0; i < listOfChannels.length; i++) {
var opt = listOfChannels[i];
var el = document.createElement("option");
el.textContent = opt.name;
el.value = opt.id;
select.appendChild(el);
}
console.log(listOfChannels)
});
// Define what happens in case of error
XHR.addEventListener("error", (event) => {
alert('Oops! Something went wrong.');
});
// Set up our request
XHR.open("POST", url);
//Send the proper header information along with the request
XHR.setRequestHeader("Content-Type", "application/json");
const data = {
"username": username,
"password": password
}
// The data sent is what the user provided in the form
XHR.send(JSON.stringify(data));
}
// Get the form element
const form = document.getElementById("artecoForm");
// Add 'submit' event handler
form.addEventListener("submit", (event) => {
event.preventDefault();
sendData();
});
});
</script>
<script>
window.addEventListener("load", () => {
function sendData() {
const select = document.getElementById("select_list_channels");
const data = '{"lane": "manageEvent", "data": { "ctx": "liveEvent", "chId": ' + select.value + ', "param": "param", "brand":"VCA", "integrationType":"integrationType", "data":"data", "image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEBMSEhIVFRUVFRYVFxUYFRUVEhcWFxEYFhUXFRUYHSggGBolHRUVITEhJSkrLi4uFx8zODMsNygtLisBCgoKDg0OGxAQGi0lHyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tKy0rLS0tLf/AABEIALcBFAMBIgACEQEDEQH/xAAcAAEAAQUBAQAAAAAAAAAAAAAABAIDBQYHAQj/xAA6EAACAQIDBQUGBQQBBQAAAAAAAQIDEQQFIQYSMUFRBxMiYXEygZGhscEjQlJi8HLR4fEUFSQzQ1P/xAAYAQEBAQEBAAAAAAAAAAAAAAAAAgMBBP/EACURAQEAAgICAgIBBQAAAAAAAAABAhEDMRIhBEETUXEUIjIzQ//aAAwDAQACEQMRAD8A4mAAAAAAAAAegeAAAAAAAAAHoHgJcctrWv3ckur0+pX/ANKq/p+Z3RtBBJr4GpBXcdOqIxwAAAAAAAAAAAAAAAAAAAAAAAAAAAAL2Fw0qklCCu2BZPTaFsXW3N58ehr2MwsqcnGSLywyx7jkyl6RwAQ6AAAAAKqcLuxlsH+GvDFbz/M9X7uhGwNDmzKUaeqaWvzX8sXIm1u2y2RQcFVqeOUtddUvS5nK2RRm9EkRsixCdOC6RSNjwc7NO1/mcbSTSBLZajVh3coronwa0OTbf7I1ctxPdzs6dROVKa9mSXtL1V1f1XU7xVqNu9tTE9oOWTxmWVIOLk6adWk7aqUFe0X5q8beZWtpyn2+dgAZpAAAAAAAAAAAAAAAAAAAAAAAADrvZRsspQVWa1lr6LkcmoQ3pRj1aXxZ9R7A4RQoQSXBL6G/DNby/TDmvUXcTkUdzhyOFdp2CVOtG3Ns+lsc0oM+bu1qupYmMVyuzTLPy47anjmsmhgA8j0gAAFdNar1KCujK0k/NCFbLlWX94l+lav6P7GZw+CjBve4P04p2J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GF5eXFvoubKas7u9rLgl0S4FfeWg4payau/JPgvK9n7imMThsii8nwLRdhIuIq9F6l2MizvXKrlxCXTkWcwp6qa9H6rh8VY9pskJbycXzXzRXbnTF1KSTu9b6rpYz+x20X/ABayU9aM3aS/R+9enNdDA11ZpeX+H9C0ZVpK+h4yjZNWaaumuDTMfmmZQpQcpNKxz7ZLa3u6EqNWWlNXpt8d2/s+7l5PyNd2h2gqYmT1ahyQ3ppvabtVtRKu3CDah9TVwCLdgADgAAAAAAAAAAAAAAAAAAAegAAmAAB4AK5O7XkrFbAKia8PVEA64uQZcvoAVE1epsvxlaz8/wDH3ALiUfM4+zLrf7GOlIAzz7aYdPDwAzWAAAAAAAAAAAAAP//Z", "cat": 200 }}'
const artecoServerIP = document.getElementById("server_live_event_artecoServerIP").value;
const artecoServerParam = document.getElementById("server_live_event_artecoServerParam");
const bearerToken = document.getElementById("bearerToken").value;
artecoServerParam.value = data;
if (bearerToken == undefined || bearerToken == "") {
alert("Login first !");
return
}
const url = artecoServerIP + "/api/v2/event";
const XHR = new XMLHttpRequest();
// Define what happens on successful data submission
XHR.addEventListener("load", (event) => {
alert(event.target.responseText);
});
// Define what happens in case of error
XHR.addEventListener("error", (event) => {
alert('Oops! Something went wrong.');
});
// Set up our request
XHR.open("POST", url);
//Send the proper header information along with the request
XHR.setRequestHeader("Content-Type", "application/json");
XHR.setRequestHeader('Authorization', 'Bearer ' + bearerToken);
// The data sent is what the user provided in the form
XHR.send(data);
}
// Get the form element
const form = document.getElementById("json_send_artecoForm");
// Add 'submit' event handler
form.addEventListener("submit", (event) => {
event.preventDefault();
sendData();
});
});
</script>
<script>
window.addEventListener("load", () => {
function sendData() {
const artecoServerIP = document.getElementById("server_live_event_form_artecoServerIP").value;
const url = artecoServerIP + "/api/v2/event";
const XHR = new XMLHttpRequest();
// Bind the FormData object and the form element
const FD = new FormData(form);
// Define what happens on successful data submission
XHR.addEventListener("load", (event) => {
alert(event.target.responseText);
});
// Define what happens in case of error
XHR.addEventListener("error", (event) => {
alert('Oops! Something went wrong.');
});
// Set up our request
XHR.open("POST", url);
// The data sent is what the user provided in the form
XHR.send(FD);
}
// Get the form element
const form = document.getElementById("json_send_artecoForm_multipart");
// Add 'submit' event handler
form.addEventListener("submit", (event) => {
event.preventDefault();
sendData();
});
});
</script>