-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
799 lines (799 loc) · 38.4 KB
/
swagger.json
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
{
"openapi": "3.0.1",
"info": {
"title": "Sveriges Radio's API for Important Public Announcements",
"description": "This API will update as new important public announcements are made available by Sveriges Radio.\r\n\r\nThere are two versions of this API running in parallel. The real version, which you can identify by the /api part of the URL, and a development version which is available under /testapi. The development API will be regularly updated with dummy data to allow you to see how your application will react on real events.<br><br><a href=\"/releasenotes\">API release notes</a>",
"version": "v2"
},
"paths": {
"/Api/v2/alerts": {
"get": {
"tags": [
"Api"
],
"summary": "Get a list of all current alerts",
"description": " When using the formats .json or .xml, all content about the alerts will be included in the result.\r\n \r\nWhen using the format .atom or.rss, the result will include basic information about the respective alert, along with a link to the full message in CAP format.\r\n\r\nIt is important to check the alert status. An alert marked actual is an actual, currently active important public announcement. An alert marked test is an active test announcement. More statuses might be used in the future.\r\n\r\nAn alert with msgType \"Cancel\" is a previous actual or test announcement that no longer applies.\r\n \r\nEach announcement will subsequently have two alerts associated with it. First an actual message will be emitted. When the announcement no longer applies, the previous message will be replaced by the cancel message. The actual and cancel messages will have different CAP identifiers, but the same incident identifier (beginning with SRVMA).\r\n\r\nEnglish translation of the alert info is not yet released on the real api, but can be viewed in the test api. Translated info objects might be added to the alert with a delay.",
"parameters": [
{
"name": "geoCode",
"in": "query",
"description": "GeoCodes are 2 or 4-digit numbers representing areas in Sweden, <a href=\"https://www.scb.se/hitta-statistik/regional-statistik-och-kartor/regionala-indelningar/lan-och-kommuner/lan-och-kommuner-i-kodnummerordning\">as specified by SCB</a>. If the geocode is releated to a Swedish counties (län) it has two digits. When supplying a county geocode, you will also get alerts for all Swedish municipalities (kommuner) within the county.",
"schema": {
"type": "string"
},
"example": "00"
},
{
"name": "ext",
"in": "query",
"description": "The default format for alerts is: json. Supported extensions are: rss, atom, json, xml",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "This call should always return 200 OK and contain valid content.",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
}
}
}
}
}
},
"/Api/v2/alerts/index.{ext}": {
"get": {
"tags": [
"Api"
],
"summary": "Get a list of all current alerts",
"description": " When using the formats .json or .xml, all content about the alerts will be included in the result.\r\n \r\nWhen using the format .atom or.rss, the result will include basic information about the respective alert, along with a link to the full message in CAP format.\r\n\r\nIt is important to check the alert status. An alert marked actual is an actual, currently active important public announcement. An alert marked test is an active test announcement. More statuses might be used in the future.\r\n\r\nAn alert with msgType \"Cancel\" is a previous actual or test announcement that no longer applies.\r\n \r\nEach announcement will subsequently have two alerts associated with it. First an actual message will be emitted. When the announcement no longer applies, the previous message will be replaced by the cancel message. The actual and cancel messages will have different CAP identifiers, but the same incident identifier (beginning with SRVMA).\r\n\r\nEnglish translation of the alert info is not yet released on the real api, but can be viewed in the test api. Translated info objects might be added to the alert with a delay.",
"parameters": [
{
"name": "geoCode",
"in": "query",
"description": "GeoCodes are 2 or 4-digit numbers representing areas in Sweden, <a href=\"https://www.scb.se/hitta-statistik/regional-statistik-och-kartor/regionala-indelningar/lan-och-kommuner/lan-och-kommuner-i-kodnummerordning\">as specified by SCB</a>. If the geocode is releated to a Swedish counties (län) it has two digits. When supplying a county geocode, you will also get alerts for all Swedish municipalities (kommuner) within the county.",
"schema": {
"type": "string"
},
"example": "00"
},
{
"name": "ext",
"in": "path",
"description": "The default format for alerts is: json. Supported extensions are: rss, atom, json, xml",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "This call should always return 200 OK and contain valid content.",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
}
}
}
}
}
},
"/Api/v2/alerts/{geoCode}": {
"get": {
"tags": [
"Api"
],
"summary": "Get a list of all current alerts",
"description": " When using the formats .json or .xml, all content about the alerts will be included in the result.\r\n \r\nWhen using the format .atom or.rss, the result will include basic information about the respective alert, along with a link to the full message in CAP format.\r\n\r\nIt is important to check the alert status. An alert marked actual is an actual, currently active important public announcement. An alert marked test is an active test announcement. More statuses might be used in the future.\r\n\r\nAn alert with msgType \"Cancel\" is a previous actual or test announcement that no longer applies.\r\n \r\nEach announcement will subsequently have two alerts associated with it. First an actual message will be emitted. When the announcement no longer applies, the previous message will be replaced by the cancel message. The actual and cancel messages will have different CAP identifiers, but the same incident identifier (beginning with SRVMA).\r\n\r\nEnglish translation of the alert info is not yet released on the real api, but can be viewed in the test api. Translated info objects might be added to the alert with a delay.",
"parameters": [
{
"name": "geoCode",
"in": "path",
"description": "GeoCodes are 2 or 4-digit numbers representing areas in Sweden, <a href=\"https://www.scb.se/hitta-statistik/regional-statistik-och-kartor/regionala-indelningar/lan-och-kommuner/lan-och-kommuner-i-kodnummerordning\">as specified by SCB</a>. If the geocode is releated to a Swedish counties (län) it has two digits. When supplying a county geocode, you will also get alerts for all Swedish municipalities (kommuner) within the county.",
"required": true,
"schema": {
"type": "string"
},
"example": "00"
},
{
"name": "ext",
"in": "query",
"description": "The default format for alerts is: json. Supported extensions are: rss, atom, json, xml",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "This call should always return 200 OK and contain valid content.",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
}
}
}
}
}
},
"/Api/v2/alerts/{geoCode}/index.{ext}": {
"get": {
"tags": [
"Api"
],
"summary": "Get a list of all current alerts",
"description": " When using the formats .json or .xml, all content about the alerts will be included in the result.\r\n \r\nWhen using the format .atom or.rss, the result will include basic information about the respective alert, along with a link to the full message in CAP format.\r\n\r\nIt is important to check the alert status. An alert marked actual is an actual, currently active important public announcement. An alert marked test is an active test announcement. More statuses might be used in the future.\r\n\r\nAn alert with msgType \"Cancel\" is a previous actual or test announcement that no longer applies.\r\n \r\nEach announcement will subsequently have two alerts associated with it. First an actual message will be emitted. When the announcement no longer applies, the previous message will be replaced by the cancel message. The actual and cancel messages will have different CAP identifiers, but the same incident identifier (beginning with SRVMA).\r\n\r\nEnglish translation of the alert info is not yet released on the real api, but can be viewed in the test api. Translated info objects might be added to the alert with a delay.",
"parameters": [
{
"name": "geoCode",
"in": "path",
"description": "GeoCodes are 2 or 4-digit numbers representing areas in Sweden, <a href=\"https://www.scb.se/hitta-statistik/regional-statistik-och-kartor/regionala-indelningar/lan-och-kommuner/lan-och-kommuner-i-kodnummerordning\">as specified by SCB</a>. If the geocode is releated to a Swedish counties (län) it has two digits. When supplying a county geocode, you will also get alerts for all Swedish municipalities (kommuner) within the county.",
"required": true,
"schema": {
"type": "string"
},
"example": "00"
},
{
"name": "ext",
"in": "path",
"description": "The default format for alerts is: json. Supported extensions are: rss, atom, json, xml",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "This call should always return 200 OK and contain valid content.",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
}
}
}
}
}
},
"/Api/v2/cap/{identifier}": {
"get": {
"tags": [
"Api"
],
"summary": "Returns the matching CAP Alert/Cancel message.",
"parameters": [
{
"name": "identifier",
"in": "path",
"description": "Identifier is used to match on the value given in the Identifier or Incidents fields.\r\n\r\nIdentifiers look like this: SRCAPXXXXXXXXXXXXXXI, where all X:es have been replaced by digits. The identifier is used to match on the value given in the Identifier or Incidents fields.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Returns the matching CAP Alert/Cancel message. Content will be of type application/cap+xml.",
"content": {
"application/cap+xml": {
"schema": {
"$ref": "#/components/schemas/Alert"
}
}
}
},
"404": {
"description": "If the identifier is invalid or not found, 404 will be returned."
}
}
}
},
"/TestApi/v2/alerts": {
"get": {
"tags": [
"TestApi"
],
"summary": "Get a list of all current alerts",
"description": " When using the formats .json or .xml, all content about the alerts will be included in the result.\r\n \r\nWhen using the format .atom or.rss, the result will include basic information about the respective alert, along with a link to the full message in CAP format.\r\n\r\nIt is important to check the alert status. An alert marked actual is an actual, currently active important public announcement. An alert marked test is an active test announcement. An alert marked cancel is a previous actual or test announcement that no longer applies. More statuses might be used in the future.\r\n \r\nEach announcement will subsequently have two alerts associated with it. First an actual message will be emitted. When the announcement no longer applies, the previous message will be replaced by the cancel message. The actual and cancel messages will have different CAP identifiers, but the same incident identifier (beginning with SRVMA).\r\n\r\nEnglish translation of the alert info is not yet released on real api, but can be viewed in the test api. Translated info objects will be added to the alert with a delay.",
"parameters": [
{
"name": "geoCode",
"in": "query",
"description": "GeoCodes are 2 or 4-digit numbers representing areas in Sweden, <a href=\"https://www.scb.se/hitta-statistik/regional-statistik-och-kartor/regionala-indelningar/lan-och-kommuner/lan-och-kommuner-i-kodnummerordning\">as specified by SCB</a>. If the geocode is releated to a Swedish counties (län) it has two digits. When supplying a county geocode, you will also get alerts for all Swedish municipalities (kommuner) within the county.",
"schema": {
"type": "string"
},
"example": "00"
},
{
"name": "ext",
"in": "query",
"description": "The default format for alerts is: json. Supported extensions are: rss, atom, json, xml",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "This call should always return 200 OK and contain valid content.",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
}
}
}
}
}
},
"/TestApi/v2/alerts/index.{ext}": {
"get": {
"tags": [
"TestApi"
],
"summary": "Get a list of all current alerts",
"description": " When using the formats .json or .xml, all content about the alerts will be included in the result.\r\n \r\nWhen using the format .atom or.rss, the result will include basic information about the respective alert, along with a link to the full message in CAP format.\r\n\r\nIt is important to check the alert status. An alert marked actual is an actual, currently active important public announcement. An alert marked test is an active test announcement. An alert marked cancel is a previous actual or test announcement that no longer applies. More statuses might be used in the future.\r\n \r\nEach announcement will subsequently have two alerts associated with it. First an actual message will be emitted. When the announcement no longer applies, the previous message will be replaced by the cancel message. The actual and cancel messages will have different CAP identifiers, but the same incident identifier (beginning with SRVMA).\r\n\r\nEnglish translation of the alert info is not yet released on real api, but can be viewed in the test api. Translated info objects will be added to the alert with a delay.",
"parameters": [
{
"name": "geoCode",
"in": "query",
"description": "GeoCodes are 2 or 4-digit numbers representing areas in Sweden, <a href=\"https://www.scb.se/hitta-statistik/regional-statistik-och-kartor/regionala-indelningar/lan-och-kommuner/lan-och-kommuner-i-kodnummerordning\">as specified by SCB</a>. If the geocode is releated to a Swedish counties (län) it has two digits. When supplying a county geocode, you will also get alerts for all Swedish municipalities (kommuner) within the county.",
"schema": {
"type": "string"
},
"example": "00"
},
{
"name": "ext",
"in": "path",
"description": "The default format for alerts is: json. Supported extensions are: rss, atom, json, xml",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "This call should always return 200 OK and contain valid content.",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
}
}
}
}
}
},
"/TestApi/v2/alerts/{geoCode}": {
"get": {
"tags": [
"TestApi"
],
"summary": "Get a list of all current alerts",
"description": " When using the formats .json or .xml, all content about the alerts will be included in the result.\r\n \r\nWhen using the format .atom or.rss, the result will include basic information about the respective alert, along with a link to the full message in CAP format.\r\n\r\nIt is important to check the alert status. An alert marked actual is an actual, currently active important public announcement. An alert marked test is an active test announcement. An alert marked cancel is a previous actual or test announcement that no longer applies. More statuses might be used in the future.\r\n \r\nEach announcement will subsequently have two alerts associated with it. First an actual message will be emitted. When the announcement no longer applies, the previous message will be replaced by the cancel message. The actual and cancel messages will have different CAP identifiers, but the same incident identifier (beginning with SRVMA).\r\n\r\nEnglish translation of the alert info is not yet released on real api, but can be viewed in the test api. Translated info objects will be added to the alert with a delay.",
"parameters": [
{
"name": "geoCode",
"in": "path",
"description": "GeoCodes are 2 or 4-digit numbers representing areas in Sweden, <a href=\"https://www.scb.se/hitta-statistik/regional-statistik-och-kartor/regionala-indelningar/lan-och-kommuner/lan-och-kommuner-i-kodnummerordning\">as specified by SCB</a>. If the geocode is releated to a Swedish counties (län) it has two digits. When supplying a county geocode, you will also get alerts for all Swedish municipalities (kommuner) within the county.",
"required": true,
"schema": {
"type": "string"
},
"example": "00"
},
{
"name": "ext",
"in": "query",
"description": "The default format for alerts is: json. Supported extensions are: rss, atom, json, xml",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "This call should always return 200 OK and contain valid content.",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
}
}
}
}
}
},
"/TestApi/v2/alerts/{geoCode}/index.{ext}": {
"get": {
"tags": [
"TestApi"
],
"summary": "Get a list of all current alerts",
"description": " When using the formats .json or .xml, all content about the alerts will be included in the result.\r\n \r\nWhen using the format .atom or.rss, the result will include basic information about the respective alert, along with a link to the full message in CAP format.\r\n\r\nIt is important to check the alert status. An alert marked actual is an actual, currently active important public announcement. An alert marked test is an active test announcement. An alert marked cancel is a previous actual or test announcement that no longer applies. More statuses might be used in the future.\r\n \r\nEach announcement will subsequently have two alerts associated with it. First an actual message will be emitted. When the announcement no longer applies, the previous message will be replaced by the cancel message. The actual and cancel messages will have different CAP identifiers, but the same incident identifier (beginning with SRVMA).\r\n\r\nEnglish translation of the alert info is not yet released on real api, but can be viewed in the test api. Translated info objects will be added to the alert with a delay.",
"parameters": [
{
"name": "geoCode",
"in": "path",
"description": "GeoCodes are 2 or 4-digit numbers representing areas in Sweden, <a href=\"https://www.scb.se/hitta-statistik/regional-statistik-och-kartor/regionala-indelningar/lan-och-kommuner/lan-och-kommuner-i-kodnummerordning\">as specified by SCB</a>. If the geocode is releated to a Swedish counties (län) it has two digits. When supplying a county geocode, you will also get alerts for all Swedish municipalities (kommuner) within the county.",
"required": true,
"schema": {
"type": "string"
},
"example": "00"
},
{
"name": "ext",
"in": "path",
"description": "The default format for alerts is: json. Supported extensions are: rss, atom, json, xml",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "This call should always return 200 OK and contain valid content.",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
}
}
}
}
}
},
"/TestApi/v2/cap/{identifier}": {
"get": {
"tags": [
"TestApi"
],
"summary": "Returns the matching CAP Alert/Cancel message.",
"parameters": [
{
"name": "identifier",
"in": "path",
"description": "Identifier is used to match on the value given in the Identifier or Incidents fields.\r\n\r\nIdentifiers look like this: SRCAPXXXXXXXXXXXXXXI, where all X:es have been replaced by digits. The identifier is used to match on the value given in the Identifier or Incidents fields.",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Returns the matching CAP Alert/Cancel message. Content will be of type application/cap+xml.",
"content": {
"application/cap+xml": {
"schema": {
"$ref": "#/components/schemas/Alert"
}
}
}
},
"404": {
"description": "If the identifier is invalid or not found, 404 will be returned."
}
}
}
},
"/TestApi/v2/examples/data": {
"get": {
"tags": [
"TestApi"
],
"summary": "Get a static list of alerts for development purposes.",
"description": "This endpoint will only return static json data for development purposes.\r\n\r\nThe response will contain five example alerts in this order; one active alert with translation, one active alert without translation, one closed alert, one active technical test, one closed technical test.",
"responses": {
"200": {
"description": "This call should always return 200 OK and contain valid static content.",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
},
"text/xml": {
"schema": {
"$ref": "#/components/schemas/VmaAlerts"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Alert": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"description": "",
"nullable": true,
"example": "SRCAP20240429172709I"
},
"sender": {
"type": "string",
"description": "",
"nullable": true,
"example": "https://vmaapi.sr.se/api/v2"
},
"sent": {
"type": "string",
"description": "The time when the alert was sent out, in local time. If msgType is Cancel or Update this reflects the time for the cancellation or update.",
"nullable": true,
"example": "2024-04-29T17:27:09+02:00"
},
"status": {
"type": "string",
"description": "Will be \"Actual\" for real alerts and \"Test\" for test alerts. More statuses (like \"Exercise\") may be used in the future.",
"nullable": true,
"example": "Actual"
},
"msgType": {
"type": "string",
"description": "Will be \"Alert\" for a currently active important public announcement, and \"Cancel\" for a previous announcement that no longer applies. More msgTypes (like \"Update\") may be used in the future.",
"nullable": true,
"example": "Alert"
},
"scope": {
"type": "string",
"description": "",
"nullable": true,
"example": "Public"
},
"references": {
"type": "string",
"description": "The extended message identifier (in the form sender,identifier,sent) of an earlier alert referenced in this alert (canceled or updated). Will be null if no reference exist. If multiple references, they are separated by whitespace.",
"nullable": true,
"example": "https://vmaapi.sr.se/api/v2,SRCAP20240808162955T,2024-08-08T14:29:55+02:00"
},
"incidents": {
"type": "string",
"description": "If multiple incidents, they are separated by whitespace.",
"nullable": true,
"example": "SRVMA20240429172709I"
},
"info": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Info"
},
"description": "An array of Info objects. Will be null if the status of the alert is \"Cancel\".",
"nullable": true
}
},
"additionalProperties": false
},
"Area": {
"type": "object",
"properties": {
"areaDesc": {
"type": "string",
"description": "Human readable description of the area.",
"nullable": true,
"example": "Bromölla kommun (Skåne län)"
},
"geocode": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Geocode"
},
"description": "An array of Geocode objects. When the AreaDesc is the whole of Sweden (\"Hela landet\") this array will be empty.",
"nullable": true
}
},
"additionalProperties": false
},
"Geocode": {
"type": "object",
"properties": {
"valueName": {
"type": "string",
"description": "Can be \"Kommun\" or \"Län\".",
"nullable": true,
"example": "Kommun"
},
"value": {
"type": "string",
"description": "The geocode of the affected area. GeoCodes are 2 or 4-digit numbers representing areas in Sweden, <a href=\"https://www.scb.se/hitta-statistik/regional-statistik-och-kartor/regionala-indelningar/lan-och-kommuner/lan-och-kommuner-i-kodnummerordning\">as specified by SCB</a>.",
"nullable": true,
"example": "1272"
}
},
"additionalProperties": false
},
"Info": {
"type": "object",
"properties": {
"language": {
"type": "string",
"description": "Can be \"sv-SE\" or \"en-US\". Natural language identifier per [RFC 3066]. More language identifiers may be used in the future.",
"nullable": true,
"example": "sv-SE"
},
"category": {
"type": "string",
"description": "",
"nullable": true,
"example": "Safety"
},
"event": {
"type": "string",
"description": "",
"nullable": true,
"example": "Viktigt meddelande till allmänheten (VMA)"
},
"urgency": {
"type": "string",
"description": "",
"nullable": true,
"example": "Immediate"
},
"severity": {
"type": "string",
"description": "",
"nullable": true,
"example": "Severe"
},
"certainty": {
"type": "string",
"description": "",
"nullable": true,
"example": "Observed"
},
"senderName": {
"type": "string",
"description": "The issuer of this alert.",
"nullable": true,
"example": "Sveriges Radio"
},
"description": {
"type": "string",
"description": "Contains the alert description.",
"nullable": true,
"example": "Viktigt meddelande till allmänheten i Bromölla kommun, Skåne län.\\r\\n\\r\\nDet brinner kraftigt i en industribyggnad.\\r\\n\\r\\nRäddningsledaren uppmanar alla i området att gå inomhus och stänga dörrar, fönster och ventilation.\\r\\n\\r\\nFör mer information lyssna på Sveriges Radio P4 Kristianstad."
},
"web": {
"type": "string",
"description": "Link to a page with information in Swedish about what a VMA is.",
"nullable": true,
"example": "https://sverigesradio.se/artikel/vma-vad-ar-det"
},
"area": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Area"
},
"description": "An array of Area objects.",
"nullable": true
}
},
"additionalProperties": false
},
"VmaAlerts": {
"type": "object",
"properties": {
"timestamp": {
"type": "string",
"description": "Last update of the api in local time.",
"nullable": true,
"example": "2024-05-16T12:53:52+02:00"
},
"alerts": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Alert"
},
"description": "An array of alerts. The array will be empty when there are no active alerts.",
"nullable": true
}
},
"additionalProperties": false
}
}
}
}