/
apiary.apib
3435 lines (2900 loc) · 98.6 KB
/
apiary.apib
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
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
FORMAT: 1A
# MXcloud Data Collection
MXcloud Data Collection Related API.
Resources provided by Cloud Gateway are categorized in */mxc/** related resources.
Resources provided by Cloud Server are categorized in */mxcs/** related resources.
# Common Notations
## Datetime Format
datetime = date "T" time "Z"
date = year "-" month "-" day
year = 4DIGIT
month = 2DIGIT
day = 2DIGIT
time = hour ":" minute ":" second 0*1("." fragment)
hour = 2DIGIT
minute = 2DIGIT
second = 2DIGIT
fragment = 1*6DIGIT
## HexDigit format
hexdigit = 1*(HEXDIG)
# group MXC Settings
## MXC Configuration [/mxc/config]
### Get Configuration [GET]
Response Attributes:
- *readingExpireTimeSec*: required, integer.
+ Response 200 (application/json)
{
"readingExpireTimeSec": 86400
}
### Update Configuration [PUT]
Request Attributes:
- *readingExpireTimeSec*: required, integer.
Response Attributes:
- *message*: required, string.
Human-readable message.
+ Request (application/json)
{
"readingExpireTimeSec": 86400
}
+ Response 200 (application/json)
{
"message": "success"
}
# group CG Status
## Get CG Status [/mxc/status]
### Get [GET]
Response Attributes:
- *storDropCount*: required, integer.
Number of Readings dropped, caused by out-of-storage.
- *fwdDropCount*: required, integer.
Number of Readings dropped, caused by readings-expired.
- *fwdCount*: required, integer.
Number of Readings sent by this CG.
+ Response 200 (application/json)
{
"storDropCount": 120,
"fwdDropCount": 99,
"fwdCount": 2391
}
# group Job Management
## Get Job List [/mxc/jobs?pageSize={pageSize}&page={page}]
Query Attributes:
- *pageSize*: Default *30*.
- *page*: Start from *1*. Default *1*.
### Get [GET]
Resposne Attributes:
- *totalCount*: required, integer.
- *pageSize*: required, integer.
- *page*: required, integer.
- *jobList*: required, object array.
- *id*: required, integer.
Job ID.
- *name*: required, string.
Given job name.
- *command*: required, string.
Shell command to execute.
- *logCount*: required, integer.
Number of logs to keep on Cloud Gateway.
*0* indicates no logs will be deleted.
- *scheduleList*: required, object array.
- *id*: required, integer.
Schedule ID.
- *name*: required, string.
Given schedule name.
- *enabled*: required, boolean.
Enable/disable current schedule.
- *periodSec*: optional, integer.
Triggered periodically.
- *cron*: optional, string.
Cron schedule string.
- *isRunning*: required, boolean.
Indicates whether the job is running.
- *executionCount*: required, integer.
- *lastExecution*: required, object.
If the job hasn't been executed yet, all values below would not present.
- *id*: optional, string.
- *startTime*: optional, string in Datetime format.
- *endTime*: optional, string in Datetime format.
- *exitStatus*: optional, integer.
Value *0* indicates success, *non-0* indicates failure.
In a schedule configuration, only one of *periodSec* and *cron* should present.
+ Response 200 (application/json)
{
"totalCount": 2,
"pageSize": 30,
"page": 1,
"jobList": [
{
"id": 1,
"name": "read iologik",
"command": "mxcdemo_iologik 192.168.31.75",
"logCount": 30,
"scheduleList": [
{
"id": 1,
"name": "every 10 seconds",
"enabled": true,
"periodSec": 10
},
{
"id": 2,
"name": "every minute",
"enabled": false,
"cron": "* * * * *"
}
],
"isRunning": false,
"executionCount": 15,
"lastExecution": {
"id": "20141124-044217_20141124-044219_00",
"startTime": "2014-11-24T04:42:17Z",
"endTime": "2014-11-24T04:42:19Z",
"exitStatus": 0
}
},
{
"id": 2,
"name": "read load profile",
"command": "bin/ansi --read-load-profile",
"logCount": 7,
"scheduleList": [
{
"id": 1,
"name": "every quarter",
"enabled": true,
"cron": "*/15 * * * *"
}
],
"isRunning": true,
"executionCount": 36,
"lastExecution": {
"id": "20150305-000304_20150305-000318_00",
"startTime": "2015-03-05T00:03:04Z",
"endTime": "2015-03-05T00:03:18Z",
"exitStatus": 0
}
}
]
}
## Manage Job [/mxc/jobs]
### Create Job [POST]
Request Attributes:
- *name*: required, string.
- *command*: required, string.
- *logCount*: required, integer.
- *scheduleList*: optional, object array.
- *name*: required, string.
- *enabled*: optional, boolean.
Default *true*.
- *periodSec*: optional, integer.
- *cron*: optional, string.
Response Attributes:
+ *id*: required, ID of the Job created.
Only one of *periodSec* and *cron* should present in a schedule description.
+ Request (application/json)
{
"name": "read load profile",
"command": "bin/ansi --read-load-profile",
"logCount": 15,
"scheduleList": [
{
"name": "every quarter",
"enabled": true,
"cron": "1,16,31,46 * * * *",
}
]
}
+ Response 200 (application/json)
{
"id": 3
}
### Replace All Jobs [PUT]
Request Attributes:
- *jobList*: required, object array.
- *id*: optional, integer.
Ignored.
- *name*: required, string.
Given job name.
- *command*: required, string.
Shell command to execute.
- *logCount*: required, integer.
Number of logs to keep on Cloud Gateway.
*0* indicates no logs will be deleted.
- *scheduleList*: required, object array.
- *id*: optional, integer.
Ignored.
- *name*: required, string.
Given schedule name.
- *enabled*: required, boolean.
Enable/disable current schedule.
- *periodSec*: optional, integer.
Triggered periodically.
- *cron*: optional, string.
Cron schedule string.
- *isRunning*: optional, boolean.
Ignored.
- *executionCount*: required, integer.
Ignored.
- *lastExecution*: required, object.
Ignored.
Response Attributes:
- *message*: required, string.
Human-readable message.
+ Request (application/json)
{
"jobList": [
{
"name": "read iologik",
"command": "mxcdemo_iologik 192.168.31.75",
"logCount": 30,
"scheduleList": [
{
"name": "every 10 seconds",
"enabled": true,
"periodSec": 10
},
{
"name": "every minute",
"enabled": false,
"cron": "* * * * *"
}
]
},
{
"name": "read load profile",
"command": "bin/ansi --read-load-profile",
"logCount": 7,
"scheduleList": [
{
"name": "every quarter",
"enabled": true,
"cron": "*/15 * * * *"
}
]
}
]
}
+ Response 200 (application/json)
{
"message": "success"
}
### Delete Job List [DELETE]
Request Attributes:
- *idList*: required, integer array.
A list of Job IDs to be deleted.
Response Attributes:
- *message*: required, string.
Human-readable message.
+ Request (application/json)
{
"idList": [
1, 3, 4
]
}
+ Response 200 (application/json)
{
"message": "success"
}
## Manage Job [/mxc/jobs/{job_id}]
Resource Attributes:
- *job_id*: required.
The ID of Job of interest.
### Get [GET]
Response Attributes:
- *id*: required, integer.
Job ID.
- *name*: required, string.
Given job name.
- *command*: required, string.
Shell command to execute.
- *logCount*: required, integer.
Number of logs to keep on Cloud Gateway.
*0* indicates no logs will be deleted.
- *scheduleList*: required, object array.
- *id*: required, integer.
Schedule ID.
- *name*: required, string.
Given schedule name.
- *enabled*: required, boolean.
Enable/disable current schedule.
- *periodSec*: optional, integer.
Triggered periodically.
- *cron*: optional, string.
Cron schedule string.
- *isRunning*: required, boolean.
Indicates whether the job is running.
- *executionCount*: required, integer.
- *lastExecution*: required, object.
If the job hasn't been executed yet, all values below would not present.
- *id*: optional, string.
- *startTime*: optional, string in Datetime format.
- *endTime*: optional, string in Datetime format.
- *exitStatus*: optional, integer.
Value *0* indicates success, *non-0* indicates failure.
+ Response 200 (application/json)
{
{
"id": 1,
"name": "read iologik",
"command": "mxcdemo_iologik 192.168.31.75"
"logCount": 30,
"scheduleList": [
{
"id": 1,
"name": "every 10 seconds",
"enabled": true,
"periodSec": 10
},
{
"id": 2,
"name": "every minute",
"enabled": false,
"cron": "* * * * *"
}
],
"isRunning": false,
"executionCount": 15,
"lastExecution": {
"id": "20141124-044217_20141124-044219_00",
"startTime": "2014-11-24T04:42:17Z",
"endTime": "2014-11-24T04:42:19Z",
"exitStatus": 0
}
}
}
### Put [PUT]
Request Attributes:
- *id*: optional, integer.
If present, it should match *job_id* in resource string.
- *name*: required, string.
- *command*: required, string.
- *logCount*: required, integer.
- *scheduleList*: required, object array.
- *id*: optional, integer.
Ignored.
- *name*: required, string.
- *enabled*: required, boolean.
- *periodSec*: optional, integer.
- *cron*: optional, string.
- *isRunning*: optional, boolean.
Ignored.
- *executionCount*: optional, integer.
Ignored.
- *lastExecution*: optional, object.
Ignored.
Response Attributes:
- *message*: required, string.
Human-readable message.
If *scheduleList* exist, it replaces all schedule configurations.
+ Request (application/json)
{
"name": "read load profile every 15 minutes",
"command": "bin/ansi --read-load-profile",
"logCount": 120,
"scheduleList": [
{
"name": "every 15 minutes",
"enabled": true,
"periodSec": 900
}
]
}
+ Response 200 (application/json)
{
"id": 3
}
## On-demand Trigger [/mxc/jobs/{job_id}/trigger]
Resource Attributes:
- *job_id*: integer.
Job ID.
### Post [POST]
Response Attributes:
- *startTime*: required, string in *Datetime* format.
- *endTime*: required, string in *Datetime* format.
- *exitStatus*: required, integer.
+ Response 200 (application/json)
{
"isRunning": false,
"executionCount": 31,
"lastExecution": {
"id": "20141124-044217_20141124-044219_00",
"startTime": "2014-11-24T04:42:17Z",
"endTime": "2014-11-24T04:42:19Z",
"exitStatus": 0
}
}
## Manage Schedule List [/mxc/jobs/{job_id}/schedules]
### Get Schedule List [GET]
Response Attributes:
- *scheduleList*: required, object array.
- *id*: required, integer.
Schedule ID.
- *name*: required, string.
Given schedule name.
- *enabled*: required, boolean.
Enable/disable current schedule.
- *periodSec*: optional, integer.
Triggered periodically.
- *cron*: optional, string.
Cron schedule string.
+ Response 200 (application/json)
{
"scheduleList": [
{
"id": 1,
"name": "every 10 seconds",
"enabled": true,
"periodSec": 10
},
{
"id": 2,
"name": "every minute",
"enabled": false,
"cron": "* * * * *"
}
]
}
### Create Schedule [POST]
Request Attributes:
- *name*: required, string.
- *enabled*: optional, boolean.
Default *true*.
- *periodSec*: optional, integer.
- *cron*: optional, string.
Only one of *periodSec* and *cron* should exist.
Response Attributes:
- *id*: required, integer.
ID of the Schedule created.
+ Request (application/json)
{
"name": "every quarter",
"enabled": true,
"cron": "1,16,31,46 * * * *"
}
+ Response 200 (application/json)
{
"id": 4
}
### Delete Schedule List [DELETE]
Request Attributes:
- *idList*: required, integer array.
A list of Schedule IDs to be deleted.
Response Attributes:
- *message*: required, string.
Human-readable message.
+ Request (application/json)
{
"idList": [
1, 3, 4
]
}
+ Response 200 (application/json)
{
"message": "success"
}
## Manage Schedule [/mxc/jobs/{job_id}/schedules/{schedule_id}]
Resource Attributes:
### Get Schedule [GET]
Response Attributes:
- *id*: required, integer.
Schedule ID.
- *name*: required, string.
Given schedule name.
- *enabled*: required, boolean.
Enable/disable current schedule.
- *periodSec*: optional, integer.
Triggered periodically.
- *cron*: optional, string.
Cron schedule string.
+ Response 200 (application/json)
{
"id": 1,
"name": "every 10 seconds",
"enabled": true,
"periodSec": 10
}
### Update Schedule [PUT]
Request Attributes:
- *id*: optional, integer.
If given, it should match *schedule_id* in resource string.
- *name*: required, string.
- *enabled*: required, boolean.
- *periodSec*: optional, integer.
- *cron*: optional, string.
Response Attributes:
- *message*: required, string.
Human-readable message.
+ Request (application/json)
{
"name": "every 15 minutes",
"enabled": true,
"periodSec": 900
}
+ Response 200 (application/json)
{
"message": "success"
}
## Get Log List [/mxc/jobs/{job_id}/logs?pageSize={pageSize}&page={page}]
Query Attributes:
- *pageSize*: Default *30*.
- *page*: Start from *1*. Default *1*.
### Get [GET]
Response Attributes:
- *totalCount*: required, integer.
- *pageSize*: required, integer.
- *page*: required, integer.
- *logList*: required, object array.
- *id*: required, string.
Log ID.
- *startTime*: required, string in Datetime format.
- *endTime*: required, string in Datetime format.
- *exitStatus*: required, integer.
Value *0* indicates success, *non-0* indicates failure.
Log list returned is ordered by *startTime* in decending order.
+ Response 200 (application/json)
{
"totalCount": 2,
"pageSize": 30,
"page": 1,
"logList":
[
{
"id": "20141124045217",
"startTime": "2014-11-24T04:52:17Z",
"endTime": "2014-11-24T04:53:17Z",
"exitStatus": 127
},
{
"id": "20141124044217",
"startTime": "2014-11-24T04:42:17Z",
"endTime": "2014-11-24T04:43:17Z",
"exitStatus": 0
}
]
}
## Export Log [/mxc/jobs/{job_id}/logs/{log_id}/export]
Resource Attributes:
- *job_id*: integer.
Job ID.
- *log_id*: string.
Log ID.
### Get [Get]
(to Backend)
+ Response 200 (application/octet-stream)
```binary data goes here```
### Post [POST]
(to Bundle)
This request causes Cloud Gateway to *POST* the *Log File* to the designated *url*.
Request Attributes:
- *url*: required, string.
URL given for Cloud Gateway to *POST* the log file to.
Response Attributes:
- *startTime*: required, string in *Datetime* format.
Time when *POST* started.
- *endTime*: required, string in *Datetime* format.
Time when *POST* ended.
- *url*: required, string.
+ Request (application/json)
{
"url": "https://mxc-cs/log/upload",
"headers": {
"X-Mx-AccessToken": "MOXAMOXA-TEST-SYSTEM"
}
}
+ Response 200 (application/json)
{
"url": "https://mxc-cs/log/upload/JEJC9bbc832k1Sc"
}
# group Custom Bundle Management
## Custom Bundle [/mxc/custom-bundle]
### Get Custom Bundle Information [GET]
Response Attributes:
- *name*: required, string.
Get information about currently deployed client-bundle.
+ Response 200 (application/json)
{
"name": "my-application-bundle.tgz",
}
## Deploy Custom Bundle [/mxc/custom-bundle/update]
### Request Deployment [POST]
Request Attributes:
- *name*: required, string.
- *url*: required, string.
Starting a request while a previous request is in progress, results in error.
+ Request (application/json)
{
"name": "my-application-bundle.tgz",
"url": "https://mxc-cs/client-bundles/UD63CVU7QPLE",
"headers": {
"X-Mx-AccessToken": "some-access-token"
}
}
+ Response 200 (application/json)
# group Cloud Server Configuration
## Cloud Server Configuration [/mxcs/config]
### Get [GET]
Response Attributes:
- *readingValidityPeriodSec*: required, integer.
Number of seconds that a received Reading would be kept on Cloud Server.
+ Response 200 (application/json)
{
"readingValidityPeriodSec": 7776000
}
### Put [PUT]
Request Attributes:
- *readingValidityPeriodSec*: required, integer.
Number of seconds that a received Reading would be kept on Cloud Server.
Setting this valid to *0* results in *not deleting any Readings*.
Response Attributes:
- *message*: required, string.
Human-readable message.
+ Request (application/json)
{
"readingValidityPeriodSec": 2592000
}
+ Response 200 (application/json)
{
"message": "success"
}
# group Cloud Server Status
## Cloud Server Status [/mxcs/status]
### Get [GET]
Response Attributes:
- *securityEnabled*: required, boolean.
+ Response 200 (application/json)
{
"securityEnabled": true
}
# group Cloud Gateway Management
## Get Cloud Gateway List [/mxcs/cgs?cgGroupId={cgGroupId}&keyword={keyword}&page={page}&pageSize={pageSize}]
Query Attributes:
- *cgGroupId*: optional, string.
If given, only CGs in the given group are returned.
- *keyword*: optional, string.
Return only Cloud Gateways with *id* or *aliasName* similar to the given string.
- *page*: optional, integer. Default *1*.
- *pageSize*: optional, integer. Default *30*.
### Get [GET]
Response Attributes:
- *totalCount*: required, integer. Number of CGs in the list.
- *pageSize*: required, integer.
- *page*: required, integer.
- *cgList*: required, object list.
- *id*: required. CG ID of each authorized CG.
- *aliasName*: required, string.
- *isOnline*: required, boolean.
- *lastUpdateTime*: required, string in *Datetime* format.
- *runtimeVersion*: required, string.
- *equipmentCount*: required, integer.
- *onlineEquipmentCount*: required, integer.
- *cellular*: optional, object.
- *usageByte*: optional, integer.
Exists only when CG has Cellular Modules.
- *thresholdByte*: optional, integer
Exists only when CG has Cellular Modules.
- *metas*: required, object.
Contains a dictionary of previously stored key-value pairs.
- *security*: optional, object.
Required when the whole system is running with security enabled.
- *tls-psk*: required, string in *HexDigit* format.
+ Response 200 (application/json)
{
"totalCount": 2,
"pageSize": 10,
"page": 1,
"cgList": [
{
"id": "cg-0090e8001234",
"aliasName": "CG-01",
"isOnline": true,
"lastUpdateTime": "2014-02-12T14:31:49.298123Z",
"runtimeVersion": "1.0.0",
"equipmentCount": 20,
"onlineEquipmentCount": 15,
"cellular": {
"usageByte": 29891893,
"thresholdByte": 1073741824
},
"metas": {
"latitude": "0",
"longitude": "0"
},
"security": {
"tls-psk": "0123456789ABCDEF"
}
},
{
"id": "cg-0090e8004321",
"aliasName": "CG-02",
"isOnline": false,
"lastUpdateTime": "2014-02-12T14:31:49.298123Z",
"runtimeVersion": "1.0.0",
"equipmentCount": 20,
"onlineEquipmentCount": 15,
"cellular": {},
"metas": {
"latitude": "41.428342",
"longitude": "2.94482"
},
"security": {
"tls-psk": "0123456789ABCDEF"
}
}
]
}
## Manage Cloud Gateway [/mxcs/cgs]
### Create Cloud Gateway [POST]
Request Attributes:
- *id*: required. ID of the CG to be created.
- *aliasName*: required, string.
Can be empty-string.
- *metas: optional, object.
Contains a dictionary of key-value pairs to be stored relative to the newly
created CG.
- *security*: optional, object.
Required when the whole system is running with security enabled.
- *tls-psk*: required, string in *HexDigit* format.
Response Attributes:
- *id*: required, ID of the CG just created.
+ Request (application/json)
{
"id": "cg-0090e8001234",
"aliasName": "CG-03",
"metas": {
"latitude": "41.428342",
"longitude": "294482"
},
"security": {
"tls-psk": "DEADBEEF"
}
}
+ Response 200 (application/json)
{
"id": "cg-0090e8001234"
}
### Delete Cloud Gateway List [DELETE]
Request Attributes:
- *idList*: required, string array.
Contains a list of IDs of the CGs to be deleted.
Response Attributes:
- *message*: required, string.
Human-readable message.
+ Request (application/json)
{
"idList": [
"cg-0090e8001234",
"cg-0090e8004321"
]
}
+ Response 200 (application/json)
{
"message": "success"
}
## Import Cloud Gateway List - backend interface [/mxcs/cgs-import]
Files being imported should be a CSV file having content like:
```
"cg-id","name","latitude","longitude","tls-psk"
"cg-0090e84a38cd","CG@192.168.31.80","0.000","0.000","0123456789abcdef"
"cg-0090e84a0001","CG@nowhere","0.000","0.000","0123456789abcdef"
```
### Post [POST]
+ Request (application/json)
{
"url": "http://192.168.31.81:5000/api/v1/download/1234",
"headers": {
"X-Mx-AccessToken": "some-access-token"
}
}
+ Response 200 (application/json)
{
"message": "success"
}
## Get Cloud Gateway [/mxcs/cgs/{cg_id}]
Resource Attributes:
- *cg_id*: required. The ID of CG of interest.
### Get [GET]
Response Attributes:
- *id*: required, string.
- *aliasName*: required, string.
- *isOnline*: required, boolean.
- *lastUpdateTime*: required, string in *Datetime* format.
- *runtimeVersion*: required, string.
- *equipmentCount*: required, integer.